# Hexadecimal Numbers and Conversions

Hexadecimal (hex) is a base-16 number system that provides a more compact representation of binary data. This section explains hexadecimal numbers and how to convert between hex, binary, and denary.

**Definition**: Hexadecimal is a base-16 number system using digits 0-9 and letters A-F to represent values 0-15.

A single hex digit (nibble) can represent any number from 0 to 15, making it more concise than binary. Two hex digits can represent an 8-bit binary number.

**Example**: Hexadecimal to binary conversion table:

| Hex | Binary |
|-----|--------|
| 0-9 | 0000-1001 |
| A-F | 1010-1111 |

To convert **hex to denary**, use a table with powers of 16 (16^2, 16^1, 16^0). Multiply each hex digit by its corresponding power of 16 and sum the results.

**Example**: Hex 69 to denary: (6 x 16) + (9 x 1) = 96 + 9 = 105

For **denary to hex** conversion, divide the denary number by 16 repeatedly, keeping track of remainders which become the hex digits.

**Hex to binary** conversion involves converting each hex digit to its 4-bit binary equivalent and concatenating the results.

**Example**: Hex 1E to binary: 1 = 0001, E = 1110, so 1E = 00011110

Understanding these conversion methods is crucial for working with different number systems in computer science and digital electronics.