8/10/2019 DLD n.docx
1/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 1
2014
Chenab College of
Advance Studies Toba
Tek Singh
M.cs
DLD Digital logic Design)By Sir Zohaib Hafeez
8/10/2019 DLD n.docx
2/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 2
2014
Signal System:
Signal:
A signal is a function of
independent variables that carry some information
It is a medium on which we send or receive data.
System:
A system any physical set of component that
takes a signal, and produce a signal system from which
send or receive our data.
Signals has two types, these are
Analog signal
Digital signal
Analog signal:
A type of Signal which can through in waveform.
Digital signal:
A type of signal which can show by accurate value.
8/10/2019 DLD n.docx
3/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 3
2014
Digital Computer and Analog
Computer:
Digital Computer:
Digital computers have made possible
many scientific industrial and commercial advances that
would have been unattainable otherwise.
Computer is used in scientific
calculation, commercial and business data processing air
traffic control and space guidance.
The general purpose digital
computer is the best-know example of a digital system.
Other examples include telephone switching exchanges,
digital voltmeters, digital counters, electronic
calculators, digital displays.
Analog Computer:
The analog computer performs a direct
simulation of a physical system. Each section of a
computer is the analog of some particular portion of the
process under study.
The term analog signal is sometimes
substituted for continuous signal because analog
computerhas come to mean a computer that manipulates
continuous variables.
8/10/2019 DLD n.docx
4/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 4
2014
Block diagram of digital computer:
Logic Gates Types of logic gates with
truth Table:
Logic Gates:
A logic gates performs a Boolean logic
function on one or more inputs to produce a single
output. It is also called electrical logic circuits.
Gates:
Blocks of hardware that produce signals of Binary
Output Device &
Control
Input Device &
Control
Storage or
Memory unit
Control Unit Process or
Arithmetic unit
8/10/2019 DLD n.docx
5/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 5
2014
1 or 0.The input output relationship of binary variable
for each gate can be represents in tabular from by
truth table.
Each gate has one or two binary input variable
designed by Aand B. and output represents with X.
Binary functions:
It is represented in digital computer by physical quantity
two stats represent a binary variable that can equal to 1
or 0.
AND Gate:
X=A B
A
B X
Truth Table
A B X
0 0 0
0 1 0
1 0 0
1 1 1
8/10/2019 DLD n.docx
6/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 6
2014
OR Gate:
X=A+B
A
X
B
Truth Table
NAND Gate:
X= (AB)
A
B X
Truth Table
NOR Gate:
X=(A+B)
A
B X
A B X
0 0 0
0 1 1
1 0 1
1 1 1
A B X
0 0 1
1 0 1
0 1 1
1 1 0
A B X
8/10/2019 DLD n.docx
7/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 7
2014
Truth Table
XOR Gate:
X=AB+AB
A
B X =AB+AB
Truth Table
XNOR Gate:
X=AB+AB
A
B X=AB+AB
Truth Table
Inverter:
0 0 1
0 1 0
1 0 0
1 1 0
A B X
0 0 0
0 1 1
1 0 1
1 1 0
A B X
0 0 1
0 1 0
1 0 0
1 1 1
8/10/2019 DLD n.docx
8/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 8
2014
A X
Buffer:
A X
Number System:
These are disuse some type of number system.
Decimal
Binary
Octal
Hexa-decimal
Number Code:
CARY CODE BCD
ASCII
Decimal Number System:
A X
1 0
0 1
A X
0 0
1 1
8/10/2019 DLD n.docx
9/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 9
2014
Decimal number system consist BASE 10
Its range is (0_9). Denoted by (10)
Example:1
2573)
10
= 2*103+5*102+7*101+3*100
Example: 2
25.73)
10
= 2*101+5*100+7*10-1+3*10-2
Binary Number System:
Binary number system contains Base2.Its range (0,
1).
Example: 1
101)2
=1*22+0*21+1*20
Example: 2
0.101)2
=
0*20+1*2-1+0*2-2+1*2-3
1st Binary to Decimal:
Simple value1(11001)2
8/10/2019 DLD n.docx
10/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 10
2014
=1*24+1*2
3+0*2
2+0*2
1+1*2
0
=16+8+0+0+1
=16+8+1
= (25)10Answer
Friction value2(10.101)2
=1*21+ 0*2
0+1*2
-1+0*2
-2+1*2
-3
= 2+0+1*1/2+0+1*1/8
= 2+1/2+1/8
= 2.4+1/8 = 2.5/8 or (1.625)
Answer
2
nd
Decimal to Binary:
Simple value 1(30)10
2 30
2 15 -0
2 7 - 1
2 3 - 1
2 1 - 1
= 11110)2 Answer
Friction value 2(30.8125)10
8/10/2019 DLD n.docx
11/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 11
2014
2 30
2 15-0
2 7-1
2 3-1
2 1-1
= (11110)2 (i)
.8125*2=1.625 1
.625*2= 1.25 1
.25*2= 0.5 0
.5*2= 1.0 1 = (1101) (ii)
= (11110.1101)2Answer
3
rd
Octal number:
Octal number consist Base 8.Its range is (0 7).
Suppose (75)8
1
st
Decimal to octal:
Simple value1(175)10
2 175
2 21-7
2 2-5
= (257)8 Answer
Friction value 2(0.15)10
8/10/2019 DLD n.docx
12/28
8/10/2019 DLD n.docx
13/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 13
2014
11 1
11
(1001110)2
ADDER:
Logic circuit addition which is use for binary number but
also in digital system.
Types of adder:
There are two types of adder
Half adder Full adder
Half adder:
Types of logic circuit which can add two bits
or binary number in one time and produce two bit output
name Sum and carry.
A logic circuit which have two inputs A, B and two output
Sum)and carry 0).
A Sum
BC carry
Inputs Outputs
Half Adder
8/10/2019 DLD n.docx
14/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 14
2014
A B Co
0 0 0
1 1 0
1 0 1 0
1 1 0 1
Binary digits to Adder Sum XOR Carryout/AND
Logical Diagram:
A
B A+B)
C0 A*B)
Note:
We can also use two NDand one ORgate
instead of XORin half Adder. We can get same result
as we can get in XORgate.
Operational Diagram:
XOR
AND
8/10/2019 DLD n.docx
15/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 15
2014
AAB
B
AB+BA
B
BA
sum
A
Carry
Note:
Behind the two AND gate two inverter are locate in
half adder
Note:
This adder cannot accept the carry from previous
addition, so this way called half adder.
Full Adder:
Logic circuit that can add 3binary number at a same time. Composed on 3
and 2 outputs 3binary number and 2 output sums and carry.
Which can shows the sequence of previous addition result. Full
adder accepts the 3 input but half adder cannot accept it.
8/10/2019 DLD n.docx
16/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 16
2014
Inputs Outputs
C
in
A B Co
0 0 0 0 0
0
0 1 1 00 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Cin
A
B
C
Logical Diagram:
Cin
A
B C0
Two Half adder one OR gate.
Full Adder
Half adder
Half adderOR
8/10/2019 DLD n.docx
17/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 17
2014
Boolean Expiration:
= A+ B+ Cin
C0= AB + Cin (A+B)
Operational Diagram:
A XOR XOR
B
Cin AND
CoutAND
Binary Subtraction:
0 0 = 0 Borrow of 0
1 1 = 0 Borrow of 0
1 0 = 1 Borrow of 0
0 1 = 1 Borrow of 1
Sub tractor:
8/10/2019 DLD n.docx
18/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 18
2014
A logic circuit used to Sub tractor in binary number.
Types:
Two types of sub tractor as follow
Half Subtractor
Full Subtractor
Half Subtractor:
A type of sub tractor used to sub tractor two binary numbers at a time.
Having two input and two output name
Difference
Borrow
Block Diagram:
A Di (Difference)
BB0 (Borrow out)
Operational Diagram:
A Din
B
B0
Boolean Expiration:
Din = A+B
Half Subtractor
8/10/2019 DLD n.docx
19/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 19
2014
B0= A.B
Inputs Outputs
A BD
in B0
0 0 0
1 1 1
1 0 1 0
1 1 0 0
Binary digits to Subtrct XOR NOR
Full Subtractor:
Having 3 inputs and two output are used to sub tractor 3 binary
number
Borrow in, A, B
Block Diagram:
BinDin
A
B
B
Full sub tractor
8/10/2019 DLD n.docx
20/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 20
2014
Logical Diagram:
Bin Din
B B0
Operational Diagram:
Bin Din
A
B
B0
Inputs Outputs
B
in
A B Din B0
0 0 0 0 0
1 0 0 1 1
0 0 1 1 1
1 0 1 0 1
0 1 0 1 0
1 1 0 0 0
0 1 1 0 0
1 1 1 1 1
Half sub tractorHalf sub tractorA
8/10/2019 DLD n.docx
21/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 21
2014
Adder-subtractor:
Logic circuits which is used for addition as well as for subtraction. Acalculating machine use this system(calculator, computer).
A logic circuit in which the addition of two binary number with special
mathematic technique is equal to the difference of these two binary
numbers.
Inputs
Comparator:
F.A
F.A
F.A
F.A
Cin
Ao
Bo
A1
B1
Cin
Cin
Cin
A2
B2
A3
B3
S1S2S3
8/10/2019 DLD n.docx
22/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 22
2014
A device which is use to show magnitude of two binary numbers. And
also use to show the comparison of two binary numbers.
Magnitude comparator & digital comparator
It is a logic circuit which is used to compare two binary numbers and
after comparison shows the magnitude rate of these two binary
numbers.
Simply show that two binary numbers are equal or not. If these
numbers are equal than comparator show the low output or 0 binary
output.
(XOR) has a capability has 1 output only when both input are not equal
and has 0 when both inputs are equal.
XOR we use the gate for comparator.
AB
High(1)
Low(0)
Low(0)
0
0
0
8/10/2019 DLD n.docx
23/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 23
2014
Symbol or Block diagram
Logical Diagram
Combinational logic circuits:
0
1
2
3
0
1
2
3
A>B
A=B
A
8/10/2019 DLD n.docx
24/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 24
2014
Combinational of logic gates which can presents the bolean function
without the storage capacity.
It is also called data processing circuits. Because we can process data in
these circuits. Output of these circuits is depends upon the types and
specification of logic gates that are used as a input in these circuits.
Used to solve logic problem
(Multiplexing, De-Multiplexing, Encoding, Decoding)
Multiplexer & data selector:
A combinational logic circuit which is used to combine multiple inputs
and select data from them and produce a single output. It is also Called
MUX.
Electronic circuits which is used to combine multiple input and produceonly one output.
Data selector because we also can select one input from combination
of different input.
Multiplexing:
Transmission a lot of information(multiple signal) on a smaller
line(medium).
Combinational
logic circuits
n- Input
Variablem- Output
Variable2
Multiplexer1
2
3
n
Control Signal
n = Input
m = Control Signa
I = Output
8/10/2019 DLD n.docx
25/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 25
2014
I1I0
Examples in digital logic design:
74150 16 to 1. Multiplexer/Data selector
74151 8 to 1. Multiplexer(with inverted output)
74152 8 to 1.
74153 (Dual)4 to 1.
74157 (Dual)2 to 1.
The multiplexer use to convert parallel data to
serial data.
4 to 1 multiplexer:
Block diagram:
Truth table
S1 So y
0 0 Io
0
1 I1
1
0 12
1 1 I3
Signal Output
74153
MUX
4*1
I2
I3
Y
8/10/2019 DLD n.docx
26/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 26
2014
Logical diagram
8 to 1 multiplexer:
8 inputs
one output & inverted output
3Data selector
1Enable input
Io
I1
I2
I3
S1
S2
Y
741520
1
2
3
4
5
6
7
Enable input/strobe
Data selector
InputsOutput
8/10/2019 DLD n.docx
27/28
DLD(Digital logic Design)
Prepared by:M.Atif Page 27
2014
Enable input = Strobe
1
2
4
8
5
7
6
3
Do
D1
D2
D3
D4
D5
D6
D7
Strobe
8/10/2019 DLD n.docx
28/28
DLD(Digital logic Design)
2014