THE education site for computer science and ICT

# 1. Introduction

You should have already covered the idea of base systems, and looked at how to work with both denary and binary. If you haven't, CLICK HERE.

In this section, we will discuss a third base system that is commonly used in computer science: Hexadecimal (commonly abbreviated as "Hex").

Denary numbers are "base-10" because they use ten symbols, and binary is "base-2" because it uses two symbols. So hexadecimal, which uses sixteen symbols, is "base-16".

### Why use hexadecimal?

Hexadecimal is useful because it is much more readable to humans than binary, but at the same time it still shares a lot of the qualities of binary. It is widely used in computing because it is a much shorter way of representing a "byte" of data (8 binary digits or bits).

If we were to represent a byte of data in binary, it would require 8 digits, e.g. "10100110".

However, that same byte of data could be represented in hexadecimal in just two digits e.g. "A6". This is much more compact and user friendly than a binary number.

Since a byte is 8 digits long, it has a maximum value. In denary, this is 255. The same number can be written as 11111111 in binary, or FF in hex.