Hexadecimal
Hexadecimal is a base 16 system using digits 0 to 9 and letters A to F, a compact way to write binary numbers.
▶ Interact
Play with the controls to see the idea in action.
📘 Learn
Hexadecimal is a base 16 system using digits 0 to 9 and letters A to F, a compact way to write binary numbers.
- One hex digit equals four bits
- F in hex is 15 in decimal
- Used for colours and memory addresses
🧠 Quick quiz
Three questions. Score 2 or more to complete the topic.
What is Hexadecimal?
Within Computer Science, which covers algorithms, programming, data, networks, hardware and safe, responsible use of technology, this topic explains Hexadecimal. Computing topics explain how software, hardware and data work, with diagrams and models that show each step in order.
Check that you can explain Hexadecimal in your own words and give one example from everyday life. If you can do that, you have understood the core idea.
Understanding Hexadecimal helps you design, test and explain programs, websites and systems, from small projects to exam questions.
Hexadecimal in detail
Hexadecimal (hex) is a base-16 system using the digits 0–9 and letters A–F (A = 10 ... F = 15). One hex digit represents exactly four bits (a nibble), so a byte is two hex digits, making long binary strings shorter and easier for people to read.
To convert binary to hex, split into groups of four bits: 1010 1111 = AF. To convert hex to decimal, multiply each digit by powers of 16: AF = 10 × 16 + 15 = 175. Hex is used for colour codes in web design (#FF0000 is red), memory addresses and MAC addresses.
How the interactive helps you understand Hexadecimal
Watch the binary display in the interactive. Use any sliders or buttons it offers to change the values and see how the binary display responds.
Before you change anything, predict the result. Then change one value at a time and check whether your prediction was right. This is a quick way to build a correct mental model of Hexadecimal.
Real-life uses and examples
- Recognise Hexadecimal in an app or device you use every day.
- Apply Hexadecimal when you design a small program, website or spreadsheet.
- Explain Hexadecimal to someone new to computing by comparing it to a familiar process.
Common mistakes to avoid
- Using the term without being able to say what the computer actually does.
- Testing only the normal case and forgetting the edge cases.
- Learning the definition without testing it. Use the quiz and the interactive to check that you can apply the idea.
Frequently asked questions about Hexadecimal
What is Hexadecimal?
Hexadecimal is a base 16 system using digits 0 to 9 and letters A to F, a compact way to write binary numbers.
What are the most important points about Hexadecimal?
The main points are: One hex digit equals four bits; F in hex is 15 in decimal; Used for colours and memory addresses.
Why is Hexadecimal useful?
Understanding Hexadecimal helps you design, test and explain programs, websites and systems, from small projects to exam questions.
How can I practise Hexadecimal?
Open the interactive at the top of this page and change the controls one at a time. Predict the result before each change, then take the three-question quiz. A score of two or more marks the topic as complete on this device.
Which topics are related to Hexadecimal?
Related topics in Computer Science include Units of Data, Truth Tables, Pseudocode.