Start here

Bits, bytes and nibbles

Before you touch the converters, it helps to know what is actually being converted. Computers only ever store one kind of thing — on/off switches. Everything else is a way of writing those switches down.

1. A bit is a single switch
The smallest piece of information a computer can hold.

A bit (binary digit) is either 0 or 1 — off or on. On its own it can only answer one yes/no question, so bits are grouped together.

Every time you add a bit you double the number of possible values: 2 bits → 4, 3 bits → 8, n bits → 2ⁿ.

2. Nibbles and bytes are handy groupings
4 bits make a nibble; 8 bits make a byte.
BitsNamePossible valuesRange
1Bit20 or 1
4Nibble160000–1111 (one hex digit)
8Byte25600000000–11111111 (0–255)
162 bytes (word)65,5360–65535

A byte holds 256 different values. Counting from zero, that is 0–255 — which is exactly why colour channels, ASCII codes and most small numbers you meet stop at 255.

3. Place values: how binary counts
Same idea as decimal, but doubling instead of ×10.

In decimal, each column is worth ten times the one to its right. In binary each column is worth twice as much. Read the columns, add up the ones you find:

1286432168421
01000001

Only the 64 and 1 columns are switched on, so 64 + 1 = 65.

4. Hex is shorthand for binary
One hex digit = one nibble = exactly 4 bits.

Long binary strings are painful to read, so we group them into nibbles and give each nibble a single symbol: 0–9 then A–F for ten to fifteen. That is hexadecimal.

0100 0001 → 4 1 → 0x41

Because the split is clean, converting between binary and hex needs no arithmetic at all — you just swap each group of four bits for its digit. A byte is always two hex digits, which is why colours look like #FF8800: three bytes, one per channel.

5. ASCII gives numbers a meaning
Text is just agreed-upon numbers.

A byte by itself means nothing. ASCII is a lookup table that says "if you are storing text, treat 65 as the letter A". Change the interpretation and the same bits become a number, a colour channel, or part of an instruction.

Decimal (base 10)
65
Binary (base 2)
0100 0001
Hex (base 16)
0x41
ASCII character
"A"

All four rows above describe the identical byte. Binary is how it is stored, hex is how we write it compactly, decimal is how we do maths with it, and ASCII is one possible meaning.

Ready to try it?
Use the converters to watch these rules apply to any value you like.