Custom Search

Hex(adecimal) coding

Binary is the code that computers need input to their circuitry as that corresponds to 'on' and 'off' electrical signals. Binary numbers are very long... even low values have lots of digits. That makes their input into a computer tedious - not to mention confusing.

101110101000001010100011100101000001

is difficult to enter correctly - you can easily lose your place.

To make it easier we can separate the 1s and 0s into groups of four:

1011 1010 1000 0010 1010 0011 1001 0100 0001

We still have a lot of digits to enter, but are now less likely to make a mistake. Spaces cannot be entered into a computer, so we still have a problem.

It would be useful if we could replace each of these four digit blocks with one single digit... and that is what hexadecimal code allows us to do. Hexadecimal means sixteen (hex is six and deci is ten). The base sixteen needs sixteen symbols - we use the 0123456789 from decimal and add abcdef from the alphabet!

binary code
hexadecimal code
decimal value
0000
0
0
0001
1
1
0010
2
2
0011
3
3
0100
4
4
0101
5
5
0110
6
6
0111
7
7
1000
8
8
1001
9
9
1010
a
10
1011
b
11
1100
c
12
1101
d
13
1110
e
14
1111
f
15

1011 1010 1000 0010 1010 0011 1001 0100 0001

becomes ba82a3941

...much easier to copy and transpose accurately!