Professional Documents
Culture Documents
AllMergedNotesbyPrakash Khanl
AllMergedNotesbyPrakash Khanl
AllMergedNotesbyPrakash Khanl
1 Introduction
1 Prakash khanal,NCIT
9/14/2020
What is Signal?
✔ A signal is a physical quantity (sound, light, voltage, current) that carries information
thermometer measures the room temperature at 72.482 degree(in celcius). The analog value is
continuous and more accurate, but the digital value is more than adequate for the application and
Digital advantages:
Battery life
Programmability
Accuracy
✔ We are analog.
✔ For example,
– sounds are analog signals; they are continuous time and continuous
value.
– Our ears listen to analog signals and we speak with analog signals.
– Images, pictures, and video are all analog at the source and our eyes are analog sensors.
– Measuring our heartbeat, tracking our activity, all requires processing analog sensor
information.
5 Prakash khanal, NCIT 9/14/2020
Examples of Analog Signal
✔ An analog signal can be any time-varying signal.
✔ Sine waves and square waves are two common analog signals.
✔ Note that this square wave is not a digital signal because its minimum value is negative.
Period
(T)
Amplitude Frequency:
(peak)
1
Amplitude
(peak-to-peak)
F=T
Hz
Disadvantages
✔ Unwanted noise in recording.
✔ If we transmit data at long distance then unwanted disturbance is there.
0 volts
Amplitu
repeat. (seconds)
Time Time
Frequency:
de
High Low
A measure of the number of
(tH) (tL)
occurrences of the signal per second. (Hertz, Hz)
Time High (tH):
The time the signal is at 5 v. Rising Edge
Time Low (tL): Period (T)
The time the signal is at 0 v.
Duty Cycle: Frequency:
The ratio of tH to the total period (T).
Rising Edge: 1 t
A 0-to-1 transition of the signal.
F = T Hz DutyCycle = TH ×100%
Falling Edge:
A 1-to-0 transition of the signal.
Disadvantages
Noisy channel
Noisy channel
✔ Greater accuracy
14
Prakash khanal, NCIT 9/14/2020
Analog Vs Digital
X(t) X(t)
t t
Analog signal Digital signal
✔ Reliability is more
16 Prakash khanal, NCIT 9/14/2020
Thank You!
0,1,2,3,4,5,6,7,8 and 9
Structure:
MSD LSD
Decimal Point
7 Prakash khanal, NCIT 10/1/2020
Decimal Number System
MSD: The leftmost digit in any number representation,
which has the greatest positional weight out of all the
digits present in that number is called the “Most
Significant Digit” (MSD)
Examples
1214
1897
9875.54
system
fraction parts
Structure:
MSB LSB
0 0000 8 1000
1 0001 9 1001
2 0010 10 1010
3 0011 11 1011
4 0100 12 1100
5 0101 13 1101
6 0110 14 1110
7 0111 15 1111
14
10/1/2020 Prakash khanal, NCIT
Terms related to Binary Numbers
- Example: 1
0
Example: 1110
0000
1001
0101
b7 b6 b5 b4 b3 b2 b1 b0
Higher order Lower order
nibble nibble
MSB LSB
LSB
MSB
18 Prakash khanal, NCIT 10/1/2020
Terms related to Binary Numbers
10/1/2020
19 Prakash khanal, NCIT
Octal Number System
Octal number system is a positional weighted
system.
It contains eight unique symbols 0,1,2,3,4,5,6 and
7
Since counting in octal involves eight symbols, we
can say that its base or radix is eight (8).
Structure:
MSD LSD
Structure:
MSD LSD
Radix Point
27 Prakash khanal, NCIT 10/1/2020
Hexadecimal Number System (HEX)
0 0000 0 8 1000 8
1 0001 1 9 1001 9
2 0010 2 10 1010 A
3 0011 3 11 1011 B
4 0100 4 12 1100 C
5 0101 5 13 1101 D
6 0110 6 14 1110 E
7 0111 7 15 1111 F
2 6 1
(105) 10 = (1101001) 2
2 3 0
2 1 1
0 1 MSB
31 Prakash khanal, NCIT 10/1/2020
Conversion of Decimal number into
Binary number (Fractional Number)
Procedure:
0.84 X 2 = 1.68 1
0.68 X 2 = 1.36 1
0.36 X 2 = 0.72 0
(0.42)10 = (0.01101)2
0.72 X 2 = 1.44 1 LSB
(8476.47)10 = ( ? )2
(8476.47)10 = ( ? )2
8 204 Remainder
LSD
8 25 4
8 3 1
0 3 MSD
(204) 1 0 = (314) 8
37 Prakash khanal, NCIT 10/1/2020
Conversion of Decimal Numberinto
Octal Number (Fractional Number)
Procedure:
1. Multiply the given fractional number by base 8.
2. Record the carry generated in this multiplication as
MSD.
4. Repeat the steps 2 and 3 up to 5 bits. The last carry will represent the LSD of
equivalent octal number
0.9872 X 8 = 7.8976 7
0.8976 X 8 = 7.1808 7
0.1808 X 8 = 1.4464 1
LSD
0.4464 X 8 = 3.5712 3
(0.6234)10 = (0.47713)8
(420.6)10 = ( ? )8
16 2003 Remainder
LSD
16 125 3 3
16 7 13 D
0 7 7 MSD
(2003) 1 0 = (7 D3) 1 6
4. Repeat the steps 2 and 3 up to 5 bits. The last carry will represent the LSD of
equivalent hex number
0.952 X 16 = 15.232 15 F
0.232 X 16 = 3.712 3 3
0.712 X 16 = 11.392 11 B
(0.122) 10 = 0.1F3B6) 1 6
44 Prakash khanal, NCIT 10/1/2020
Exercise:
(420.6)10 = ( ? )16
Procedure:
1. Write down the binary number.
Binary No. 1 0 0 1 . 1 1
=(1×23)+(0×22)+(0×21)+(1×20).(1×2−1)+(1×2−2)
= 8 + 0 + 0 + 1 . 0.5 + 0.25
= 9.75
(1001.01)2 = (9.75)10
47 Prakash khanal, NCIT 10/1/2020
Conversion of Octal Number into Decimal Number
Procedure:
1. Write down the octal number.
2. Write down the weights for different positions.
3. Multiply each bit in the binary number with the
corresponding weight to obtain product numbers to get
the decimal numbers.
4. Add all the product numbers to get the decimal
equivalent
48 Prakash khanal, NCIT 10/1/2020
Example: Convert 365.24 octal number in to
it’s equivalent decimal number.
Octal No. 3 6 5 . 2 4
=(3×82 )+(6×81)+(5×80).(2×8−1)+(4×8−2)
= 192 + 48 + 5 . 0.25 +0.0625
= 245.3125
(365.24) 8 = (245.3125) 1 0
49 Prakash khanal, NCIT 10/1/2020
Exercise
(273.56)8 = ( ? )10
Octal No. 2 7 3 . 5 6
=(2×82 )+(7×81)+(3×80).(5×8−1)+(6×8−2)
= 128 + 56 + 3 . 0.625
+0.09375
= 187.71875
Hex No. 5 8 2 6
= 22566
(5826) 1 6 = (22566) 1 0
53 10/1/2020
Prakash khanal, NCIT
Exercise
• Convert following Hexadecimal Numbers in to
its equivalent Decimal Number:
(6B7)16 = ( ? )10
Procedure:
0 1 1 0 1 0 0 1 0
3 2 2
(11010010) 2 = (322) 8
(1101.11)2 = ( ? )8
Ans:
1 1 0 1 0 0 1 0
D 2
(11010010) 2 = (D 2) 16
(10001.01)2 = ( ? )16
Ans:
(364) 8 = (011110100) 2
OR
(364) 8 = (11110100) 2
(6534.04)8 = ( ? )2
A F B 2
(AFB2) 1 6 = (1010111110110010) 2
(8E47.AB)16 = ( ? )2
0 F 4 Hex number
(364) 8 = ( F 4 ) 1 6
(6534.04)8 = ( ? )16
2 3 1 2 Octal Number
(4CA) 1 6 = (2312) 8
71 Prakash khanal, NCIT 10/1/2020
Binary Addition
1 1 1 1 1 1
1 1 0 1 . 1 0 1
1 1 1 . 0 1 1
1 0 1 0 1 . 0 0 0
(1011)2+(1101)2+(1001)2+(1111)2
1 10 1 1 10
0 10 0 10 10 0 10
1 0 1 0. 0 1 0
- 1 1 1. 1 1 1
0 0 1 0. 0 1 1
(10001.01)2- (1111.11)2
0 X 0 = 0
0 X 1 = 0
1 X 0 = 0
1 X 1 = 1
1 0 0 0
0 0 0 0
0 0 0 0 x
0 0 0 0 x x
1 0 0 1 x x x
1 0 0 1 0 0 0
(1001) 2 ∗ (1000) 2 = (1001000) 2
79 Prakash khanal, NCIT 10/1/2020
Exercise
(1101.11)2 X (101.1)2
1 0 1 0
101 1 1 0 1 1 0
-1 0 1
* 0 1 1 Remainder: 100
Quotient: 1010
-0 0 0
* 1 11
- 1 01
* 10 0
-0 0 0
Prakash khanal, NCIT
81
10 0 10/1/2020
Exercise
(1010)2 by (11)2
1 1 1 1
1 0 1 0
0 1 0 1
2 1001 0110
1 0 0 1
1 0 1 1
1 0 1 0 0
final carry Result
Step 3:If carry is generated add final carry to the result
0 1 0 0
0 1 1 0
1 0 1 0 1.s
final carry Result
comp
Step 3:If carry is generated add final carry to the result
0 1 0 1
Prakash khanal, NCIT 10/1/2020
88
Example Continue
1 0 0 1
1 0 1 1
1 0 1 0 0 Result
final carry
1
0 1 0 1 Final Result
When the final carry is produced the answer is positive and is in its true
binary form
89 Prakash khanal, NCIT 10/1/2020
2’s Complement
If Carry is generated, discard carry. The result is positive and its true
binary form.
1101, 1110 and 1111 in this code i.e. they are not part
1 8 1000
2 47 0100 0111
4 99 1001 1001
5 10 0001 0000
000 001
001 001
010 011
011 010
Binary Number 1 ⊕ 0 ⊕ 1 ⊕ 1
Gray Code 1 1 1 0
10/1/2020
Prakash khanal, NCIT
98
Binary and Corresponding Gray Codes
Decimal No. Binary No. Gray Code
0 0000 0000
1 0001 0001
2 0010 0011
3 0011 0010
4 0100 0110
5 0101 0111
6 0110 0101
7 0111 0100
8 1000 1100
9 1001 1101
Discard carries.
Gray Code 1 1 1 0
⊕ ⊕
⊕
Binary Number 1 0 1 1
4 2 8
10/1/2020
Prakash khanal, NCIT
102
Excess-3 Code (XS-3)
Excess-3 Code=
Decimal No. BCD Code
BCD + Excess-3
0 0000 0011
1 0001 0100
2 0010 0101
3 0011 0110
4 0100 0111
5 0101 1000
6 0110 1001
7 0111 1010
8 1000 1011
9 1001 1100
Prakash khanal, NCIT 10/1/2020
103
Excess 3 code is a self complementary code
Example: a=97
A=65
Prakash khanal, NCIT 10/1/2020
107
BCD Addition
57 0 1 0 1 0 1 1 1
26 0 0 1 0 0 1 1 0
83 0 0 1 1 1 1 1 0 1
Add 0110 in
only invalid
0 1 1 1 1 1 0 1 code
0 0 0 0 0 1 1 0
1 0 0 0 0 0 1 1
(88.7)10 +(265.8)10
HIGH LOW
True False
ON OFF
1 0
OFF ON GLOW
ON OFF GLOW
ON ON GLOW
➢ Logic
✓A logic in which the voltage levels represent logic 1 and
logic 0.
✓Level logic may be Positive or Negative.
✓A “Positive Logic” is the one which the higher of the two
voltage levels represents the logic 1 and the lower of the
two voltage level represents the logic 0.
✓A “Negative Logic” is the one which the lower of the
two voltage levels represents the logic 1 and the higher
of the two voltage level represents the logic 0.
6 Prakash khanal, NCIT
Logic Gates
Logic Gates
Inputs Output
0 A B Y=A.B
A
Y=A.B 0 0
B 0
0
0
Inputs Output
0 A B Y=A.B
A
Y=A.B 0 0 0
B
0
1 0 1 0
Inputs Output
1 A B Y=A.B
A
Y=A.B 0 0 0
B
0
0 0 1 0
1 0 0
Inputs Output
1 A B Y=A.B
A
Y=A.B 0 0 0
B
1
1 0 1 0
1 0 0
1 1 1
0 1 1 0
Symbol : 3 – Input AND Gate
1 0 0 0
A 1 0 1 0
B Y=A.B.C 1 1 0 0
C 1 1 1 1
Inputs Output
0 A B Y=A+B
A
Y=A+B 0 0
B 0
0
0
Inputs Output
0 A B Y=A+B
A
Y=A+B 0 0 0
B
1
1 0 1 1
Inputs Output
1 A B Y=A+B
A
Y=A+B 0 0 0
B
1
0 0 1 1
1 0 1
Inputs Output
1 A B Y=A+B
A
Y=A+B 0 0 0
B
1
1 0 1 1
1 0 1
1 1 1
Y1=A+B A B C Y
A
Y=Y1+C 0 0 0 0
B =A+B
0 0 1 1
C
0 1 0 1
Symbol : 3 – Input OR Gate 0 1 1 1
1 0 0 1
A
1 0 1 1
B Y=A+B+C
C 1 1 0 1
1 1 1 1
19 Prakash khanal, NCIT
NOT Gate (Inverter)
Input Output
Y= A
− A Y= A
A
0 1 0 1
Input Output
−
−
Y= A
A Y= A
A
1 0 0 1
1 0
A
AB A.B A A.B
B
B
AND Gate NOT Gate NAND Gate
A
Y = A.B
B
Logic Symbol
Inputs Output
0 A B
Y = A.B
A
Y = A.B
0 0 1
B
1
0
Inputs Output
0 A B
A Y = A.B
Y = A.B 0 0 1
B
1
1 0 1 1
Inputs Output
1 A B
A Y = A.B
Y = A.B 0 0 1
B
1
0 0 1 1
1 0 1
Inputs Output
1 A B
A Y = A.B
Y = A.B 0 0 1
B
0
1 0 1 1
1 0 1
1 1 0
A A+B A+B A
Y =A+B
B B
OR Gate NOT Gate NOR Gate
A
Y =A+B
B
Logic Symbol
31 Prakash khanal, NCIT
NOR Gate
Inputs Output
0 A B
Y =A+B
A
Y =A+B
0 0 1
B
1
0
Inputs Output
0 A B
Y =A+B
A
Y =A+B 0 0 1
B
0
1 0 1 0
Inputs Output
1 A B
Y =A+B
A
Y =A+B 0 0 1
B
0
0 0 1 0
1 0 0
Inputs Output
1 A B
Y =A+B
A
Y =A+B 0 0 1
B
0
1 0 1 0
1 0 0
1 1 0
A Y = A.A
Y = A ......... (A.A=A)
A Y 1 = A.B
B Y = A.B
Y = A.B
Y 1=A
A
Y = A.B
Y = A+ B ( Demorgan's Theorem)
B
Y 2= B Y = A +B
Y 1=A Y 3 = A.B
A Y 3 = A+ B
Y = A +B
B
Y 2= B
A Y=A+A
Y = A ......... (A+A=A)
A
OR Gate using NOR Gate Y=A+B
B
A Y1 = A+ B
B Y = A+B
Y=A+B
Y 1=A
A
Y = A+B
Y = A.B ( Demorgan's Theorem)
B
Y 2= B Y = A.B
Y 1=A Y 3 = A+B
A Y 3 = A.B
Y = A.B
B
Y 2= B
A
Y = A B
B − −
Y = AB + AB
Inputs Output
0 A B
Y = A B
A
Y = A B
0 0 0
B
0
0
Inputs Output
0 A B
Y = A B
A
Y = A B
0 0 0
B
1
1 0 1 1
Inputs Output
1 A B
Y = A B
A
Y = A B
0 0 0
B
1
0 0 1 1
1 0 1
Inputs Output
1 A B
Y = A B
A
Y = A B
0 0 0
B
0
1 0 1 1
1 0 1
1 1 0
INPUT OUTPUT
A A B C Y = A B C
Y = A B C
B 0 0 0 0
C
0 0 1 1
0 1 0 1
A B 0 1 1 0
A
1 0 0 1
B
1 0 1 0
C Y = A B C
1 1 0 0
1 1 1 1
51
both the inputs assume a logic state. Prakash khanal, NCIT
Ex-NOR Gate
A
Y = A B
B − −
Y = AB + A B
Inputs Output
0 A B Y=A B
A
Y=A B
0 0 1
B
1
0
Inputs Output
0 A B Y=A B
A
Y=A B
0 0 1
B
0
1 0 1 0
Inputs Output
1 A B Y=A B
A
Y=A B
0 0 1
B
0
0 0 1 0
1 0 0
Inputs Output
1 A B Y=A B
A
Y=A B
0 0 1
B
1
1 0 1 0
1 0 0
1 1 1
A B C Y=A B C
A
B Y=A B C 0 0 0 1
C 0 0 1 0
0 1 0 0
0 1 1 1
A A B
1 0 0 0
B 1 0 1 1
C Y=A B C
1 1 0 1
1 1 1 0
➢Axioms
✓ Axioms or postulates of Boolean algebra are set of
logical expressions that we accept without proof and
upon which we can build a set of useful theorems.
➢Axioms
AND Operation
Axiom 1: 0.0=0
Axiom 2: 0.1=0
Axiom 3: 1.0=0
Axiom 4: 1.1=1
➢Axioms
OR Operation
Axiom 5: 0+0=0
Axiom 6: 0+1=1
Axiom 7: 1+0=1
Axiom 8: 1+1=1
62 Prakash khanal, NCIT
Boolean Algebra
➢Axioms
NOT Operation
Axiom 9: 1 =0
−
Axiom 10: 0 =1
−
Law 5: −
A=A (Double Inversion Law)
64 Prakash khanal, NCIT
Boolean Algebra
➢AND Laws
➢OR Laws
Law 1: A + 0 = A Null Law
Law 2: A + 1 = 1 Identity Law
Law 3: A+A=A
−
Law 4: A+ A = 1
➢Commutative Laws
Law 1: A+B = B+A
✓ This Law states that, A OR B is the same as B OR A
i.e. the order in which the variables are ORed is
immaterial.
A B Y=A+B B A Y=B+A
0 0 0 0 0 0
0 1 1 0 1 1
1 0 1 1 0 1
1 1 1 1 1 1
➢Commutative Laws
✓ This law can be extended to any number of
variables. For example,
➢Commutative Laws
B A
A B Y=A.B B A Y=B.A
0 0 0 0 0 0
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 1 1 1
71 Prakash khanal, NCIT
Boolean Algebra
➢Commutative Laws
➢Associative Laws
A B
B C
C A
➢Associative Laws
➢Associative Laws
A B
B C C A
➢Associative Laws
➢Distributive Laws
➢Distributive Laws
➢Distributive Laws
C B
B A A
C
(A+B)
A B C BC A+BC A B C A+B A+C
(A+C)
0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 1 0 1 0
0 1 0 0 0 0 1 0 1 0 0
0 1 1 1 1 0 1 1 1 1 1
1 0 0 0 1 1 0 0 1 1 1
1 0 1 0 1 1 0 1 1 1 1
1 1 0 0 1 1 1 0 1 1 1
1 1 1 1 1 1 1 1 1 1 1
83 Prakash khanal, NCIT
Boolean Algebra
−
Law 1: A + AB = A + B
− −
A B AB A+ AB A B A+B
0 0 0 0 0 0 0
0 1 1 1 0 1 1
1 0 0 1 1 0 1
1 1 0 1 1 1 1
85 Prakash khanal, NCIT
Boolean Algebra
−
Law 2: A( A + B) = A.B
−
A − A
A A( A + B) A.B
B
B −
A+ B
− −
A B A+ B A( A + B) A B A.B
0 0 1 0 0 0 0
0 1 1 0 0 1 0
1 0 0 0 1 0 0
1 1 1 1 1 1 1
87 Prakash khanal, NCIT
Boolean Algebra
➢ Idempotence Laws
A A
Law 1: A.A = A A
➢ Idempotence Laws
A A
A+ A= A A
Law 2:
➢ Absorption Laws
Law 1: A + A.B = A
✓Therefore,
A + A. Any Term = A
90 Prakash khanal, NCIT
Boolean Algebra
Proof:
A + A.B A
A AB
B A + AB = A
A
A B A.B A + A.B
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
➢Absorption Laws
Law 2: A ( A + B) = A
✓ Therefore,
Proof:
A(A + B) = A
A A A(A + B) = A
B A +B
A B A+ B A( A + B)
0 0 0 0
0 1 1 0
1 0 1 1
1 1 1 1
➢ De-Morgan’s Theorem
− −
First Theorem: A + B = A. B
L.H.S.
A A+ B A
A+B A+ B
B B
− −
A+ B A. B
− − − −
A B A +B A +B A B A B A. B
0 0 0 1 0 0 1 1 1
0 1 1 0 0
0 1 1 0
1 0 0 1 0
1 0 1 0
1 1 0 0 0
1 1 1 0
➢De-Morgan’s Theorem
− − − −
A +B +C +D +......... =A.B.C.D........
➢De-Morgan’s Theorem
− −
Second Theorem: A.B = A+ B
L.H.S.
A A.B A
A.B A.B
B B
Proof:
− −
A.B A+ B
− − − −
A B A.B A B A B
A.B A+ B
0 0 0 1 0 0 1 1 1
0 1 0 1 0 1 1 0 1
1 0 0 1 1 0 0 1 1
1 1 1 0 1 1 0 0 0
100
Prakash khanal, NCIT
Boolean Algebra
➢De-Morgan’s Theorem
− − − −
A.B.C.D......... =A +B +C +D............
102
Prakash khanal, NCIT
Duality
104
Prakash khanal, NCIT
Duality
105
Prakash khanal, NCIT
Examples of Dual Identities
4 1.1 = 1 0+0 = 0
5 A.0 = 0 A+1 = 1
6 A.1 = A A +0 = A
106
Prakash khanal, NCIT
Examples of Dual Identities
7 A.B = B.A A+ B = B + A
8 A.(B.C) = (A.B).C A+ (B + C) = (A + B) + C
9 A.(B + C)= A.B + A.C A+ BC = (A + B)(A + C)
10 A.(A+ B) = A A + AB = A
11 A.(A.B) = A.B A+ A+ B = A + B
− − − −
12
A.B = A+B A + B = A.B
− − − −
13 (A+ B)(A+ C) = (A+ B)(A+ C) AB + AC = AB + AC
107
Prakash khanal, NCIT
TRI-STATE LOGIC
110
Prakash khanal, NCIT
Example 1
112
Prakash khanal, NCIT
Example 2
114
Prakash khanal, NCIT
Example 3
Y = AB + AC
Y = AB + AC
Y = A(B + C)
B+C
B
C Y = A(B + C)
A Y = AB + AC
116
Prakash khanal, NCIT
Example 4
Prove that:
A + AB = A + B
117
Prakash khanal, NCIT
Example 4
Prove that:
A + AB = A + B
L.H.S = A + AB
= A(1) + AB
= A(1+ B) + AB
= A + AB + AB
= A+ B(A+ A)
=A+B ( A + A= 1)
L.H.S = R.H.S
118
Prakash khanal, NCIT
Example 5
Prove that:
(A+ B)(A+ B) = A
119
Prakash khanal, NCIT
Example 5
Prove that:
(A+ B)(A+ B) = A
121
Prakash khanal, NCIT
Example 6
122
Prakash khanal, NCIT
Example 7
123
Prakash khanal, NCIT
Example 7
L.H.S. = AB + AB + AB
= AB + AB + AB
= A(B + B) + AB
= A + AB ( B + B = 0)
= (A+ A)(A+ B) ( A +AB = (A+ A)(A+ B))
=1.(A+ B) ( A + A= 1)
=A+B
L.H.S = R.H.S 124
Prakash khanal, NCIT
Example 8
125
Prakash khanal, NCIT
Example 8
F = XY + XYZ + XYZ + X ZY
= XY + XYZ + X ZY ( XYZ+XYZ=XYZ)
= XY (1+ Z + Z)
= XY ( 1+ Z + Z = 1)
= XY
126
Prakash khanal, NCIT
Example 9
127
Prakash khanal, NCIT
Example 9
L.H.S. = AB + ABC + AB
_
= AB(1+ C)
_
+AB
= AB + AB ( 1+ C= 1)
_
= A(B + B)
=A ( B + B = 1)
L.H.S = R.H.S
128
Prakash khanal, NCIT
Logic Families
129
Prakash khanal, NCIT
Logic Families
132
Prakash khanal, NCIT
Standard Representation
Y = A . B + B .C + A.C
Product
Y = ( A + B).(B + C).( A + C )
Sum
Y = ( A + B + C).( A + B + C).( A + B + C )
Each sum term
consists all the
literals
Sr.
Expression Type
No.
2 Y = AB + AB + AB Standard SOP
Procedure:
1. Write down all the terms.
2. If one or more variables are missing in any
product term, expand the term by multiplying it
with the sum of each one of the missing
variable and its complement .
Y = AB + AC + BC
Missing literal is A
Missing literal is B
Missing literal is C
Procedure:
1. Write down all the terms.
2. If one or more variables are missing in any sum
term, expand the term by adding the products
of each one of the missing variable and its
complement.
Convert given expression into its standard SOP form Y = (A+ B).(A+ C).(B + C)
Missing literal is A
Missing literal is B
Missing literal is C
Y = ( A + B + C C ) . ( A + C + B B ) . ( B + C +A A )
A B C mi Mi
0 0 0 ABC = m0 A+ B+C = M 0
0 0 1 ABC = m1 A+ B+C = M 1
0 1 0 ABC = m2 A+ B+C = M 2
0 1 1 ABC = m3 A+ B+C = M 3
1 0 0 ABC = m4 A+ B+C = M 4
1 0 1 ABC = m5 A+ B+C = M 5
1 1 0 ABC = m6 A+ B+C = M 6
1 1 1 ABC = m7 A+ B+C = M 7
11/8/2020 Prakash khanal,NCIT 16
Representation of Logical expression using minterm
m7 m3 m4 m5 Corresponding
minterms
Y = m7 + m3 + m 4 + m5
Y = m(3, 4, 5, 7) OR
Y = f ( A, B, C) = m(3, 4, 5, 7)
M2 M0 M6 Corresponding
maxterms
Y = M 2.M 0.M 6
Y = M (0, 2, 6) OR
Y = f ( A, B, C) = M (0, 2, 6)
Y = A + BC + ABC
2. Convert the given expression into standard form
Y = ( A + B).( A + C)
simplification techniques.
on K-map.
A A A A
A A
B 0 1 B 0 1
AB AB m0 m1
B 0 B 0
B 1 AB AB B 1 m2 m3
A B Y 0 0
B 0
0 0 0 B 1 1 1
0 1 1
1 0 0
B B
B
A 0 1
1 1 1
A 0 1
0
A 1 0 1
11/8/2020 Prakash khanal,NCIT 26
Karnaugh Map (K-map)
➢ K-map Structure - 3 Variable
✓ A, B & C are variables or inputs
✓ 3 variable k-map consists of 8 boxes i.e. 23=8
BC
A 00 01 11 10
BC
00 01 11 10
A
ABC ABC ABC ABC
0
1 ABC ABC ABC ABC
CD
AB 00 01 11 10
00
01
11
10
AB CD
CD 00 01 11 10 AB 00 01 11 10
AB CD
CD 00 01 11 10 AB 00 01 11 10
00 m0 m4 m12 m8 00 m0 m1 m3 m2
01 m1 m5 m13 m9 01 m4 m5 m7 m6
11 m3 m7 m15 m11 11 m12 m13 m15 m14
ABC ABC
BC BC BC BC BC
A 00 01 11 10
1 1 0 0
A 0
A 1 1 0 1 1 ABC
ABC ABC
BC BC BC BC BC
A 00 01 11 10
A 0 0 0 1 1 Y = ABC + ABC
A 1 0 0 0 0 Y = AB(C + C)
Y = AB ( C + C = 1)
BC BC BC BC BC BC BC BC BC BC
A 00 01 11 10 A 00 01 11 10
0 0 0 0 0 1 1 1
A 0 A 0
A 1 1 0 0 1 A 1 0 0 1 0
BC BC BC BC BC B B B
A 00 01 11 10 A 0 1
0 1 0 0 1 1
A 0 A 0
A 1 0 1 0 0 A 1 1 0
CD CD CD CD CD CD CD CD CD CD
AB 00 01 11 10 AB 00 01 11 10
AB 00 0 0 0 0 AB 00 0 1 0 0
AB 01 0 0 0 0 AB 01 0 1 0 0
AB 11 0 0 0 0 AB 11 0 1 0 0
AB 10 1 1 1 1 AB 10 0 1 0 0
CD CD CD CD CD CD CD CD CD CD
AB 00 01 11 10 AB 00 01 11 10
AB 00 0 0 0 0 AB 00 0 1 1 0
AB 01 1 1 0 0 AB 01 0 0 0 0
AB 11 1 1 0 0 AB 11 0 0 0 0
AB 10 0 0 0 0 AB 10 0 1 1 0
CD CD CD CD CD CD CD CD CD CD
AB 00 01 11 10 AB 00 01 11 10
AB 00 1 0 0 1 AB 00 0 0 0 0
AB 01 0 0 0 0 AB 01 1 0 0 1
AB 11 0 0 0 0 AB 11 1 0 0 1
AB 10 1 0 0 1 AB 10 0 0 0 0
CD CD CD CD CD CD CD CD CD CD
AB 00 01 11 10 AB 00 01 11 10
AB 00 0 0 0 0 AB 00 0 0 0 0
AB 01 0 1 1 1 AB 01 0 1 1 0
AB 11 0 1 1 1 AB 11 0 1 1 0
AB 10 0 0 0 0 AB 10 0 1 1 0
CD CD CD CD CD CD CD CD CD CD
AB 00 01 11 10 AB 00 01 11 10
AB 00 0 0 0 0 AB 00 0 1 1 0
AB 01 0 0 0 0 AB 01 0 1 1 0
AB 11 1 1 1 1 AB 11 0 1 1 0
AB 10 1 1 1 1 AB 10 0 1 1 0
CD CD CD CD CD CD CD CD CD CD
AB 00 01 11 10 AB 00 01 11 10
AB 00 1 1 1 1 AB 00 1 0 0 1
AB 01 0 0 0 0 AB 01 1 0 0 1
AB 11 0 0 0 0 AB 11 1 0 0 1
AB 10 1 1 1 1 AB 10 1 0 0 1
A
A A A
A A
B 0 1 B 0 1
0 0 0 0
B B
B 1 1 B 1 1 1
Not Accepted
Accepted
A
A A A
A A
B 0 1 B 0 1
0 0 1 0 0 1
B B
B 1 1 0 B 1 1 1
BC BC BC BC BC
A 00 01 11 10
0 0 0 1
A 0
A 1 0 0 1 0
BC BC BC BC BC
A 00 01 11 10
1 1 1 1
A 0
A 1 0 0 1 1
CD CD CD CD CD
AB 00 01 11 10
BC BC BC BC BC
AB 00 1 1 1 1 A 00 01 11 10
AB 01 0 0 0 0 A 0 1 0 0 1
AB 11 0 0 0 0 A 1 1 0 0 1
AB 10 1 1 1 1
AB AB AB AB AB
C 00 01 11 10
C 0 0 1 1 1
C 1 0 0 1 0
AB __ _ _
C AB AB AB AB
_
0 1 1 1 AC
C 0
C 1 0 0 1 0
BC AB
Y = BC + AB + AC
AB AB AB AB AB
C 00 01 11 10
C 0 1 1 0 1
C 1 1 0 0 1
AB AB AB AB AB
C 00 01 11 10
C 0 1 1 0 1
C 1 1 0 0 1
AC B
BC _ _ _ _ _
A BC BC BC BC AB
1 1 1
A 0 0
A 1 1 0 0
0
AC
ABC
Simplified Boolean expression
Y = A C + AB + A B C
11/8/2020 Prakash khanal,NCIT 56
Example 4
Y = m(0,1, 2, 5,13,15)
CD CD CD CD CD
___
AB 00 01 11 10 ABD
0 1 3 2
AB 00 1 1 0 1
4 5 7 6
AB 01 0 1 0 0
Simplified Boolean expression
12 13 15 14
AB 11 0 1 1 0
Y = A B D + ACD + ABD
8 9 11 10
AB 10 0 0 0 0
ACD ABD
f ( A, B, C, D) = m(1,3,5,9,11,13)
f ( A , B , C , D ) = m(1, 3, 5, 9,11,13)
CD CD CD CD CD
AB 00 01 11 10
0 1 3 2
AB 00 0 1 1 0
4 5 7 6
AB 01 0 1 0 0
Simplified Boolean expression
12 13 15 14
AB 11 0 1 0 0
f = BD + CD
8 9 11 10
AB 10 0 1 1 0 f = D(B + C)
CD BD
__ _ _
CD CD CD CD CD
AB 00 01 11 10 BC
AB 00 0 1 3 2
0 0 0 0
AB 01 4 5 7 6
1 1 0 0 Simplified Boolean expression
AB 11 12 13 15 14
1 1 1 0 f = BC + AC + AD
AB 10 8 9 11 10
1 1 1 0
AC AD
f 2( A, B, C, D) = m(0,1, 2, 3,11,12,14,15)
CD CD CD CD CD
__
AB 00 01 11 10 AB
0 1 3 2
AB 00 1 1 1 1
4 5 7 6
AB 01 0 0 0 0
Simplified Boolean expression
AB 11 1 12 0
13
1
15
1
14
f 2 = AB + ABD + ACD
8 9 11 10
AB 10 0 0 1 0
ABD ACD
AC
BC BC BC BC BC BC BC BC BC BC
A 00 01 11 10 A 00 01 11 10
0 1 3 2 0 1 3 2
1 1 1 0 1 1 1 1
A 0 A 0
4 5 7 6 4 5 7 6
A 1 1 1 0 0 A 1 0 0 1 1
A B
B
f 1 = AC + B f 2= A +B
Simplify ;
C BD
1 f 1( A, B, C, D) = m(0,1, 3, 4, 5, 7)
2
f 2( A, B, C) = m(0,1, 3, 4, 5, 7)
Boolean expression
Simplify ;
f ( A, B, C, D) = M (0,1,3,5, 6, 7,10,14,15)
A +B +C A +C +D
Simplify ;
f ( A, B, C, D) = M (4, 6,10,12,13,15)
A +B +C A +B +C +D
A +B +D
Simplified Boolean expression
f = ( A + B + C + D)( A + B + D)( A + B + D)( A + B + C )
11/8/2020 Prakash khanal,NCIT 77
K-map and don’t care conditions
Simplify ;
AB 11 0 0 1 0
0 0 1 0
AB 10
_ _ _
f = C D + AB + AD
00 0 1 3 2 6 7 5 4
01 8 9 11 10 14 15 13 12
11 24 25 27 26 30 31 29 28
10 16 17 19 18 22 23 21 20
Five-variable k-map
00 1 0 0 1 1 0 0 1
01 0 1 1 0 0 1 1 0
11 0 1 1 0 0 1 1 0
10 0 1 0 0 0 0 1 0
___ _
F=ABE+ADE+BE
➢Combinational Logic
➢Sequential Logic
Block diagram
11/12/2020 Prakash khanal,NCIT 2
Design procedure:
The design steps for combinational logic are:
• Question is given to you.
• Find the number of i/p and o/p.
• Draw the truth table.
• Simplify the o/p using K-map. Simplification
is done for o/p only.
• Draw the logic diagram.
A Sum
Input Output
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
A 0 0 0 C = AB
A 1 0 1
Logic Diagram:
A
S = A B
B
C = AB
A B
S = A B
C = AB
A Sum
0 0 1 1 0
0 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
BC BC BC BC BC
00 01 11 10
A S = ABC + ABC + ABC + ABC
0 1 0 1
A 0 S = ABC + ABC + ABC + ABC
A 1 1 0 1 0 S = C( AB + AB) + C( AB + AB)
Let AB + AB = X
ABC
ABC ABC
ABC S = C( X ) + C( X )
S = C X
Let X = A B
S = C A B
11/12/2020 Prakash khanal,NCIT 11
Full Adder
BC BC BC BC BC
A 00 01 11 10
0 0 1 0
A 0
C = AB + BC + AC
A 1 0 1 1 1
BC
AB
AC
A B C
S = A B C
C = AB + BC + AC
A S0 S1 Sum
HA1 HA2
B C0 C1
C
Carry
A Difference
Input Output
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
0 1
A 0 B = AB
A 1 0 0
A
D = A B
B
B = AB
A B
D = A B
B = AB
A Difference
Bin
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
BC BC BC BC BC
00 01 11 10
A D = ABC + ABC + ABC + ABC
0 1 0 1
A 0 D = ABC + ABC + ABC + ABC
A 1 1 0 1 0 D = C( AB + AB) + C( AB + AB)
Let AB + AB = X
ABC
ABC ABC
ABC D = C( X ) + C( X )
D=CX
Let X = A B
D = C A B
11/12/2020 Prakash khanal,NCIT 23
Full Subtractor
BC BC BC BC BC
A 00 01 11 10
0 1 1 1
A 0
B 0 = AB + BC + AC
A 1 0 0 1 0
BC
AB
AC
D = A B C
B 0 = A B + B C + AC
A D0 D1
Difference
HS1 HS2
B B0 B1
C
Borrow
G3 B3
G2 Gray to B2 Binary
Gray
Binary Code Outputs
Inputs G1 B1
converter B0
G0
G G2 G1 G0 B3 B2 B1 B0 G3 G2 G1 G0 B3 B2 B1 B0
3
0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0
0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1
0 0 1 0 0 0 1 1 1 0 1 0 1 1 1 1
0 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0
0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0
0 1 0 1 0 1 1 1 1 1 0 1 1 0 1 1
0 1 1 0 0 1 0 1
1 1 1 0 1 0 0 1
0 1 1 1 0 1 0 0
9 1 1 1 1 1 0 0 0
11/12/2020 Prakash khanal,NCIT 29
Design of Gray to Binary Code Converter
K-map for B0: G1G0 G1G0 G1G0 G1G0 G1G0
G 3G 2 00 01 11 10
0 1 3 2
G3G2 00 0 1 0 1
4 5 7 6
GG23 01 1 0 1 0
12 13 15 14
G3G2 11 0 1 0 1
8 9 11 10
G3G2 10 1 0 1 0
B1 = G3G2G1 + G3G2G1 + G 3 G 2 G 1 + G 3 G 2 G 1
B1 = G 3 G 2 G1
B2 = G3G2 + G3G2
B1 = G 3 G 2
B3 = G3
Logic Diagram:
G3 G2 G1 G0
B3
B2 = G3 G2
B1 = G1 G2 G3
B0 = G0 G1 G2 G3
Block Diagram:
B3 G3
B2 Binary to G2
Binary Gray Code Gray
B1 G1
Inputs Outputs
converter
B0 G0
B3 B2 B1 B0 G3 G2 G1 G0 B3 B2 B1 B0 G3 G2 G1 G0
0 0 0 0 0 0 0 0
1 0 0 0 1 1 0 0
0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 1
0 0 1 0 0 0 1 1 1 0 1 0 1 1 1 1
0 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0
0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0
0 1 0 1 0 1 1 1 1 1 0 1 1 0 1 1
0 1 1 0 0 1 0 1 1 1 1 0 1 0 0 1
0 1
11/12/2020 1 1 0 1 0 0 1
Prakash khanal,NCIT 1 1 1 1 0 36 0
0 145
Design of Binary to Gray Code Converter
B1B0 B1B0
B2B1 B2B1
G2 = B3B2 + B3B2
4 5 7 6
B B23 01 1 1 1 1
12 13 15 14
B3B2 11 0 0 0 0 G2 = B3 B2
8 9 11 10
B3B2 10 1 1 1 1
B3B2 B3B2
B B23 01 0
4
0
5
0
7
0
6
G 3 = B3
12 13 15 14
B3B2 11 1 1 1 1
8 9 11 10
B3B2 10 1 1 1 1
B3
Logic Diagram:
B3 B2 B1 B0
G3
G 2 = B3 B 2
G1 = B2 B1
G0 = B1 B0
Simplify the k map for output and draw the logic daigram.
11/12/2020 Prakash khanal,NCIT 51
Unit-6: LSI and MSI component on
combinational logic
An − 1 Bn − 1 A2 B2 A1 B1 A0 B0
Sn − 1 S2 S1 S0
A3 B3 A2 B2 A1 B1 A0 B0
S3 S2 S1 S0
Vcc +5V
C0
Carry IC 7483 Cin = 1
Output S3 S 2 S1 S0 It adds 1 to 1’s
complement of B
Difference Output
C0
Carry IC 7483
C in
Output S3 S 2 S1 S0
• The above circuit gives the binary sum. Now we have to convert the
binary sum into BCD sum. For this, we have to design a circuit
which converts the binary sum into BCD sum. The truth table is as:
‘n’ ‘m’
. Encoder .
inputs . .
outputs
. .
✓Priority Encoder
will be considered.
Highest Priority
D0
D1 Y2
D2 ‘3’
Priority
‘8’ D3 Y1 outputs
Encoder
inputs D4 8:3 Y0
D5
D6
D7
Lowest Priority
0 0 0 0 0 0 0 1 0 0 0
0 0 0 0 0 0 1 X 0 0 1
0 0 0 0 0 1 X X 0 1 0
0 0 0 0 1 X X X 0 1 1
0 0 0 1 X X X X 1 0 0
0 0 1 X X X X X 1 0 1
0 1 X X X X X X 1 1 0
1 X X X X X X X 1 1 1
11/29/2020 prakash khanal,NCIT 17
Decimal to BCD Encoder
D1
D2 A
D3
D4 Decimal to B. ‘BCD’
‘9’ D5 BCD C. outputs
inputs D6 Encoder
D7 D
D8
D9
‘n’ ‘2n’
. decoder .
inputs . .
outputs
. .
✓Code Converters
✓Relay actuators
✓2 to 4 line Decoder
✓3 to 8 line Decoder
E Enable
Input Enable
Data Inputs Outputs
i/p
E A B Y0 Y1 Y2 Y3
0 X X 0 0 0 0
1 0 0 1 0 0 0
Truth Table
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
11/29/2020 prakash khanal,NCIT 24
2 to 4 Line Decoder
E A B
A B
Y0
Y1
Y2
Y3
Block Diagram
Y0
A Y1
Input Y2
B Y3
3:8
Y4
Decoder
C Y5
Y6
Y7
Enable
Input
Enabl
Inputs Outputs
e i/p
E A B C Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
0 X X X 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 1
1 0 0 1 0 0 0 0 0 0 1 0
1 0 1 0 0 0 0 0 0 1 0 0
1 0 1 1 0 0 0 0 1 0 0 0
1 1 0 0 0 0 0 1 0 0 0 0
1 1 0 1 0 0 1 0 0 0 0 0
1 1 1 0 0 1 0 0 0 0 0 0
1 11/29/20201 1 1 1 0 0
prakash khanal,NCIT 0 0 0 0 27
0
Implement a full adder using decoder
Sr.
Parameter Encoder Decoder
No.
1 Input applied Active input signal Coded binary input
(original message signal)
3 Input lines 2n n
4 Output lines N 2n
f b
g
e c
ON ON ON ON ON ON OFF 0
ON ON OFF ON ON OFF ON 2
ON ON ON ON OFF OFF ON 3
ON OFF ON ON OFF ON ON 5
ON OFF ON ON ON ON ON 6
ON ON ON ON ON ON ON 8
ON11/29/2020ON ON ON OFF ON
prakash khanal,NCIT ON 9 36
Magnitude comparator:
• Magnitude comparator is a combinational
circuit, designed to compare two n bits words
applied as its input.
• The comparator has three output namely
greater(A>B), lesser(A<B) and equal (A=B).
Depending upon the result of comparison,
one of these outputs will go high.
✓In D to A converters.
D0 D0
D1 D1
Data D2 D2
Inputs D3 Y
D3
. n:1 .
. .
. Mux Output .
. . Output
. .
Dn-1 Dn-1
E
Enable Input
. . .. . . ..
Sm-1 S2 S1 s0 Sm-1 S2 S1 s0
Select Lines
that 2m=n.
✓2:1 Multiplexer
✓4:1 Multiplexer
✓8:1 Multiplexer
✓16:1 Multiplexer
✓32:1 Multiplexer
✓64:1 Multiplexer
and so on…………
11/29/2020 prakash khanal,NCIT 47
2:1 Multiplexer
Data D0
Inputs 2:1 Y
D1 Block Diagram
Mux
Output
E
Enable Input
s
Select Lines
Enable i/p Select i/p Output
(E) (S) (Y)
0 X 0
Truth Table 1 0 D0
1 1 D1
S D1 D0
S
SD0
Y
Output
SD 1
E
Enable Input
Output
Enable i/p Select i/p
D0
D1 E S1 S0 Y
Data
Y
Inputs D2 4:1
Mux 0 X X 0
D3 Output
D0
1 0 0
E
1 0 1 D1
Enable Input
S1 S0
1 1 0 D2
Select Lines
D3
1 1 1
S1 S0
S1S 0D0
D0
S1S 0 D 1
D1 Y
Output
D2
S1S 0D2
E
D3 S1S 0 D3 Enable Input
D0
Outp
D1 Enable
Select i/p ut
i/p
D2
D3 E S2 S1 S0 Y
Data
Y
Inputs D4 8:1 0 X X X 0
Mux Output 1 0 0 0 D0
D5
1 0 0 1 D1
D6
1 0 1 0 D2
D7
1 0 1 1 D3
1 1 0 0 D4
E
1 1 0 1 D5
Enable Input
1 1 1 0 D6
S2 S1 S0 1 1 1 1 D7
11/29/2020 Select Lines prakash khanal,NCIT 52
16:1 Multiplexer
Block Diagram
D0
D1
D2
D3
D4
D5
Data D6 Y
Inputs D7 16:1
D8 Mux
D9 Output
D10
D11
D12
D13
D14
D15
E
Enable Input
S3 S2 S1 S0
Select Lines
11/29/2020 prakash khanal,NCIT 53
16:1 Multiplexer Enable Select Lines Output
E S3 S2 S1 S0 Y
0 X X X X 0
1 0 0 0 0 D0
1 0 0 0 1 D1
1 0 0 1 0 D2
1 0 0 1 1 D3
1 0 1 0 0 D4
1 0 1 0 1 D5
1 0 1 1 0 D6
Truth Table 1 0 1 1 1 D7
1 1 0 0 0 D8
1 1 0 0 1 D9
1 1 0 1 0 D10
1 1 0 1 1 D11
1 1 1 0 0 D12
1 1 1 0 1 D13
1 1 1 1 0 D14
1 1 1 1 1 D15
11/29/2020 prakash khanal,NCIT 54
Mux Tree
D0
D1
Y1
D2 4:1
Mux
D3
S2 E S1 S0 Y
Select
Lines S1
S0 Output
S1 S0
D4
D5
4:1
D6 Mux
Y2
D7
E
11/29/2020 prakash khanal,NCIT 56
8:1 Multiplexer using 4:1 Multiplexer
D0
D1
Y1
D2 4:1
Mux
D3
D0
E S1 S0 2:1 Y
D1
S1 Mux
S0 Output
E
S1 S0
D4
D5 S2
4:1
D6 Mux
Y2
D7
E
11/29/2020 prakash khanal,NCIT 57
D0
4:1 Y1
16:1 Mux using 4:1 Mux
D1
D2 Mux
D3
S1 S0
S1
S0
D4 S1 S0
D5 4:1 Y2
D6 Mux
D7
D0
4:1 Y
D1
D2 Mux
D3 S S2 Output
D8 3
D9 4:1 Y3
D10 Mux
D11
S1 S0 S3 S2
D12 S1 S0
D13 4:1 Y4
D14 Mux
11/29/2020 D15 prakash khanal,NCIT 58
Realization of Boolean expression using Mux
using Multiplexers.
f ( A, B , C ) = m ( 0 , 3, 5, 6 )
+Vcc f ( A, B , C ) = m ( 0 , 3, 5, 6 )
D0
D1
D2
D3
Y
D4 8:1
Mux
Output
D5
D6
D7
E S2 S1 S0
A B C
11/29/2020 prakash khanal,NCIT 61
Example 2
f ( A, B , C , D ) = m ( 0 , 2, 3, 6 , 8 , 9 , 1 2 , 14)
+Vcc
f ( A, B , C , D ) = m ( 0 , 2, 3, 6 , 8 , 9 , 1 2 , 1 4 )
D0
D1
D2
D3
D4
D5
D6 Y
D7 16:1
D8 Mux
D9 Output
D10
D11
D12
D13
D14
D15
S3 S2 S1 S0
E
A B C D
11/29/2020 prakash khanal,NCIT 63
11/29/2020 prakash khanal,NCIT 64
11/29/2020 prakash khanal,NCIT 65
De-multiplexer
Y0 Y0
Y1 Y1
Y2 Y2
Data Y3 Y3
Input 1:n . Data .
. .
De-mux .
Outputs Input .
Output
. .
. .
Yn-1 Yn-1
E
Enable
Input . . .. . . ..
Sm-1 S2 S1 s0 Sm-1 S2 S1 s0
Select Lines
that n=2m.
✓1:2 De-multiplexer
✓1:4 De-multiplexer
✓1:8 De-multiplexer
✓1:16 De-multiplexer
✓1:32 De-multiplexer
✓1:64 De-multiplexer
and so on…………
11/29/2020 prakash khanal,NCIT 69
1: 2 De-multiplexer
Y0
Data Din 1:2
Block Diagram
Input De-mux
Y1
E
Enable
Input S
Select Lines
E S Y0 Y1
Truth Table 0 X 0 0
1 0 Din 0
1 1 0 Din
E Din S
S
Y0
Y1
E S1 S0 Y0 Y1 Y2 Y3
0 X X 0 0 0 0
1 0 0 Din 0 0 0
1 1 0 0 0 Din 0
1 1 1 0 0 0 Din
11/29/2020 prakash khanal,NCIT 72
1:4 De-mux using basic gates
E Din S 1 S0
S1 S0
Y0
Y1
Y2
Y3
Block Diagram
Y0
Y1
Data Din Y2
1:8 Y3
Input Y4
De-mux
Y5
Y6
E Y7
Enable
Input
S2 S1 S0
Select Lines
Enabl
Select i/p Outputs
e i/p
E S2 S1 S0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
0 X X X 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 Din
1 0 0 1 0 0 0 0 0 0 Din 0
1 0 1 0 0 0 0 0 0 Din 0 0
1 0 1 1 0 0 0 0 Din 0 0 0
1 1 0 0 0 0 0 Din 0 0 0 0
1 1 0 1 0 0 Din 0 0 0 0 0
1 1 1 0 0 Din 0 0 0 0 0 0
1
11/29/2020 1 1 Din prakash khanal,NCIT
0 0 0 0 0 0 75
0
1
1: 16 De-multiplexer
Y0
Block Diagram
Y1
Y2
Y3
Y4
Y5
Y6
Din
Data Y7
Input Y8
1:16
Y9
De-mux
Y10
Y11
Y12
Y13
Y14
E Y15
Enable
Input
S3 S2 S1 S0
Data Y0 Y0
1:2
Input Din De-mux
Y1 Y1
S1 E S0
Select
Lines
S0
S0
Y0 Y2
Din 1:2
De-mux
Y1 Y3
E
S1 S0 Y4
1:4 Y5
Din Y6
Data Y0 De-mux
Din 1:4 Y7
Input Y1
De-mux Y2
Y3
S3 SS20
Y8
1:4 Y9
Din De-mux
Y10
S3 S2 S1 S0 Y11
S1 S0 Y12
Din 1:4 Y13
De-mux Y14 S1 S0
11/29/2020 prakash khanal,NCIT Y15 79
Decoder
decoder
E Enable
Input Enable
Data Inputs Outputs
i/p
E A B Y0 Y1 Y2 Y3
0 X X 0 0 0 0
1 0 0 1 0 0 0
Truth Table
1 0 1 0 1 0 0
1 1 0 0 0 1 0
1 1 1 0 0 0 1
11/29/2020 prakash khanal,NCIT 81
De-multiplexer as Decoder
decoder.
Vcc
Y0 Din Y0
A S1
Data Din 1:4 Y1 Inputs
1:4 Y1
Input De-mux Y2 S0 De-mux Y2
B
Y3 Y3
E
Enable E Enable
Input
S1 S0 Input
Select Lines
using de-multiplexers.
f ( A, B , C ) = m ( 0 , 3, 5, 6 )
f ( A, B , C ) = m ( 0 , 3, 5, 6 )
+Vcc Y0
Y1
Data Y2
Din 1:8 Y3 Y
Input
De-mux Y4
Y5
Y6
E S2 S1 S0 Y7
Enable
Input
A B C
f ( A, B , C , D ) = m ( 0 , 2, 3, 6 , 8 , 9 , 1 2 , 1 4 )
Y0
Y1
Y2
+Vcc Y3
Y4
Y5
Y6
Data 1:16 Y7 Y
Input De-mux Y8
Din
Y9
Y10
Y11
Y12
Y13
Y14
E S1 SY0 15
S S
3 2
Enable
Input f ( A, B , C , D ) = m ( 0 , 2, 3, 6 , 8 , 9 , 1 2 , 1 4)
A B C D
11/29/2020 prakash khanal,NCIT 88
Tristate Logic
Q0 Q1 Q2 Q3
CLK
SISO – Serial In Serial Out Shift Register (Shift Right)
Serial Data Serial Data
Input Output
DIN D3 Q3 D2 Q2 D1 Q1 D0 Q0
Q3 Q2 Q1 Q0
CLK
SIPO – Serial In Parallel Out Shift Register
Serial Data
Input
DIN D0 Q0 D1 Q1 D2 Q2 D3 Q3
Q0 Q1 Q2 Q3
CLK
Q0 Q1 Q2 Q3
Parallel Outputs
PIPO – Parallel In Parallel Out Shift Register
Parallel Data Input
D0 D1 D2 D3
D0 Q0 D1 Q1 D2 Q2 D3 Q3
Q0 Q1 Q2 Q3
CLK
Q0 Q1 Q2 Q3
Parallel Outputs
PISO – Parallel In Serial Out Shift Register
PISO – Parallel In Serial Out Shift Register
Load Mode:
When the Shift / Load line is Low, the AND gates G1, G2
and G3 become active. They will pass D1, D2, and D3
bits to the corresponding Flip Flops.
Shift Mode:
When the Shift / Load line is High, the AND gates G1, G2
and G3 become inactive. Hence parallel loading of
data becomes impossible.
But AND gates G4, G5 and G6 become active.
Therefore the shifting of data from left to right bit by
bit on application of clock pulses
A register capable of shifting its binary information either to the right or to the left.
The logical configuiration of shift register consists of a chain of flipflop connected in cascade.
A flipflop receives a common clock pulse which causes the shift from one stage to another.
Serial transfer:
A register capable of shifting its binary information either to the right or to the left.
The logical configuiration of shift register consists of a chain of flipflop connected in cascade.
A flipflop receives a common clock pulse which causes the shift from one stage to another.
Serial transfer:
Figure below shows the block diagram of an 8 bit Alu with a 4 bit status register.
The four status bits or flag bits are symbolized by C , S , Z and V.
The bit are set or cleared as a result of an operation performed in the ALU.