Beginner Topic 2 of 51 Computer Architecture & Logic
Hexadecimal and Octal
Compact base-16 and base-8 notations for binary data.
How it works
Hexadecimal is base 16, using digits 0 to 9 and A to F, and octal is base 8. Each hex digit stands for exactly four bits and each octal digit for three, so conversion to and from binary is a simple grouping with no arithmetic. This makes long bit patterns compact and readable for humans.
Where it is used
Memory addresses, color codes like #FF8800, MAC addresses, machine-code dumps and debugger output use hex. Unix file permissions such as 755 use octal. Programming languages mark them with prefixes like 0x and 0o.
Common pitfall
Leading-zero octal literals such as 010 equal 8 in some languages and surprise newcomers. Mixing up letter case or forgetting the base prefix causes misreads. Pad to full digits when comparing, and remember that hex is only a notation: the machine still stores binary.
Where it fits in the course
Hexadecimal and Octal is topic 2 of 51 in Computer Architecture & Logic, rated Beginner. It follows Binary Number System. The next topic is Two's Complement.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Computer Architecture & Logic quiz.
- Explore the Binary & Two's Complement visualizer: Flip bits and watch the number change.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Computer Architecture & Logic quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Hexadecimal and Octal?
Where do people use Hexadecimal and Octal?
What is the most common mistake with Hexadecimal and Octal?
What should I learn before this topic?
How can I practice it?
Is Hexadecimal and Octal hard to learn?
How long does it take to learn Hexadecimal and Octal?
Which topics are related to Hexadecimal and Octal?
What should I study after Hexadecimal and Octal?
Related topics
- Binary Number System (Computer Architecture & Logic)
- Two's Complement (Computer Architecture & Logic)
- Floating Point Representation (Computer Architecture & Logic)
- Character Encoding (Computer Architecture & Logic)