Grouped into nibbles (4-bit groups)
Every four bits (one nibble) map to exactly one hexadecimal digit. That is how a binary number is read quickly as hex.
Explained with a place-value breakdown — reference tables, charts, and a live converter.
128 in binary is 10000000 (0b10000000).
1. Divide by the base repeatedly
Divide 128 by 2 again and again, noting the remainder each time:
2. Collect the remainders
128 ÷ 2 = 64, remainder 0 · 64 ÷ 2 = 32, remainder 0 · 32 ÷ 2 = 16, remainder 0 · 16 ÷ 2 = 8, remainder 0 · 8 ÷ 2 = 4, remainder 0 · 4 ÷ 2 = 2, remainder 0 · 2 ÷ 2 = 1, remainder 0 · 1 ÷ 2 = 0, remainder 1
3. Read the remainders bottom to top
Reading the remainders from bottom to top gives 10000000 — that is 128 in binary.
Each digit of 10000000 is multiplied by its place value (a power of 2); the sum is 128 (in decimal).
| Digit | Place value | Contribution |
|---|---|---|
| 1 | 27 = 128 | 1 × 128 = 128 |
| 0 | 26 = 64 | 0 × 64 = 0 |
| 0 | 25 = 32 | 0 × 32 = 0 |
| 0 | 24 = 16 | 0 × 16 = 0 |
| 0 | 23 = 8 | 0 × 8 = 0 |
| 0 | 22 = 4 | 0 × 4 = 0 |
| 0 | 21 = 2 | 0 × 2 = 0 |
| 0 | 20 = 1 | 0 × 1 = 0 |
| Sum | 128 |
Every four bits (one nibble) map to exactly one hexadecimal digit. That is how a binary number is read quickly as hex.
| Number base | Representation | With prefix |
|---|---|---|
| Binary | 10000000 | 0b10000000 |
| Octal | 200 | 0o200 |
| Decimal | 128 | — |
| Hexadecimal | 80 | 0x80 |
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
| Power | In binary | Decimal value |
|---|---|---|
| 20 | 1 | 1 |
| 21 | 10 | 2 |
| 22 | 100 | 4 |
| 23 | 1000 | 8 |
| 24 | 10000 | 16 |
| 25 | 100000 | 32 |
| 26 | 1000000 | 64 |
| 27 | 10000000 | 128 |
| 28 | 100000000 | 256 |
| 29 | 1000000000 | 512 |
| 210 | 10000000000 | 1024 |
| 211 | 100000000000 | 2048 |
| 212 | 1000000000000 | 4096 |
A number base (radix) defines how many digits are used and what each position is worth. Decimal uses ten digits and powers of ten, binary uses just two digits and powers of two, and hexadecimal uses sixteen digits and powers of sixteen.
The value itself never changes — only how it is written. These conversions are pure integer math and exact: 255 is always 0xFF.
Hex appears everywhere in computing: CSS color codes, memory addresses, MAC addresses, and byte values. One byte (8 bits) fits exactly into two hex digits (00–FF), i.e. 0 to 255.
128 in binary is 10000000 (0b10000000).
Repeatedly divide 128 by 2 and read the remainders from bottom to top — that gives 10000000. The place-value table above shows each step.
128 is 0b10000000 in binary and 0x80 in hexadecimal.
Hexadecimal (base 16) is compact: each hex digit maps to exactly four bits (one nibble). That is why color codes, memory addresses, and byte values are almost always written in hex — 255 is FF, far shorter than 11111111.
Yes. Converting between number bases is pure integer math and perfectly exact — the same value, just written a different way. 255 is always 0xFF.
Convert more
The number base converter covers binary, octal, decimal, and hexadecimal with an exact place-value breakdown.