Number Systems in Digital Electronics: Binary, Octal & Hex

Learn binary, octal, decimal and hexadecimal number systems, conversions, arithmetic, complements and applications in digital electronics and embedded systems. Embedded Tech Development Academy (ETDA).

Number Systems in Digital Electronics: Binary, Octal and Hexadecimal

Introduction to Number Systems in Digital Electronics

Digital electronics forms the foundation of modern computers, microcontrollers, embedded systems, communication devices, processors, memory systems, and digital control applications. Unlike analog electronics, where signals vary continuously, digital systems process information using discrete logic states, typically represented by 0 and 1. These two states correspond to electrical conditions such as LOW and HIGH, making binary representation fundamental to digital hardware.

To store, process, transmit, and manipulate digital information efficiently, engineers use different number systems. The most important systems are decimal, binary, octal, and hexadecimal. Decimal is commonly used by humans, while binary is directly related to digital hardware. Octal and hexadecimal provide compact representations of long binary values.

Understanding number-system conversion, binary arithmetic, hexadecimal notation, positional notation, bits, bytes, logic levels, memory addresses, registers, and digital data representation is essential for students working with digital electronics and embedded programming.

For embedded engineers, number systems are not merely mathematical concepts. Hexadecimal values frequently appear while programming microcontrollers, registers, memory addresses, communication frames, timers, GPIO configurations, and peripheral control registers. Embedded Tech Development Academy (ETDA) helps learners develop these technical foundations through industry-oriented embedded systems education. Students looking for a Top Embedded Training Institute in Bangalore can build practical electronics and programming skills with assured placement support.

What Is a Number System?

Definition of Number System

A number system is a method of representing numerical values using a defined set of symbols and positional rules. Every number system has a base or radix, which determines the number of unique digits available.

Common Number Systems

  • Decimal – Base 10
  • Binary – Base 2
  • Octal – Base 8
  • Hexadecimal – Base 16
Positional Notation

The value of a digit depends on its position. For example:

452₁₀ = 4 × 10² + 5 × 10¹ + 2 × 10⁰

Therefore, positional notation is the mathematical foundation for representing numbers in digital systems.

Decimal Number System

Base and Digits

The decimal number system uses base 10 and contains ten digits:

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Decimal Representation

For example:

452₁₀ = 4 × 100 + 5 × 10 + 2 × 1

Decimal is primarily used for human-readable numerical representation and is commonly converted into binary or hexadecimal when working with digital hardware.

Binary Number System

Binary Representation

The binary number system uses base 2 and contains only two digits:

0 and 1

Each binary digit is called a bit.

Why Binary Is Used in Electronics

Digital circuits naturally operate using two distinguishable logic states.
BinaryDigital State
0LOW / OFF
1HIGH / ON
Binary Positional Values

Each binary position represents a power of 2.

For example:

1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰

= 8 + 0 + 2 + 1 = 11₁₀

Binary and Decimal Conversion

Binary to Decimal

Consider:

1101₂

Expansion:

1×2³ + 1×2² + 0×2¹ + 1×2⁰

= 8 + 4 + 0 + 1 = 13₁₀

Therefore:

1101₂ = 13₁₀

Decimal to Binary

Decimal-to-binary conversion uses repeated division by 2.

Example: Convert 13 to Binary

DivisionQuotientRemainder
13 ÷ 261
6 ÷ 230
3 ÷ 211
1 ÷ 201
Reading the Result

Reading the remainders from bottom to top gives:

13₁₀ = 1101₂

Binary Arithmetic and Complements

Binary Addition

The basic binary addition rules are:

ABSum
000
011
101
1110

Example

  1010
+ 0011
------
  1101
Binary Complements

The 1’s complement is obtained by inverting every bit.

1010 → 0101

The 2’s complement is obtained by adding 1 to the 1’s complement:

1010 → 0101 + 1 → 0110

Two’s complement representation is extensively used for signed integers, subtraction, negative numbers, and arithmetic operations inside processors and microcontrollers.

Octal Number System

Base-8 Representation

The octal number system uses base 8 and the digits:

0, 1, 2, 3, 4, 5, 6, 7

Binary Relationship

Because:

2³ = 8

every three binary bits correspond to one octal digit.

Binary to Octal Example

Convert:

101111₂

Group the bits:

101 111

Therefore:

101₂ = 5₈

111₂ = 7₈

So:

101111₂ = 57₈

Octal was particularly useful in older computing systems and remains valuable for understanding compact binary representation.

Hexadecimal Number System

Base-16 Representation

The hexadecimal number system uses base 16. Its digits are:

0–9 and A–F

The letters represent values 10 through 15.

HexadecimalDecimal
A10
B11
C12
D13
E14
F15

Why Hexadecimal Is Important

Since:

2⁴ = 16

four binary bits correspond to one hexadecimal digit. This makes hexadecimal highly convenient for representing machine data.

Binary to Hexadecimal

Convert:

10101111₂

Group into four bits:

1010 1111

1010 = A

1111 = F

Therefore:

10101111₂ = AF₁₆

Hexadecimal Conversion and Embedded Applications

Hexadecimal to Binary

Consider:

3C₁₆

Convert each hexadecimal digit:

3 = 0011

C = 1100

Therefore:

3C₁₆ = 00111100₂

Decimal to Hexadecimal

Convert 255 to hexadecimal:

255 ÷ 16 = 15 remainder 15

15 ÷ 16 = 0 remainder 15

Since 15 represents F:

255₁₀ = FF₁₆

Microcontroller Applications

Hexadecimal is extensively used in microcontroller programming, register configuration, memory addressing, debugging, machine-level programming, embedded C, and communication protocols.

Register Example
TMOD = 0x01;

Here, 0x indicates hexadecimal notation, while 01 is the hexadecimal value being assigned to the register.

Similarly:

PORT = 0xFF;

represents an 8-bit value where all bits are set to 1.

Comparison of Number Systems

Technical Comparison

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

Advantages

  • Binary: Directly represents digital logic states.
  • Octal: Provides compact three-bit binary representation.
  • Hexadecimal: Provides compact four-bit binary representation and is convenient for debugging.
Engineering Relevance

A strong understanding of these representations allows engineers to interpret register values, bit masks, memory locations, instruction codes, communication data, and hardware configurations more efficiently.

Applications in Digital Electronics and Embedded Systems

Binary Applications

Binary is fundamental to:

  • Logic gates
  • Flip-flops
  • Registers
  • Processors
  • Memory
  • Microcontrollers
  • Digital communication

Hexadecimal Applications

Hexadecimal is commonly used for:

  • Memory addresses
  • Embedded C programming
  • Microcontroller registers
  • Debugging
  • Machine code
  • Bit manipulation

Embedded Systems

In platforms such as 8051, LPC1768, ARM Cortex-M, and other microcontrollers, engineers frequently work with hexadecimal register values and binary bit fields.

Practical Importance

Understanding the relationship between binary and hexadecimal makes operations such as setting, clearing, toggling, masking, and testing individual bits easier during embedded software development.

Frequently Asked Questions

What is a number system in digital electronics?

A number system is a method of representing numerical information using a defined base and set of digits. Binary, decimal, octal, and hexadecimal are commonly used in digital systems.

Binary uses two states, 0 and 1, which correspond naturally to two distinguishable electrical logic states in digital circuits.

Hexadecimal represents four binary bits with a single digit, making long binary values easier to read, debug, and manipulate in microcontroller programming.

1’s complement is produced by inverting every binary bit. Two’s complement is obtained by adding 1 to the 1’s complement and is widely used for signed arithmetic.

Every hexadecimal digit represents exactly four binary bits because 16 equals 2⁴. For example, hexadecimal A corresponds to binary 1010.

Conclusion

Number systems are a fundamental part of digital electronics, computer architecture, embedded systems, microcontroller programming, digital communication, and hardware-level software development. Binary provides the basic representation used by digital circuits, while decimal provides a convenient human-readable format. Octal and hexadecimal provide more compact representations of binary information.

Understanding binary arithmetic, positional notation, decimal-to-binary conversion, binary-to-decimal conversion, octal conversion, hexadecimal conversion, 1’s complement, 2’s complement, bit representation, logic levels, and hexadecimal register notation enables engineers to understand how digital hardware represents and processes information.

For embedded engineers, these concepts become especially important when working with microcontroller registers, GPIO configuration, timers, memory addresses, bitwise operators, communication protocols, embedded C, processor architecture, and debugging tools. Embedded Tech Development Academy (ETDA) focuses on practical technical learning that helps students connect digital electronics concepts with real embedded-system development. Learners searching for a Top Embedded Training Institute in Bangalore can strengthen their embedded programming and electronics foundations while receiving assured placement support.

Building strong fundamentals in number systems is therefore an important step toward advanced topics such as microcontrollers, embedded C programming, computer architecture, RTOS, digital communication, and hardware-software interfacing. Embedded Tech Development Academy (ETDA) provides industry-oriented learning to help aspiring engineers develop these technical skills. For students seeking a Top Embedded Training Institute in Bangalore, combining theoretical understanding with practical projects and assured placement support can provide a stronger foundation for an embedded engineering career.

Author: ETDA Trainers
Experience: 10+ Years of Industry Experience in Embedded Systems, IoT, and Embedded C Programming