Digital Electronics

Binary, Octal, and Hexadecimal Number Systems: A Complete Guide for Electronics and Computer Engineering

September 14, 2026 · 6 min read

Introduction

Number systems are one of the fundamental concepts in digital electronics, computer engineering, programming, and embedded systems. We normally use the decimal number system in our daily lives. However, computers and digital electronic circuits work primarily with the binary number system, which uses only two digits: 0 and 1. To make binary numbers easier for humans to read and work with, engineers frequently use octal and hexadecimal number systems. Understanding these number systems is essential for students, programmers, electronics engineers, embedded-system developers, and anyone working with digital hardware.

In this article, we will learn:

  • What a number system is
  • Binary number system
  • Octal number system
  • Decimal number system
  • Hexadecimal number system
  • Place values and positional notation
  • Number-system conversions
  • Binary-to-octal conversion
  • Binary-to-hexadecimal conversion
  • Decimal conversion methods
  • Practical electronics applications
  • Bits, nibbles, bytes, and registers
  • Common mistakes
  • Frequently asked questions

What Is a Number System?

A number system is a method used to represent numerical values using a defined set of symbols and a particular base, also called a radix. The base determines how many different digits can be used in the number system. For example, the decimal system has a base of 10 and uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.

Number SystemBaseDigits Used
Binary20, 1
Octal80–7
Decimal100–9
Hexadecimal160–9, A–F

The most important number systems for digital electronics are binary and hexadecimal, while octal is also useful for understanding binary representation.

Understanding Positional Notation

Number systems use positional notation. The value of a digit depends on its position. Consider the decimal number: 583 Its value is: 5 × 10² + 8 × 10¹ + 3 × 10⁰ Therefore: 500 + 80 + 3 = 583. The same principle applies to binary, octal, and hexadecimal. For any base B, the positional values are: B⁰, B¹, B², B³,….This concept is the foundation for understanding number-system conversions.

Binary Number System

The binary number system is a base-2 number system. It uses only two digits: 0 and 1 Each binary digit is called a bit.

Binary is the fundamental number system used by digital computers and electronic systems.

Example: Consider:101101₂ The subscript 2 indicates that the number is binary.

Its place values are:

Position2⁵2⁴2³2²2¹2⁰
Value32168421
Digit101101

Therefore:

101101₂

= 1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 1×1

= 32 + 8 + 4 + 1

= 45₁₀

So:

101101₂ = 45₁₀

Why Do Digital Systems Use Binary?

Digital electronic circuits are designed around two distinct logic states. These are commonly represented as:

  • Logic 0 → LOW
  • Logic 1 → HIGH

At the physical level, these states are represented by different voltage ranges rather than necessarily exactly 0 V and 5 V. Transistors can operate as electronic switches, making two-state logic highly practical. This is why binary is used in:

  • CPUs
  • Microcontrollers
  • FPGA systems
  • Digital ICs
  • Memory devices
  • Digital communication
  • Embedded systems
  • Digital logic circuits

Therefore, binary is often described as the fundamental language of digital electronics.

Binary Counting

Binary counting follows the same concept as decimal counting, but only two digits are available.

Binary counting sequence

DecimalBinary
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001
101010
111011
121100
131101
141110
151111

After 1111₂, the next number is: 10000₂ which represents decimal 16.

Bits, Nibbles, and Bytes

Binary representation leads to several important terms used in electronics and computing. A bit is a single binary digit. It can have one of two values: 0 or 1

A group of 4 bits is called a nibble. Example: 1010

A group of 8 bits is called a byte. Example: 10101100

Therefore:

UnitNumber of Bits
Bit1
Nibble4
Byte8
2 Bytes16
4 Bytes32
8 Bytes64

These concepts are particularly important when working with microcontrollers, processors, memory, and communication protocols.

Octal Number System

The octal number system is a base-8 number system. It uses eight digits: 0, 1, 2, 3, 4, 5, 6, 7. The digits 8 and 9 do not exist in octal.

Example

Consider:725₈ Its value is: 7×8² + 2×8¹ + 5×8⁰

= 7×64 + 2×8 + 5

= 448 + 16 + 5

= 469₁₀

Therefore:

725₈ = 469₁₀

Why Is Octal Related to Binary?

Octal has a direct mathematical relationship with binary:8 = 2³ Therefore, one octal digit corresponds exactly to three binary bits.

OctalBinary
0000
1001
2010
3011
4100
5101
6110
7111

For example:

572₈ can be converted into binary:

5 → 101

7 → 111

2 → 010

Therefore:

572₈ = 101111010₂

This relationship makes binary-to-octal conversion very easy.

Hexadecimal Number System

The hexadecimal number system is a base-16 number system. It uses 16 symbols: 0–9 and A–F

The letters represent values greater than 9.

DecimalHexadecimal
00
11
22
33
44
55
66
77
88
99
10A
11B
12C
13D
14E
15F

Hexadecimal Place Values

2AF₁₆ The positional values are: 16², 16¹, 16⁰

Therefore:

2AF₁₆ = 2×16² + A×16¹ + F×16⁰

Since:

A = 10 and F = 15

we get:

= 2×256 + 10×16 + 15

= 512 + 160 + 15

= 687₁₀

Therefore:

2AF₁₆ = 687₁₀

Why Is Hexadecimal So Important?

Hexadecimal has a particularly useful relationship with binary: 16 = 2⁴

Therefore:

One hexadecimal digit represents exactly four binary bits. For example: A₁₆ = 1010₂ and: F₁₆ = 1111₂. This makes hexadecimal extremely useful for representing long binary values in a compact and readable format. For example: 11111111₂ can be written as: FF₁₆ Instead of eight binary digits, we only need two hexadecimal digits.

Binary-to-Decimal Conversion

To convert binary to decimal, multiply each binary digit by its corresponding power of 2. Consider: 110101₂ Write the positional values:

Digit110101
Power2⁵2⁴2³2²2¹2⁰

Therefore:

= 1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 1×1

= 32 + 16 + 4 + 1 = 53

Therefore:

110101₂ = 53₁₀

Decimal-to-Binary Conversion

The standard method is repeated division by 2. Let’s convert: 45₁₀

DivisionQuotientRemainder
45 ÷ 2221
22 ÷ 2110
11 ÷ 251
5 ÷ 221
2 ÷ 210
1 ÷ 201

Read the remainders from bottom to top: 101101₂ Therefore: 45₁₀ = 101101₂.

Binary-to-Octal Conversion

The shortcut is simple: Group binary digits into sets of three from right to left. Example: 110101101₂ Group the digits: 110 | 101 | 101 Now convert each group: 110 = 6, 101 = 5, 101 = 5 Therefore: 110101101₂ = 655₈

What if the number of bits is not divisible by 3?

Add zeros to the left. Example: 10101₂ Group: 010 | 101 Therefore: 010 = 2, 101 = 5 So: 10101₂ = 25₈.

Octal-to-Binary Conversion

This process is even easier. Replace every octal digit with its corresponding three-bit binary value. Example: 753₈

Convert:7 → 111, 5 → 101, 3 → 011 Therefore: 753₈ = 111101011₂.

Binary-to-Hexadecimal Conversion

For binary-to-hexadecimal conversion: Group the binary digits into sets of four from right to left.

Example: 101101101010₂ Group: 1011 | 0110 | 1010 Convert each group: 1011 = B, 0110 = 6, 1010 = A

Therefore: 101101101010₂ = B6A₁₆.

Hexadecimal-to-Binary Conversion

Replace each hexadecimal digit with its four-bit binary equivalent. Example: 3F7₁₆

Convert: 3 → 0011, F → 1111, 7 → 0111 Therefore: 3F7₁₆ = 001111110111₂. The leading zeros may be omitted when they are not required for a fixed-width representation.

Decimal-to-Octal Conversion

To convert decimal to octal, repeatedly divide by 8. Example: 125₁₀

125 ÷ 8 = 15 remainder 5
15 ÷ 8 = 1 remainder 7
1 ÷ 8 = 0 remainder 1

Read from bottom to top: 175₈ Therefore: 125₁₀ = 175₈.

Binary vs Octal vs Decimal vs Hexadecimal

FeatureBinaryOctalDecimalHexadecimal
Base281016
Digits0–10–70–90–9, A–F
Main useDigital systemsLegacy/specializedEveryday mathematicsComputing & electronics
Bits represented by one digit13Not fixed4
CompactnessLowMediumMediumHigh
Importance in embedded systemsVery HighLow–MediumHighVery High

Quick Reference Table

DecimalBinaryOctalHexadecimal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010

Conclusion

Binary, octal, decimal, and hexadecimal are four important number systems used in mathematics, computing, and electronics. Among them, binary is fundamental to digital hardware, because digital circuits operate using two logical states. Octal provides a compact representation of binary values in groups of three bits, while hexadecimal provides an even more convenient representation by grouping binary data into four-bit sections. For students and engineers working with digital electronics, microcontrollers, embedded systems, processors, FPGA systems, communication protocols, and hardware debugging, a strong understanding of these number systems is essential. Once you become comfortable with number-system conversions, concepts such as binary arithmetic, bit manipulation, registers, memory addressing, logic operations, microcontroller programming, and digital circuit design become much easier to understand. One final example to remember: 255₁₀ = 11111111₂ = 377₈ = FF₁₆ Different representations, same numerical value. That is the fundamental idea behind number systems.