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.
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ⁿ.
| Bits | Name | Possible values | Range |
|---|---|---|---|
| 1 | Bit | 2 | 0 or 1 |
| 4 | Nibble | 16 | 0000–1111 (one hex digit) |
| 8 | Byte | 256 | 00000000–11111111 (0–255) |
| 16 | 2 bytes (word) | 65,536 | 0–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.
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:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
Only the 64 and 1 columns are switched on, so 64 + 1 = 65.
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.
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.
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.
Memory match game
Flip cards to pair up binary, hex, decimal and ASCII values that mean the same thing.
Take the quiz
Questions on binary, hex, ASCII and color codes with instant feedback and a score.
SQL playground
Query a real database in your browser — sample domains, or let AI build one with test data and practice tasks.