HomeSignals › Hexadecimal

Hexadecimal

Inside a computer every letter is a number. Here is the number.

Watch a word turn into numbers

Four rows, one message. The letter you typed, the number the computer keeps, that number written in sixteens, and the same thing again as eight on-or-off switches.

Why sixteen?

We count in tens because we have ten fingers. A computer counts in twos because a switch is either on or off. Eight of those switches make a number up to 255, and writing that out as ones and noughts takes eight characters every time.

Sixteen is the compromise. One hex character stands for exactly four switches, so two characters cover all eight. It is the same trick as a resistor band or an airport code: the information has not changed, it is just written shorter.

After 9 we run out of digits, so the counting carries on with letters: A is ten, F is fifteen. That is the only strange part, and it is the part that makes hex look like a secret when it is not one.

Where you have already seen it

The colours on this site are hex: the red is E03B2C, which is three pairs meaning how much red, how much green, how much blue. The letter square on the front page cycles through hex for the same twenty-five letters. And the record groove page turns a sound wave into these very numbers.

The record groove Resistor bands Back to signals

Where it comes from

Inside every computer
Counting in sixteens because two is too long

We count in tens because of fingers. A machine counts in twos because a switch is on or off. Writing everything as ones and noughts is exact and unreadable, so hexadecimal splits the difference: one character for four switches. The colours on this site are written that way, and so is every colour on every screen you own.

Try it away from the screen

Open any drawing program, find the colour picker, and type a hex code straight in. FF0000 is red. Change one character and watch which part of the colour moves.