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.
120 in binary is 1111000 (0b1111000).
1. Divide by the base repeatedly
Divide 120 by 2 again and again, noting the remainder each time:
2. Collect the remainders
120 ÷ 2 = 60, remainder 0 · 60 ÷ 2 = 30, remainder 0 · 30 ÷ 2 = 15, remainder 0 · 15 ÷ 2 = 7, remainder 1 · 7 ÷ 2 = 3, remainder 1 · 3 ÷ 2 = 1, remainder 1 · 1 ÷ 2 = 0, remainder 1
3. Read the remainders bottom to top
Reading the remainders from bottom to top gives 1111000 — that is 120 in binary.
Each digit of 1111000 is multiplied by its place value (a power of 2); the sum is 120 (in decimal).
| Digit | Place value | Contribution |
|---|---|---|
| 1 | 26 = 64 | 1 × 64 = 64 |
| 1 | 25 = 32 | 1 × 32 = 32 |
| 1 | 24 = 16 | 1 × 16 = 16 |
| 1 | 23 = 8 | 1 × 8 = 8 |
| 0 | 22 = 4 | 0 × 4 = 0 |
| 0 | 21 = 2 | 0 × 2 = 0 |
| 0 | 20 = 1 | 0 × 1 = 0 |
| Sum | 120 |
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 | 1111000 | 0b1111000 |
| Octal | 170 | 0o170 |
| Decimal | 120 | — |
| Hexadecimal | 78 | 0x78 |
| 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.
120 in binary is 1111000 (0b1111000).
Repeatedly divide 120 by 2 and read the remainders from bottom to top — that gives 1111000. The place-value table above shows each step.
120 is 0b1111000 in binary and 0x78 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.