Decimal To Binary
Enter a decimal value from 0 to 255 to see its binary and hexadecimal forms.
Decimal
42
Binary
00101010
Hex
2A
Base-2
Binary uses only `0` and `1`, making it the native language of digital systems. Every byte, flag, permission bit, and machine instruction starts from this idea.
Enter a decimal value from 0 to 255 to see its binary and hexadecimal forms.
Decimal
42
Binary
00101010
Hex
2A
Each position in a byte represents a power of two.
2
7
128
2
6
64
2
5
32
2
4
16
2
3
8
2
2
4
2
1
2
2
0
1
Storage and memory are measured in bytes, and each byte is just eight binary positions.
Read, write, execute, flags, and masks are often toggled as individual binary states.
IPv4 masks, subnetting, and packet flags become much easier once binary place values make sense.
Binary helps explain how processors, memory, file formats, and encodings are represented under the hood.
| Decimal | Binary | Hex |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| 10 | 1010 | A |
| 11 | 1011 | B |
| 12 | 1100 | C |
| 13 | 1101 | D |
| 14 | 1110 | E |
| 15 | 1111 | F |