Hexadecimal gives you a better way to represent binary numbers. In one of the very early episodes, I explained how bytes are composed of eight bits. On some platforms, a byte might actually be more than eight bits. The real problem though is even eight bits are hard to read. The zeros and ones blend together. Hexadecimal allows you to work with four bits at a time and is much easier to read.

Here’s table of some common values:

Decimal Binary Hexadecimal
0
00000000
0x00
1
00000001
0x01
2
00000010
0x02
3
00000011
0x03
4
00000100
0x04
5
00000101
0x05
6
00000110
0x06
7
00000111
0x07
8
00001000
0x08
9
00001001
0x09
10
00001010
0x0a
11
00001011
0x0b
12
00001100
0x0c
13
00001101
0x0d
14
00001110
0x0e
15
00001111
0x0f
16
00010000
0x10
32
00100000
0x20
64
01000000
0x40
128
10000000
0x80
255
11111111
0xff