CalKit

Number System Converter

Convert number systems.

10진법 → 16진법
FF

주요 진법 변환

2진법 (Binary)11111111
8진법 (Octal)377
10진법 (Decimal)255
16진법 (Hex)FF

Overview

Convert between decimal (base-10), binary (base-2), octal (base-8), and hexadecimal (base-16) number systems. Essential for programming, computer science, and digital electronics.

Formula

Decimal to Binary: divide by 2, record remainders (reverse order)
Decimal to Hex: divide by 16, record remainders (reverse order)
Binary to Decimal: sum each digit × 2^(position)
Hex to Decimal: sum each digit × 16^(position)
Hex digits: A=10, B=11, C=12, D=13, E=14, F=15
Example: (255)₁₀ = (FF)₁₆ = (11111111)₂ = (377)₈

How to Use

  1. 1Enter the number to convert.
  2. 2Select the source base (binary, octal, decimal, hexadecimal).
  3. 3Select the target base.
  4. 4View the converted result.

Tips

  • In hexadecimal, A-F represent 10-15.
  • Common programming prefixes: 0b (binary), 0o (octal), 0x (hex).
  • CSS/HTML color codes (e.g., #FF0000) are RGB values in hexadecimal.
  • Each IP address octet (0-255) is an 8-bit binary number.
  • The maximum value of 1 byte (8 bits) is binary 11111111 = decimal 255 = hex FF.

FAQ

Q. Why is hexadecimal commonly used in programming?

Hexadecimal represents 4 binary digits with a single character, making binary data much more compact and readable. For example, binary 11111111 (8 digits) becomes hex FF (2 digits).

Q. How are negative numbers represented in binary?

Computers typically use two's complement. The most significant bit (MSB) indicates the sign: 0 for positive, 1 for negative. For 8-bit: -1 = 11111111₂ = FF₁₆.

Q. Where is octal used?

Octal is used in Unix/Linux file permissions (e.g., chmod 755). Each digit represents 3 bits, mapping to rwx permissions (r=4, w=2, x=1).

Related Calculators