Uploaded by salman khan

Lecture No 2 DLD

advertisement
Lecture No # 2
Why we Study Number System in DLD?
Studying number systems is a fundamental concept in Digital Logic Design (DLD) for several important
reasons:
1. Representation of Information: Number systems are used to represent different types of data in
digital systems. For example, in binary systems, we represent information using only two
symbols (0 and 1). This is essential for encoding and processing data in digital circuits and
computers.
2. Understanding Binary Logic: Digital systems are based on binary logic, where logical operations
are performed using binary numbers.
3. Conversion and Manipulation: In DLD, you often need to convert between different number
systems, such as binary, decimal, and hexadecimal.
4. Error Detection and Correction: In digital systems, error detection and correction codes are used
to ensure data integrity. Understanding number systems is vital for implementing these codes
and checking for errors in data transmission and storage.
5. Arithmetic Operations: Digital circuits perform various arithmetic operations. Knowledge of
number systems is essential for designing and analyzing circuits that perform addition,
subtraction, multiplication, and division in different bases, particularly binary and hexadecimal.
6. Memory Systems: Memory systems in computers and digital devices often store data using
binary or hexadecimal representations. Understanding these number systems is crucial for
efficient memory design and data access.
7. Addressing and Encoding: In computer systems, addressing and data encoding are closely tied to
number systems. To efficiently access memory locations or perform data encoding, you need to
be familiar with number systems.
What is Number System?
A number system, also known as a numeral system, is a formal system for expressing and representing
numbers.
There are several commonly used number systems, each with its own base and set of symbols. The most
common number systems include:
1.
2.
3.
4.
Decimal Number System (Base-10): Using ten digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9).
Binary Number System (Base-2): The binary system uses two digits (0 and 1).
Octal Number System (Base-8): Octal uses eight digits (0-7).
Hexadecimal Number System (Base-16): Hexadecimal uses sixteen digits, typically represented
as 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, and F=15).
5. Ternary Number System (Base-3): Ternary uses three digits (0, 1, and 2) and has applications in
some mathematical models and digital logic design.
Binary to Decimal Number System
Example 1. Convert (1101)2 into a decimal number.
1 × 23 + 1 × 22 + 0 × 2 1 + 1 × 20
=8+4+0+1
= 13
Therefore, (1101)2 = (13)10
•
Example → 11010
•
•
•
•
101011
1111101
01110101
11011011 Convert these Binary numbers into Decimal Number
Octal to Decimal:
Example 1: Convert 228 to decimal number.
Solution: Given, 228
2 x 81 + 2 x 80
= 16 + 2
= 18
Therefore, 228 = 1810
Example 2: 675 octal number convert into decimal number.
Decimal Value = (6 * 8^2) + (7 * 8^1) + (5 * 8^0)
Decimal Value = (6 * 64) + (7 * 8) + (5 * 1)
Decimal Value = 384 + 56 + 5
Decimal Value = 445
•
•
•
Example → 615
543
61
•
416
•
375 Convert these Octal numbers into Decimal Number
Hexadecimal to Decimal:
Example 3: Convert 12116 to decimal number.
Solution: 1 x 162 +2 x 161 +1 x 160
= 16 x 16 + 2 x 16 + 1 x 1
= 289 Therefore, 12116 = 28910
Example 9AB Hexadecimal Convert into Decimal
Decimal Value = (9 * 16^2) + (10 * 16^1) + (11 * 16^0)
Decimal Value = (9 * 256) + (10 * 16) + (11 * 1)
Perform the calculations:
Decimal Value = 2304 + 160 + 11
Add up the values:
Decimal Value = 2475
•
•
•
•
Example → A75B
ABC
978B
8AE Convert these hexadecimal numbers into Decimal Number
Download