Open any color picker in a design tool and you’ll see values like #FF6B35. Look at a file size and it says 4,096 bytes. Dig into any computer program and you’ll find memory addresses, bit flags, and byte values. All of it traces back to two number systems: binary and hexadecimal.

Why Not Just Use Decimal?

Humans count in base-10 (decimal) because we have 10 fingers. Computers use base-2 (binary) because transistors β€” the building blocks of chips β€” have only two stable states: on (1) and off (0).

A single binary digit is called a bit. Eight bits make a byte, which can represent 256 different values (0–255).

Binary: Base-2

In binary, each position represents a power of 2:

1286432168421
10101101

Reading the table above: 128 + 32 + 8 + 4 + 1 = 173 in decimal.

To convert decimal to binary, repeatedly divide by 2 and record the remainders:

173 Γ· 2 = 86 remainder 1
86  Γ· 2 = 43 remainder 0
43  Γ· 2 = 21 remainder 1
21  Γ· 2 = 10 remainder 1
10  Γ· 2 = 5  remainder 0
5   Γ· 2 = 2  remainder 1
2   Γ· 2 = 1  remainder 0
1   Γ· 2 = 0  remainder 1

Read remainders bottom to top: 10101101 βœ“

Hexadecimal: Base-16

Binary is precise but verbose. An 8-bit byte already needs 8 digits in binary. Hexadecimal (base-16) is a compact shorthand: every hex digit represents exactly 4 bits.

Hex digits go: 0 1 2 3 4 5 6 7 8 9 A B C D E F

DecimalBinaryHex
000000
101010A
151111F
17310101101AD
25511111111FF

A color like #FF6B35 is three hex bytes: red=FF (255), green=6B (107), blue=35 (53).

Where You’ll See These Systems

  • Memory addresses: 0x7FFE4A21B3C0
  • RGB colors: #1A2B3C
  • File permissions: chmod 755 (octal, but same idea)
  • IP addresses (IPv6): 2001:0db8:85a3::8a2e:0370:7334
  • Logic gates: every AND, OR, NOT gate operates on binary signals

Practice Tools

Our Binary & Hex Converter lets you convert between number systems instantly and see the bit-level representation. For the hardware side, explore Logic Gates and Computer Parts.


The best way to cement this is hands-on practice. Use the Binary & Hex tool to convert numbers until the pattern clicks.