CTU 07102 Module 2 Latest Notes by Rajnish
CTU 07102 Module 2 Latest Notes by Rajnish
Chapter 2
Number System
Number System Introduction
A number system in digital systems is a way of representing numbers using a set of symbols or
digits. In digital electronics, number systems are fundamental because they are used to express the
values that a computer can process. Computers primarily use binary number systems, but other
systems like decimal, octal, and hexadecimal are also used for specific purposes.
The binary number system is a base-2 number system that uses only two digits: 0 and 1. It is the
fundamental language of computers and digital systems. Every digit in a binary number is a power
of 2, and binary numbers represent the state of electrical circuits (on/off, true/false).
The decimal number system is a base-10 system that uses ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and
9. It is the number system most commonly used by humans for daily counting and arithmetic
operations. Each position in a decimal number represents a power of 10.
The hexadecimal number system is a base-16 number system that uses 16 symbols: 0-9 and A-
F, where A represents 10, B represents 11, and so on up to F, which represents 15. Hexadecimal
is commonly used in computing because it provides a more human-readable way of expressing
binary numbers.
The octal number system is a base-8 system that uses eight digits (0-7). In contrast, the binary
number system uses two digits (0, 1), and the hexadecimal number system uses 16 digits (0-9
and A-F). Octal numbers are often used in computing because they can be easily converted from
binary (grouping binary digits in sets of three).
ASCII Code
UNIQUE ACADEMY 1
CTU 07102 Information Security & Digital Electronics
text-based data. For example, the letter "A" is represented by the binary number 01000001 in
ASCII. ASCII is crucial for enabling text data exchange between different systems and devices.
Gray Code
Gray code, also known as reflected binary code, is a binary numeral system where two
successive values differ in only one bit. Unlike traditional binary representation, Gray code
minimizes errors when values change because only one bit changes at a time. This reduces the
chance of misinterpretation in noisy environments or during rapid transitions.
BCD (Binary-Coded Decimal) is a method of representing decimal numbers in binary form where
each digit of a decimal number is represented by its own 4-bit binary equivalent. For example, the
decimal number 45 is represented in BCD as 0100 0101 (4 as 0100 and 5 as 0101).
Applications of BCD:
• Digital clocks and calculators: BCD is often used in electronic devices where human-
readable numbers are needed because it's easier to convert directly to and from decimal
form.
• Financial and business applications: BCD helps avoid errors caused by floating-point
arithmetic when dealing with large or precise decimal values.
UNIQUE ACADEMY 2
CTU 07102 Information Security & Digital Electronics
Different number systems are used in digital systems for various practical reasons:
• Binary system (Base-2): Used in digital electronics and computers because it directly
corresponds to the on-off (1-0) states of transistors in computer circuits. All data in
computers are processed in binary.
• Decimal system (Base-10): Used by humans for everyday arithmetic and calculations.
Systems like calculators may need to convert binary to decimal for user interaction.
• Hexadecimal system (Base-16): Preferred in computing to simplify binary representation.
Since each hexadecimal digit represents 4 binary digits, it makes reading, writing, and
debugging binary values easier for programmers. For example, instead of writing a long
binary string, a shorter hexadecimal string can represent the same data.
• Octal system (Base-8): Historically used in older computing systems because it provides
a simpler way to group binary numbers into chunks of three bits. It was often used before
hexadecimal became the standard.
• Binary System (Base-2): The binary system uses only two digits: 0 and 1. Each binary
digit (bit) represents the state of an electronic switch, which is either on (1) or off (0). This
system is the foundation of all digital systems, including computers, as it directly
corresponds to their hardware operations.
o Importance: It’s the core number system used by computers to perform
calculations and process data.
• Decimal System (Base-10): The decimal system is the one most commonly used by
humans, and it comprises ten digits (0-9). Since it aligns with human arithmetic operations,
it's frequently used when displaying data to users.
o Importance: It's crucial for human interaction with machines, especially for user
inputs and outputs.
• Hexadecimal System (Base-16): This system uses sixteen digits, from 0 to 9 and A to F,
where A = 10 and F = 15. Hexadecimal is commonly used in computing because it provides
a compact way to represent binary numbers, where each hexadecimal digit corresponds to
four binary digits.
o Importance: It simplifies reading and writing binary code for programmers,
making it efficient for debugging and low-level programming.
UNIQUE ACADEMY 3