Hexadecimal is the other main number system used in computing. It works in tandem with the [binary number system](/Hardware/Binary/Binary_number_system.md) and provides an easier and more accessible means of working with long sequences of binary numbers.
## Hexadecimal place value
Unlike denary which uses base ten and binary which uses base two, hexadecimal uses base 16 as its place value.
> Each place in a hexadecimal number represents a power of 16 and each place can be one of 16 symbols.
## Hexadecimal values
The table below shows the symbols comprising hexadecimal alongside their denary and binary equivalents:
| Hexadecimal | Decimal | Binary |
| ----------- | ------- | ------ |
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |
This table shows the raw value of each hexadecimal place value:
| $16^{3}$ | $16^{2}$ | $16^{1}$ | $16^{0}$ |
| -------- | -------- | -------- | -------- |
| 4096 | 256 | 16 | 1 |
## Converting hexadecimal numbers
Using the previous table we can convert hexadecimal values to decimal.
For example we can convert `1A5` as follows, working from right to left:
Whilst computers themselves do not use the hexadecimal number system (everything is binary), hexadecimal offers advantages for humans who must work with binary:
1. It is much easier to read a hexadecimal number than long sequences of binary numbers
2. It is easier to quickly convert binary numbers to hexadecimal than to convert binary numbers to decimal
It is obvious that a pattern is maintained between the hexadecimal and binary numbers and that this pattern is obscured by the decimal conversion. In the first example the binary half-byte `1111` is matched by the hexadecimal `F00F`.
> Every four bits (or half byte) in binary corresponds to one symbol in hexadecimal. Therefore **a byte can be easily represented with two hexadecimal symbols, a 16-bit number can be represented with four hex symbols, a 32-bit number can represented with eight hex symbols and so on.**