Mastering Circuits – Introduction to Digital Systems and Number Systems (15 Solved Problems)

Mastering Circuits
Mastering Circuits!

In the world of Electrical Engineering and Physics, understanding how computers “Think” starts with Digital Systems. Whether you are are an aspiring engineer or a self-learner, mastering Number Systems is the first step toward understanding modern technology. Learn these concepts with Mastering Circuits.

Introduction

Computers and Microcontrollers are the physical systems that bring the math of digital logic to life.

Figure 1 – (a) Computer, (b) MicroController

Before we can understand how computers calculate or how microcontrollers work, we need to understand the fundamental environment they operate in.

The world around us, sound, light, temperature, is naturally “Analog”. Yet, the technology we use to interact with the world is almost entirely “Digital”.

While we naturally perceive and count the world using the ten digits of the decimal number system, the core of every digital processor operates on the simple logic of ‘ON’ and ‘OFF’. To bridge this gap, we use Number Systems such as Binary, Octal, and Hexadecimal.

System

In engineering and science, a system is defined as a collection of interconnected components working together to achieve a specific goal or perform a defined task.

Almost every system follows a basic block diagram structure: it takes an Input, performs a Process on that input, and generates an Output.

In general, we can say that a system transforms inputs into desired outputs.

Examples of Systems:

Systems exist everywhere, not just in electronics.

  • Biological Example: The Human Digestive System.
    • Input: Food and water.
    • Process: Break down nutrients in the stomach and intestines.
    • Output: Energy for the body and waste products.
  • Electronic Example: An Audio Amplifier.
    • Input: Weak electrical signal from a microphone.
    • Process: Increasing the voltage and current of the signal using transistors.
    • Output: A strong signal that drives a loudspeaker.

Figure 2 – A simple block diagram of System

Analog Signal

An Analog System processes signals that are continuous.

A continuous signal means the value can change smoothly and can take any value within a given range. There are no breaks or jumps in the data. The physical world is mostly analog.

Figure 3 – Graph of an analog continuous sine wave signal

Examples of Analog Systems:

  • The Human Voice & Microphones: When we speak, we create sound waves that vary continuously in pressure. An analog microphone converts this directly into a continuously varying electrical voltage.
  • Mercury Thermometer: As temperature rises, the mercury expands smoothly up the tube. It doesn’t jump from 20\degree \ C straight to 21\degree \ C . It passes through 20.1 , 20.2 , etc.
Digital Signal

A Digital System processes signals that are discrete or discontinuous.

A discrete signal means the data can only exist in specific, distinct states or “steps”. In modern digital electronics, we use a Binary System, which means there are only two allowed states:

  • Logic 1 (HIGH): Ususally represents presence of voltage (e.g., 5 \ V ).
  • Logic 0 (LOW): Usually represents absence of voltage (e.g., 0 \ V ).

Figure 4 – Graph of a digital discrete square wave signal showing only high and low states

Examples of Digital Systems:

  • Computers and Smartphones: At their core, the CPUs in these devices only understand billions of 1 s and 0 s.
  • Digital Watches: Unlike an analog clock with sweeping hands, a digital watch displays the exact time in numbers (e.g., 10:45 becomes 10:46 instantly, without showing the seconds in between).
Why Digital System is Needed Over the Analog System?

If the real world is analog, why do engineers go through the trouble of converting everything to digital?

While analog systems are sometimes simpler, Digital Systems offer massive advantages that make modern technology possible.

Key Advantages of Digital Systems:

  • Noise Immunity: Analog signals are easily corrupted by “Noise” (unwanted electrical interference). If an analog signal representing 5.0 \ V gets noise added to it and becomes 5.2 \ V , the system misinterprets the data. In a digital system, if a “Logic 1 ” (let’s say 5 \ V ) gets noise and becomes 4.5 \ V or 5.5 \ V , the system is designed to still recognize it as “Logic 1 .” Digital signals are very robust against interference.

  • Easier Storage: Storing continuous analog data precisely is very difficult. Storing digital data (a sequence of 1s and 0s) is easy, reliable, and lasts longer.

  • Accuracy and Precision: Analog systems degrade over time as components age, affecting accuracy. Digital systems maintain exact precision as long as the 1s and 0s are read correctly.

  • Programmability: We cannot easily change how an analog circuit behaves once it is built. Digital systems, however, rely on software. We can completely change the function of a smartphone just by updating its app, without changing the hardware.
Number Systems

In digital electronics, a Number System is a mathematical framework used to represent and quantify information. While humans typically use ten fingers to count, digital systems use various “Bases” to process and store data efficiently.

The most important feature of any number system is its Base (also called the Radix). The Base determines the total number of unique symbols or digits available in that system.

Primarily, there are 4 types of Number Systems:

  • Decimal Number System (Base 10):
    • Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
    • Context: This is the “Human Language” of numbers. We use it for currency, measurements, and daily counting.
  • Binary Number System (Base 2):
    • Digits: 0, 1
    • Context: The fundamental language of computers. A “0” represents a Low voltage state, and a “1” represents a High voltage state.
  • Octal Number System (Base 8):
    • Digits: 0, 1, 2, 3, 4, 5, 6, 7
    • Context: Often used as a shorthand for binary in older computing systems because it groups three binary bits into one digit.
  • Hexadecimal Number System (Base 16):
    • Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and A, B, C, D, E, F
    • Context: Extremely important in modern engineering for representing memory addresses and color codes. One “Hex” digit represents exactly four binary bits.

Conversion between these Number Systems is the bridge that allows humans to communicate with machines. Without it, the interface between our world and the digital world would be non-existent.

Conversion between Number Systems

Understanding how to convert between different number systems is like learning how to translate between languages. While we use Decimal (Base 10) in our daily lives, computers speak in Binary (Base 2), and programmers often use Hexadecimal (Base 16) as a shorthand.

We will convert:

  • Decimal \iff Binary, Octal, Hexadecimal
  • Octal, Hexadecimal \iff Binary
  • Octal \iff Hexadecimal

Conversion from Decimal to Binary, Octal, Hexadecimal

\small \begin{aligned} \begin{matrix} \text{Decimal} \\ (10) \end{matrix} \longrightarrow \left\{ \begin{aligned} &\longrightarrow \text{Binary (2)} \\ &\longrightarrow \text{Octal (8)} \\ &\longrightarrow \text{Hexadecimal (16)} \end{aligned} \right. \end{aligned}

Rule:

For the Integer Part: Successively divide the number by the Base of the target number system and record the remainders.

For the Fractional Part: Successively multiply the fractional part by the Base of the target number system and record the integers produced.

Problem 1

Pb-1: (153.6875)_{10} = (?)_{2}

Solution:

For the Integer part:

\therefore (153)_{10} = (10011001)_{2}

For the Fractional part:

\therefore (.6875)_{10} = (.1011)_{2}

Therefore, \small \begin{aligned} (153.6875)_{10} = (10011001.1011)_{2} \end{aligned}

Problem 2

Pb-2: (153.513)_{10} = (?)_{8}

Solution:

For the Integer part:

\therefore (153)_{10} = (231)_{8}

For the Fractional part,

\therefore (.513)_{10} = (.406)_{8}

Therefore, \small \begin{aligned} (153.513)_{10} = (231.406)_{8} \end{aligned}

Problem 3

Pb-3: (512.3125)_{10} = (?)_{16}

Solution:

For the Integer part:

\therefore (512)_{10} = (200)_{16}

For the Fractional part,

\therefore (.3125)_{10} = (.5)_{16}

Therefore, \small \begin{aligned} (512.3125)_{10} = (200.5)_{16} \end{aligned}

Problem 4

Pb-4: (191.9375)_{10} = (?)_{16}

Solution:

For the Integer part:

\therefore (191)_{10} = (BF)_{16}

For the Fractional part,

\therefore (.9375)_{10} = (.F)_{16}

Therefore, \small \begin{aligned} (191.9375)_{10} = (BF.F)_{16} \end{aligned}

Conversion from Binary, Octal, Hexadecimal to Decimal

\small \begin{aligned} \left. \begin{aligned} &\text{Binary (2)} \longrightarrow \\ &\text{Octal (8)} \longrightarrow \\ &\text{Hexadecimal (16)} \longrightarrow \end{aligned} \right\} \longrightarrow \begin{matrix} \text{Decimal} \\ (10) \end{matrix} \end{aligned}

Rule:

Multiply each digit by the Base of the source number system raised to its positional Power and sum the results.

Problem 5

Pb-5: (11011.101)_{2} = (?)_{10}

Solution:

\scriptsize \begin{aligned} &(1 \times 2^4) + (1 \times 2^3) + (0 \times 2^2) + (1 \times 2^1) + (1 \times 2^0) + \\&(1 \times 2^{-1}) + (0 \times 2^{-2}) + (1 \times 2^{-3}) \\ &= 27.625 \end{aligned}

Therefore, \small \begin{aligned} (11011.101)_{2} = (27.625)_{10} \end{aligned}

Problem 6

Pb-6: (123.540)_{8} = (?)_{10}

Solution:

\small \begin{aligned} &(1 \times 8^2) + (2 \times 8^1) + (3 \times 8^0) + \\&(5 \times 8^{-1}) + (4 \times 8^{-2}) + (0 \times 8^{-3}) \\ &= 83.6875 \end{aligned}

Therefore, \small \begin{aligned} (123.540)_{8} = (83.6875)_{10} \end{aligned}

Problem 7

Pb-7: (B5D.48)_{16} = (?)_{10}

Solution:

\small \begin{aligned} &(B \times 16^2) + (5 \times 16^1) + (D \times 16^0) + \\&(4 \times 16^{-1}) + (8 \times 16^{-2}) \\ &= 2909.28125 \end{aligned}

Therefore, \small \begin{aligned} (B5D.48)_{16} = (2909.28125)_{10} \end{aligned}

Conversion from Decimal to Binary and Binary to Decimal

Decimal \iff Binary

\small \begin{aligned} \begin{matrix} 2^9 & 2^8 & 2^7 & 2^6 & 2^5 & 2^4 & 2^3 & 2^2 & 2^1 & 2^0 \\ \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow \\ 512 & 256 & 128 & 64 & 32 & 16 & 8 & 4 & 2 & 1 \end{matrix} \end{aligned}

Problem 8

Pb-8: (107)_{10} = (?)_{2}

Solution:

\small \begin{aligned} \begin{matrix} 64 & 32 & 16 & 8 & 4 & 2 & 1 \\ \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow \\ 1 & 1 & 0 & 1 & 0 & 1 & 1 \end{matrix} \end{aligned} \therefore (107)_{10} = (1101011)_{2}

Problem 9

Pb-9: (1011011)_{2} = (?)_{10}

Solution:

\small \begin{aligned} \begin{matrix} 1 & 0 & 1 & 1 & 0 & 1 & 1 \\ \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow & \downarrow \\ 64 & 0 & 16 & 8 & 0 & 2 & 1 \end{matrix} \end{aligned} \therefore (1011011)_{2} = (91)_{10}

Conversion from Octal, Hexadecimal to Binary and Binary to Octal, Hexadecimal

Octal, Hexadecimal \iff Binary

Problem 10

Pb-10: (254.633)_{8} = (?)_{2}

Solution:

Here, \small \begin{aligned} \begin{array}{ccc} 4 & 2 & 1 \\ \hline 0 & 1 & 0 \\ 1 & 0 & 1 \\ 1 & 0 & 0 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{array} \begin{array}{l} \\ \longrightarrow 2 \\ \longrightarrow 5 \\ \longrightarrow 4 \\ \longrightarrow 6 \\ \longrightarrow 3 \end{array} \end{aligned}

\small \begin{aligned} \begin{matrix} 2 & 5 & 4 & . & 6 & 3 & 3 \\ \downarrow & \downarrow & \downarrow & & \downarrow & \downarrow & \downarrow \\ 010 & 101 & 100 & . & 110 & 011 & 011 \end{matrix} \end{aligned} \therefore (254.633)_{8} = (010101100.110011011)_{2}

Problem 11

Pb-11: (AB8D.0F)_{16} = (?)_{2}

Solution:

Here, \small \begin{aligned} \begin{array}{cccc} 8 & 4 & 2 & 1 \\ \hline 1 & 0 & 1 & 0 \\ 1 & 0 & 1 & 1 \\ 1 & 0 & 0 & 0 \\ 1 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 \end{array} \begin{array}{l} \\ \longrightarrow A \\ \longrightarrow B \\ \longrightarrow 8 \\ \longrightarrow D \\ \longrightarrow 0 \\ \longrightarrow F \end{array} \end{aligned}

\small \begin{aligned} \begin{matrix} A & B & 8 & D & . & 0 & F \\ \downarrow & \downarrow & \downarrow & \downarrow & & \downarrow & \downarrow \\ 1010 & 1011 & 1000 & 1101 & . & 0000 & 1111 \end{matrix} \end{aligned} \scriptsize \therefore (AB8D.0F)_{16} = (1010101110001101.00001111)_{2}

Problem 12

Pb-12: (1111011.1101)_{2} = (?)_{8}

Solution:

\small \begin{aligned} \quad \underline{\\ \ \\ \ \\ \ \\ \ \\ \ 1} \quad \underline{1 \ 1 \ 1} \quad \underline{0 \ 1 \ 1} \, . \, \underline{1 \ 1 \ 0} \quad \underline{1 \ \quad} \end{aligned}

Here, \small \begin{aligned} \begin{array}{ccc} 4 & 2 & 1 \\ \hline 0 & 0 & 1 \\ 1 & 1 & 1 \\ 0 & 1 & 1 \\ 1 & 1 & 0 \\ 1 & 0 & 0 \end{array} \begin{array}{l} \\ \longrightarrow 1 \\ \longrightarrow 7 \\ \longrightarrow 3 \\ \longrightarrow 6 \\ \longrightarrow 4 \end{array} \end{aligned}

\small \begin{aligned} \begin{matrix} 001 & 111 & 011 & . & 110 & 100 \\ \downarrow & \downarrow & \downarrow & & \downarrow & \downarrow \\ 1 & 7 & 3 & . & 6 & 4 \end{matrix} \end{aligned} \therefore (1111011.1101)_{2} = (173.64)_{8}

Problem 13

Pb-13: (10110101100.1101001)_{2} = (?)_{16}

Solution:

\small \begin{aligned} \quad \underline{\\ \ \\ \ \\ \ 1 \ 0 \ 1} \quad \underline{1\ 0 \ 1 \ 0} \quad \underline{1\ 1 \ 0 \ 0} \, . \, \underline{1 \ 1 \ 0 \ 1} \quad \underline{0 \ 0 \ 1 \ \\ \ \\ \ \\} \end{aligned}

Here, \small \begin{aligned} \begin{array}{cccc} 8 & 4 & 2 & 1 \\ \hline 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 1 \\ 0 & 0 & 1 & 0 \end{array} \begin{array}{l} \\ \longrightarrow 5 \\ \longrightarrow A \\ \longrightarrow C \\ \longrightarrow D \\ \longrightarrow 2 \end{array} \end{aligned}

\small \begin{aligned} \begin{matrix} 0101 & 1010 & 1100 & . & 1101 & 0010 \\ \downarrow & \downarrow & \downarrow & & \downarrow & \downarrow \\ 5 & A & C & . & D & 2 \end{matrix} \end{aligned} \small \therefore (10110101100.1101001)_{2} = (5AC.D2)_{16}

Conversion from Octal to Hexadecimal and Hexadecimal to Octal

Octal \iff Hexadecimal

Rule:

Octal \iff Binary \iff Hexadecimal

Problem 14

Pb-14: (377.45)_{8} = (?)_{16}

Solution:

\small \begin{aligned} &(377.45)_8 \\ &= (011111111.100101)_2 \\ &= (\ \underline{\quad \ 0} \ \underline{1 \ 1 \ 1 \ 1} \ \underline{1 \ 1 \ 1 \ 1} \, . \, \underline{1 \ 0 \ 0 \ 1} \ \underline{0 \ 1 \quad \ } \ )_2 \\ &= (0FF.94)_{16} \end{aligned}

\therefore (377.45)_{8} = (0FF.94)_{16}

Problem 15

Pb-15: (25A.25B)_{16} = (?)_{8}

Solution:

\small \begin{aligned} &(25A.25B)_{16} \\ &= (001001011010.001001011011)_2 \\ &= (\ \underline{0 \ 0 \ 1} \ \underline{0 \ 0 \ 1} \ \underline{0 \ 1 \ 1} \ \underline{0 \ 1 \ 0} \, . \, \underline{0 \ 0 \ 1} \ \underline{0 \ 0 \ 1} \ \underline{0 \ 1 \ 1} \ \underline{0 \ 1 \ 1} \ )_2 \\ &= (1132.1133)_8 \end{aligned} \therefore (25A.25B)_{16} = (1132.1133)_{8}


Congratulations! You have successfully navigated the foundational building blocks of Digital Systems and Number Systems. This is your first major step toward mastering the logic that powers modern technology. If any of these concepts, from the difference between Analog and Digital System to the mechanics of Base Conversions, still feel a bit confusing, don’t hesitate to reach out. Drop a comment below with your questions, and let’s clear up the confusion together!

Read Also: Basic Concepts of Electrical Circuits

Contact Us: E-mail || WhatsApp || Facebook

Leave a Comment