Hexadecimal (Edexcel GCSE Computer Science): Revision Notes
Hexadecimal
What is hexadecimal?
Hexadecimal (often called "hex") is a number system that helps programmers work with large binary numbers more easily. Instead of dealing with long strings of 1s and 0s, hex allows us to represent the same information using much shorter sequences.
The key advantage is that every group of 4 binary digits (called a nibble) can be represented by just one hexadecimal digit. This means 8 binary digits can be written as just 2 hexadecimal digits, making binary numbers much more manageable for humans to read and write.
Hexadecimal uses 16 different symbols:
- Numbers 0-9 (same as decimal)
- Letters A-F (where A=10, B=11, C=12, D=13, E=14, F=15)
Converting binary to hexadecimal
Converting from binary to hex follows a simple three-step process:
Step 1: Split the binary number into groups of 4 bits (nibbles), starting from the right.
Step 2: Convert each nibble to its decimal value using place values (8, 4, 2, 1).
Step 3: Convert each decimal value to its hexadecimal equivalent and combine them.
Worked Example: Converting Binary 1011 0011 to Hexadecimal
Step 1: Split into nibbles: 1011 | 0011
Step 2: Convert each nibble:
- Left nibble (1011):
- Right nibble (0011):
Step 3: Convert to hex:
- 11 in decimal = B in hexadecimal
- 3 in decimal = 3 in hexadecimal
- Therefore: 1011 0011 in binary = B3 in hexadecimal
Converting hexadecimal to binary
Converting from hex to binary reverses the process we just learned:

Step 1: Convert each hexadecimal digit to its decimal equivalent.
Step 2: Convert each decimal number into a 4-bit binary nibble.
Step 3: Combine the nibbles to create the final binary number.
Worked Example: Converting Hexadecimal C3 to Binary
Step 1: Convert to decimal:
- C = 12 in decimal
- 3 = 3 in decimal
Step 2: Convert to 4-bit binary:
- in binary
- in binary
Step 3: Combine the nibbles: 1100 0011
Real-world uses of hexadecimal
Error codes and debugging
When computers malfunction, error codes are often displayed in hexadecimal format. This makes it easier for programmers and technicians to identify specific problems quickly, as hex codes are shorter and more memorable than their binary equivalents.
Assembly language programming
Hexadecimal is commonly used in low-level programming languages like assembly language. Programmers use hex to represent memory addresses, instruction codes, and data values because it's much more readable than pure binary.
Colour coding systems
True colour systems use 24 bits to represent every possible colour variation, giving us different colours. Each colour is represented by three 8-bit numbers (for red, green, and blue components), which can be simplified to three 2-digit hexadecimal values.
For example, the colour with binary value 1100 0110 0001 1111 0100 can be written as C63F04 in hexadecimal. This hex code is much easier to remember and type than the 24-digit binary equivalent!
Quick practice example
Try converting the 8-bit binary number 1011 0111 to hexadecimal:
- Split into nibbles: 1011 | 0111
- Convert to decimal: 11 | 7
- Convert to hex: B | 7
- Answer: B7
Exam Tips:
- Always split binary numbers into groups of 4 bits when converting to hex
- Remember that each hex digit represents exactly 4 binary digits
- Practice the hex digits A-F and their decimal equivalents (A=10, B=11, C=12, D=13, E=14, F=15)
- When converting from hex to binary, make sure each hex digit becomes exactly 4 binary digits (pad with leading zeros if needed)
Key Points to Remember:
- Hexadecimal makes binary numbers easier to read - 8 binary digits become just 2 hex digits
- Each hex digit represents exactly 4 binary digits (one nibble)
- Hex uses digits 0-9 and letters A-F to represent values 0-15
- Convert via decimal - binary ↔ decimal ↔ hexadecimal is often the easiest path
- Hex is everywhere in computing - from error codes to colour values to memory addresses