💻 Computer Science · Topic 11 of 97

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.

Loading animation…

📘 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

Common mistakes to avoid

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.

← PreviousConverting Binary and DecimalNext →Binary Arithmetic

Keep exploring Computer Science