Hexadecimal
Hex uses 16 digits to shorten binary.
About this topic
Hexadecimal is a base-16 number system using the digits 0 to 9 and the letters A to F, where A is 10 and F is 15. It is popular in computing because each hex digit represents exactly four bits, which makes long binary numbers short and easier to read.
To convert, group the binary digits in fours from the right. For example, 1010 1111 becomes A and F, so the byte is AF in hex, which is 10 times 16 plus 15 equals 175 in decimal. Hex place values are powers of 16: 1, 16, 256 and so on. One byte is always exactly two hex digits, from 00 to FF.
You meet hex in web colours such as #FF0000, where the pairs show red, green and blue amounts from 00 to FF, so FF0000 is full red with no green or blue. It also appears in memory addresses, error codes and MAC addresses. A common misconception is that hex is a different kind of data; it is only a convenient way of writing the same numbers. Another is forgetting that letters are digits, so 1F is thirty-one, not a word.
Key ideas
- 0–9 and A–F
- One hex digit = 4 bits
- Colours like #FF0000
Quick check
Use cases: where Hexadecimal helps
- Homework: review the key idea behind Hexadecimal before you start a problem set.
- Exam revision: use the quick check to test whether you can recall Hexadecimal without notes.
- Visual learning: play with the interactive lab to see how Hexadecimal changes when you adjust its inputs.
- Teaching a friend: explain Hexadecimal in your own words, then compare your version with the key ideas.
Computing ideas run phones, search engines, games and the wider internet.
Frequently asked questions
What is Hexadecimal?
Hex uses 16 digits to shorten binary.
What will I learn in Hexadecimal?
0–9 and A–F. One hex digit = 4 bits. Colours like #FF0000.
Is Hexadecimal part of Computer Science?
Yes. It is one of 80 Computer Science topics on LearnViz HighSchoolEdu, with 3 key ideas, a live animation and a quick check.
Does the Hexadecimal lab work on a phone or tablet?
Yes. The animation resizes to fit your screen and supports touch, so you can drag, tap and slide with your finger.
How should I study Hexadecimal?
Read the summary and key ideas first, play with the interactive lab to see the idea in motion, then answer the quick check. If you get a question wrong, go back to the key idea it tests.
Do I need an account, and is my progress saved?
No account is needed. Marking a topic as learned is saved in your own browser, so it stays on that device and is not sent to a server.