0% found this document useful (0 votes)
12 views

Lecture DLD

Uploaded by

m9107985
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Lecture DLD

Uploaded by

m9107985
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

DLD - DIGITAL LOGIC DESIGN

Syed Khizar Abbas


B.E IUB Bahawalpur, MS (Systems Engineering) NUST H-12 Islamabad

Lecturer in Artificial Intelligence Dept. SST


University of management and Technology Lahore

[email protected]
1. “ Digital Design” Fifth Edition By M.
Morris Mano and Michael D.Ciletti

2. Digital Fundamentals 11th Edition by


Thomas L. Floyd

2
DLD - DIGITAL LOGIC DESIGN

Digital Systems and Binary Numbers

3
4

🠶 Digital
🠶 Concerned with the interconnection among digital components and modules
🠶 Best Digital System example is General Purpose
Computer

🠶 Logic Design
🠶 Deals with the basic concepts and tools used to design digital hardware
consisting of logic circuits
🠶 Circuits to perform arithmetic operations (+, -, x, ÷)
5
🠶 Digital Signal : Decimal values are difficult to represent in electrical systems. It is easier to
use two voltage values than ten.

🠶 Digital Signals have two basic states:

1 (logic “high”, or H, or “on”)


0 (logic “low”, or L, or “off”)
🠶 Digital values are in a binary format. Binary means 2 states.

🠶 A good example of binary is a light (only on or off)

on off

Power switches have labels “1” for on and “0” for off.
6

🠶 Bits and Pieces of DLD History


🠶 George Boole
🠶 Mathematical Analysis of Logic (1847)
🠶 An Investigation of Laws of Thoughts; Mathematical Theories of Logic
and Probabilities (1854)
🠶 Claude Shannon
🠶 Rediscovered the Boole
🠶 “ A Symbolic Analysis of Relay and Switching Circuits “
🠶 Boolean Logic and Boolean Algebra were Applied to Digital Circuitry

---------- Beginning of the Digital Age and/or Computer Age


World War II
Computers as Calculating Machines
Arlington (State Machines) “ Control “
7
Motivation

🠶 Microprocessors/Microelectronics have revolutionized our world


🠶 Cell phones, internet, rapid advances in medicine, etc.

🠶 The semiconductor industry has grown tremendously


Digital Systems and Binary Numbers
8

🞕 Digital age and information age


🞕 Digital computers
► General purposes
► Many scientific, industrial and commercial applications
► Digital systems
► Telephone switching exchanges
► Digital camera
► Electronic calculators
► Digital TV
► Discrete information-processing systems
► Manipulate discrete elements of information
► For example, {1, 2, 3, …} and {A, B, C, …}…
Analogue Quantities & Digital Quantities
10 Analogue Quantities

Continuous Quantity
🠶 Intensity of Light
🠶 Temperature
🠶 Velocity
Digital Quantity

A digital quantity is one that has a discrete set of values.

🠶 Key Characteristics:
🠶 Discreteness: Digital quantities take on specific, well-defined values. For
example, a digital signal can be either high (usually represented by 1)
or low (usually represented by 0).
🠶 Binary Representation: Most digital systems use a binary representation,
where each value corresponds to a combination of bits (binary digits). These
bits can be either on (1) or off (0).
🠶 Boolean Logic: Digital systems operate based on Boolean logic, which
involves logical operations like AND, OR, NOT, and XOR. These operations
manipulate binary values to make decisions or perform calculations.

Signal
A physical quantity which vary with respect to time.
Analog and Digital Signal 12

🠶 Analog system
🠶 The physical quantities or signals may vary continuously over a specified range.
🠶 Any real life signal e.g. human voice, temperature, dimmer switches
🠶 Analogue signal
The signal continuously vary with respect to time.
🠶 Digital system
🠶 The physical quantities or signals can assume only discrete values.
🠶 Greater accuracy
X(t) X(t)

t t
Analog signal Digital signal
🠶 Analogue to Digital Conversion

Analogue System
🠶 Digital to analogue converter
Analogue to Digital Conversion and Reconstruction of Analogue Signal

Example:
Three parts of Analogue to digital Converter

🠶 Sampling
Sampling is the process of converting an analog signal into a discrete-time
signal.

🠶 Quantization
The conversion of a discrete-time continuous-valued signal into a discrete-time
discrete-value signal is called quantization. In the quantization process, each
signal sample is represented by a value chosen from the finite set of possible
values. The possible values are collectively called quantization levels.

🠶 Coding or Encoding
The process in which the discrete value samples are represented by an n-bit
binary sequence or code is called coding.
Quantization and Coding
Reconstruction of Analogue Signal
🠶 Binary Digits
Each of the two digits in the binary system, 1 and 0, is called a bit, which
is a contraction of the words binary digit. In digital circuits, two different
voltage levels are used to represent the two bits. Generally, 1 is
represented by the higher voltage, which we will refer to as a HIGH, and a 0
is represented by the lower voltage level, which we will refer to as a LOW.
This is called
positive logic.
HIGH = 1 and LOW = 0
Negative logic.
HIGH = 0 and LOW = 1

Logic Levels:
The voltages used to represent a 1 and a 0 are called logic levels.
🠶 Digital Waveforms

Digital waveforms consist of voltage levels that are changing back and forth
between the HIGH and LOW levels or states.
21
Number Systems
Four Types of Number Systems

1) Binary systems
2) Decimal systems
3) Octal systems
4) Hexadecimal systems
24

Decimal Number System


🠶 Base (also called radix) = 10
🠶 10 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }
🠶 Digit Position
🠶 Integer & fraction 2 1 0 -1 -2
🠶 Digit Weight
🠶 Weight = (Base) Position
5 1 2 7 4
🠶 Magnitude
100 10 1 0.1 0.01
🠶 Sum of “Digit x Weight”
🠶 Formal Notation

500 10 2 0.7 0.04

d2*B2+d1*B1+d0*B0+d-1*B-1+d-2*B-2

(512.74)10
25

Octal Number System


🠶 Base = 8
🠶 8 digits { 0, 1, 2, 3, 4, 5, 6, 7 }
🠶 Weights
🠶 Weight = (Base) Position
64 8 1 1/8 1/64
🠶 Magnitude
🠶 Sum of “Digit x Weight”
5 1 2 7 4
🠶 Formal Notation 2 1 0 -1 -2
5 *82+1 *81+2 *80+7 *8-1+4 *8-2
=(330.9375)10

(512.74)8
26

Binary Number System


🠶 Base = 2
🠶 2 digits { 0, 1 }, called binary digits or “bits”
🠶 Weights
🠶 Weight = (Base) Position 4 2 1 1/2 1/4
🠶 Magnitude 1 0 1 0 1
🠶 Sum of “Bit x Weight”
2 1 0 -1 -2
🠶 Formal Notation
1 *22+0 *21+1 *20+0 *2-1+1 *2-2
🠶 Groups of bits 4 bits = Nibble
8 bits = Byte =(5.25)10

(101.01)2
1011

11000101
27

Hexadecimal Number System


🠶 Base = 16
🠶 16 digits { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F }
🠶 Weights
🠶 Weight = (Base) Position
256 16 1 1/1 1/256
🠶 Magnitude 6
🠶 Sum of “Digit x Weight”
1 E 5 7 A
🠶 Formal Notation 2 1 0 -1 -2
1 *162+14 *161+5 *160+7 *16-1+10 *16-2
=(485.4765625)10

(1E5.7A)16
28

The Power of 2
n 2n n 2n
0 20=1 8 28=256
1 21=2 9 29=512
2 22=4 10 210=1024 Kilo

3 23=8 11 211=2048
4 24=16 12 212=4096
5 25=32 20 220=1M Mega

6 26=64 30 230=1G Giga

7 27=128 40 240=1T Tera


🠶 Applications of number systems

🠶 1. Decimal Number System:


🠶 Base: Decimal uses a base value of 10.
🠶 Digits: It employs the digits 0 to 9.
🠶 Significance: Decimal is the system we use daily for everyday calculations. It’s the most familiar
system for representing numbers.
🠶 Applications:
🠶 Financial Transactions: Decimal numbers are used for currency, banking, and financial
calculations.
🠶 Measurement Units: Length, weight, volume, and other physical quantities are often
expressed in decimal form.
🠶 Scientific Notation: Decimal notation is used in scientific and engineering contexts.
🠶 2. Binary Number System:

🠶 Base: Binary uses a base value of 2.


🠶 Digits: It consists of only two digits: 0 and 1.
🠶 Significance: Binary is fundamental in digital electronics and computer science.
🠶 Applications:
🠶 Computers and Digital Circuits: Binary represents data and instructions in
computers.
🠶 Boolean Logic: Binary is essential for logical operations (AND, OR, NOT) in
programming.
🠶 Data Encryption: Cryptography relies on binary representation.
🠶 3. Octal Number System:
🠶 Base: Octal uses a base value of 8.
🠶 Digits: It uses digits from 0 to 7.
🠶 Significance: Octal is less common but still relevant in some contexts.
🠶 Applications:
🠶 Unix File Permissions: Octal notation is used to set file permissions (read,
write, execute) in Unix-like operating systems.
🠶 Digital Displays: Some older digital displays used octal representation.
🠶 4. Hexadecimal Number System:
🠶 Base: Hexadecimal uses a base value of 16.
🠶 Digits: It includes digits 0 to 9 and letters A to F (representing values 10 to 15).
🠶 Significance: Hexadecimal is widely used in programming and computer science.
🠶 Applications:
🠶 Memory Addresses: Hexadecimal is used to represent memory addresses.
🠶 Color Codes: Web designers and programmers use hexadecimal to specify
colors (e.g., #FFA500 for orange).
🠶 Machine Code: Hexadecimal is used in low-level programming and assembly
language.
Decimal (Integer) to Binary 33

Conversion
🠶 Divide the number by the ‘Base’ (=2)
🠶 Take the remainder (either 0 or 1) as a coefficient
🠶 Take the quotient and repeat the division

Example: (137)10 Quotient Remainder Coefficient


13 / 2 = 6 1 a0 = 1
6 /2= 3 0 a1 = 0
3 /2= 1 1 a2 = 1
1 /2= 0 1 a3 = 1
Answer: (13)10 = (a3 a2 a1 a0)2 = (1101)2

MSB LSB
Decimal (Fraction) to Binary 34

Conversion
🠶 Multiply the number by the ‘Base’ (=2)
🠶 Take the integer (either 0 or 1) as a coefficient
🠶 Take the resultant fraction and repeat the division

Example: (0.625)10 Integer Fraction Coefficient


0.625 * 2 = 1 . 25 a-1 = 1
0.25 * 2 = 0 . 5 a-2 = 0
0.5 *2= 1 . 0 a-3 = 1
Answer: (0.625)10 = (0.a-1 a-2 a-3)2 = (0.101)2

MSB LSB
35

Decimal to Octal Conversion


Example: (175)10
Quotient Remainder Coefficient
175 / 8 = 21 7 a0 = 7
21 / 8 = 2 5 a1 = 5
2 /8= 0 2 a2 = 2
Answer: (175)10 = (a2 a1 a0)8 = (257)8

Example: (0.3125)10
Integer Fraction Coefficient
0.3125 * 8 = 2 . 5 a-1 = 2
0.5 *8= 4 . 0 a-2 = 4
Answer: (0.3125)10 = (0.a-1 a-2 a-3)8 = (0.24)8
🠶 Binary to decimal Conversion

For example

1101.011
🠶 20=1
🠶 21=2
🠶 22=4
🠶 23=8
🠶 Now for fraction
🠶 2-1=1/2
🠶 2-2=1/4
🠶 2-3=1/8
37

Binary − Octal Conversion


🠶 8 = 23 Octal Binary

🠶 Each group of 3 bits represents an octal digit 0 000


1 001
2 010
Assume Zeros
Example: 3 011

( 01 0 1 1 0 . 0 1 )2 4 100
5 101
6 110
( 2 6 . 2 )8 7 111

Works both ways (Binary to Octal & Octal to Binary)


38

Binary − Hexadecimal
Conversion
🠶 16 = 2 4
Hex
0
Binary
0000
🠶 Each group of 4 bits represents a hexadecimal 1 0001
digit 2 0010
3 0011
4 0100
5 0101
Assume Zeros 6 0110
7 0111
Example: 8 1000
( 1 0 1 1 0 . 0 1 )2 9 1001
A 1010
B 1011
C 1100
D 1101
(1 6 . 4 )16 E 1110
F 1111

Works both ways (Binary to Hex & Hex to Binary)


39

Octal − Hexadecimal Conversion


🠶 Convert to Binary as an intermediate step

Example:
( 2 6 . 2 )8

Assume Zeros Assume Zeros

( 0 1 0 1 1 0 . 0 1 0 )2

(1 6 . 4 )16

Works both ways (Octal to Hex & Hex to Octal)


Decimal, Binary, Octal and Hexadecimal
40

Decimal Binary Octal Hex


00 0000 00 0
01 0001 01 1
02 0010 02 2
03 0011 03 3
04 0100 04 4
05 0101 05 5
06 0110 06 6
07 0111 07 7
08 1000 10 8
09 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F

You might also like