Back

The use of hex to represent binary

Introduction
We have seen that a hex number is simply a different way of representing a nibble, a group of 4 bits. But why use hex at all?

Using hex to represent binary
Writing out lots of bytes in binary takes a lot of space and mistakes can be made. It is also quite hard to read long patterns of ones and zeros compared to the much simpler hex codes that are in use.

    • One hex character represents a group of 4 bits, or a nibble.
    • 8 bits, or two nibbles, represents a byte.
    • 0000 0000 in binary is the same as 00 in hex.
    • 1111 1111 in binary is the same as FF in hex.
    • It is much easier to talk about and write down and use a pattern of hex codes than a pattern on ones and zeros e.g. D8 is easier to remember, say and use than 1101 1000.

Back