0% found this document useful (0 votes)
9 views80 pages

DigitalLogicSystem_1pg

The document provides an overview of digital logic systems, focusing on logic gates, Boolean algebra, and combinational logic. It outlines the advantages and disadvantages of digital systems, explains basic Boolean operations, and introduces methods for simplifying logic expressions using Karnaugh maps. Additionally, it includes examples and exercises for evaluating and designing digital circuits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views80 pages

DigitalLogicSystem_1pg

The document provides an overview of digital logic systems, focusing on logic gates, Boolean algebra, and combinational logic. It outlines the advantages and disadvantages of digital systems, explains basic Boolean operations, and introduces methods for simplifying logic expressions using Karnaugh maps. Additionally, it includes examples and exercises for evaluating and designing digital circuits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 80

Digital Logic System

• Introduction
• Logic gate and Boolean algebra
• Combinational logic

Electrical Circuit 1
Digital System
• Data represented by binary (base-2) number
• Implementation of well founded logic theory
Voltage Voltage
5V
TRUE (ON) Binary 1 Noise tolerance
2V

0.8V
FALSE (OFF) Binary 0 Noise tolerance

0 0 1 1
Electrical Circuit 2
Pros of Digital System
• Noise tolerance
• Easier to design: exact value unimportant
• Easy information storage: special device and
circuit
• Greater accuracy and precision: no limit from
circuit component and random noise
• Programmable operation
• More digital circuitry fabricated in IC chips
Electrical Circuit 3
Con of Digital Techniques

The real world is mainly analog!

Electrical Circuit 4
Typical Control System
Analog Analog Digital
signal Measuring device signal A-to-D converter Signal

Digital Processing

Analog Digital
Control
Controller signal D-to-A converter Signal
signal

Electrical Circuit 5
Common Approach
• Number system

• Boolean algebra

• Combinatorial logic

Electrical Circuit 6
Objectives
• To be able to analyze the combinational logic
system.
• To be able to design some simple systems.
• To be able to simplify the Boolean expression
by K-map.
• To be able to simplify the Boolean expression
by Boolean algebra.

Electrical Circuit 7
Boolean Algebra
• 2 possible values: 0,1
• Boolean values represent logic level (state of
voltage variable) not actual number
Logic 0 Logic 1
False True
Off On
Low High
No Yes
Open Switch Closed Switch
Electrical Circuit 8
Basic Boolean Operators
• OR
• Return 1 when at least one of the input is 1

• AND
• Return 1 when all inputs are 1

• NOT
• Return 0 when the input is 1 and vice versa

Electrical Circuit 9
Truth Table
• Table showing the dependency of logic
circuit’s output to inputs
• E.g. A ? X
B

A B X
0 0 1
0 1 0
1 0 1
1 1 0
INPUT OUTPUT
Electrical Circuit 10
Three-Input Circuit
A B C X
0 0 0 0
0 0 1 1 A
0 1 0 1 B ? X
C
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
Electrical Circuit 11
OR Operation
• Boolean Expression: x = A + B
• Output is a logic one when either or both inputs
are logic one
A B x =A + B A
x
0 0 0 B
0 1 1
OR GATE
1 0 1 Circuit whose output is OR
combination of the input
1 1 1
Electrical Circuit 12
Timing Diagram: OR Gate

Electrical Circuit 13
AND Operation
• Boolean expression: x = A ⋅ B = AB
• Output is logic one when both inputs are
logic one (similar to ordinary multiplication).
A B x=A⋅B
A
0 0 0 x
B
0 1 0
AND GATE
1 0 0 Circuit whose output is AND
1 1 1 combination of the input

Electrical Circuit 14
Timing Diagram: AND Gate

Electrical Circuit 15
NOT Operation
• Boolean expression: x = A = A’
• Inverse (complement) operation Small circle denotes
• 1 = 0 ; NOT 1 is 0 inversion.

• 0 = 1 ; NOT 0 is 1

1 input
A x=A NOT GATE
0 1 Circuit whose output is the
inverse of the input
1 0
Electrical Circuit 16
Timing Diagram: Inverter

Electrical Circuit 17
Algebraic Description
• Any logics are describable by Boolean ops.
• Order of operation
• NOT (of single terms)
• AND
• OR
A
• x = C + AB AB
B x
C

Electrical Circuit 18
Evaluation of Logic Circuit’s Output
• Perform all inversion of single terms
• Perform all operations within parentheses
• Perform AND operations before OR
operations unless parentheses indicate
otherwise
• If an expression has a bar over it, perform the
operation inside the expression before
inverting the result

Electrical Circuit 19
Ex. (1): Logic Evaluation
Evaluate x = AB(C+D) + DE for
A = 0, B = 1, C =0, D = 0, E = 1

x = AB(C+D)+DE = 0 ⋅ 1 ⋅ (0 + 0) + 0 ⋅ 1
= 1 ⋅ 1 ⋅ (0 + 0) + 1 ⋅ 1 = 1 ⋅ 1 ⋅ (0) + 1 ⋅ 1
= 1 ⋅ 1 ⋅ (1) + 1 ⋅ 1
=1+1 =1
Electrical Circuit 20
Ex.2: Logic Evaluation
• Evaluate from input to output
• A = 1, B = 1, C = 0, D = 1
A=1 1 0
B=1
0
C=0 0 x

D=1
0

Unnecessary to evaluate entire circuit!!


Electrical Circuit 21
Implementation from
Boolean Expression
• Draw the diagram directly from the
expression
• E.g. x = AC + BC + ABC
A
AC
B BC x
ABC

C
C

BC
Electrical Circuit 22
NOR Gate
• Boolean expression: x = (A + B)
Denotes
• Truth table and logic symbol inversion
A B A+B A+B
A
0 0 0 1 B
x

0 1 1 0
1 0 1 0 A
x
1 1 1 0 B

Electrical Circuit 23
NAND Gate
• Boolean expression: x = (A ⋅ B) = AB Denotes
• Truth table and logic symbol inversion

A B AB AB A
x
0 0 0 1 B

0 1 0 1
A
1 0 0 1 x
B
1 1 1 0

Electrical Circuit 24
Exclusive-OR (XOR)
• x = AB + AB = A⊕B
• Output is a logic one when the inputs are different

A B x =A⊕ B
0 0 0
0 1 1
1 0 1
1 1 0

Electrical Circuit 25
Equivalent Circuit: XOR

Electrical Circuit 26
Exclusive-NOR (XNOR)
• x = AB + AB = A⊕B
• Output is a logic one when the inputs are the same.

A B x =A⊕ B
0 0 1
0 1 0
1 0 0
1 1 1

Electrical Circuit 27
Equivalent Circuit: XNOR

Electrical Circuit 28
Exercise (1)

Electrical Circuit 29
Exercise (2)
y

y Output y is high only when A is


low and B is high

x
Output x is low when y and B
are both high

Electrical Circuit 30
General Logic Expression
• Sum-of-Products (SOP)

• Product-of-Sums (POS)

Electrical Circuit 31
Sum-of-Products Expression
• Two or more AND terms (products) that are ORed
together.
• Each AND products must consists of one or more
variable individually appearing.
• E.g.
ABC + ABC SOP
AB + ABC + CD + D SOP
AB + CD +EF SOP
AB + CD Not SOP!!
Electrical Circuit 32
Product-of-Sums Expression
• Two or more OR terms (sums) that are ANDed
together.
• Each OR terms must consists of one or more
variable individually appearing.
• E.g.
(A + B + C)(A + C) POS
(A + B)(C + D)F POS
(A + B + C + D)E POS
AB(C + D) Not POS!!
Electrical Circuit 33
Simple Digital Design
• Consider every input state that activates the
output (AND every state).
• Apply OR operator to combine every input
state in 1).
• If the output is active, when it is low, put the
INVERT to the result. Otherwise, left it as is.

Electrical Circuit 34
Ex (3): Landing LED
• During landing, a green LED display turns on
when all three gears are properly extended
and a red LED display turns on, otherwise.
• When the gear is properly extended, the state
is set to LOW.

Electrical Circuit 35
Ex (3): Landing LED (2)
Let the state of the three gears be A, B, C
Green LED turns on when all states are low ABC
INPUT : active-LOW
OUTPUT: depended on circuit
Red LED turns on when any state is high A+B+C
INPUT : active-HIGH
OUTPUT : depended on circuit

Electrical Circuit 36
Ex (3): Landing LED (3)

Electrical Circuit 37
Expression Simplification
• To reduce the number of necessary gates and
as the name suggest, simplify the logic
expression.

By K-map By Boolean theorem


Simple General cases

Limited to at most 6 inputs. More complex.

Electrical Circuit 38
Karnaugh Map (K Map)
• Graphic tool for simplifying logic equation or
convert truth table to the corresponding logic
circuit.
• Useful for up to 5 to 6 inputs.

Electrical Circuit 39
K Map and Truth Table
• Provide the same information as truth table
but in different format. Each square in the
map corresponding to the output of a
particular input states.
A B X
B B
0 0 1
A 1 0
0 1 0
1 0 0 A 0 1
1 1 1

Electrical Circuit 40
Example: K Map
A B C X
0 0 0 1
C C
0 0 1 1
0 1 0 1 AB 1 1
0 1 1 1 AB 1 1
1 0 0 0 AB 1 0
1 0 1 0 AB 0 0
1 1 0 1
1 1 1 0

Electrical Circuit 41
Characteristic of K Maps
• Horizontal and vertical adjacent squares in K
Map differ only in one variable.
• The top row is considered adjacent to the
bottom row and the left column is adjacent to
the right column.
• Labeling order: AB, AB, AB, AB

Electrical Circuit 42
SOP Form from K Map
• OR together expression for the squares
containing 1

C C
AB 1 1

AB 1 1
ABC + ABC + ABC + ABC
AB 1 0 + ABC
AB 0 0

Electrical Circuit 43
Looping: Groups of Two (Pairs)
• Looping a pair of adjacent 1s in K map
eliminates 1 variable that appears in
complemented and uncomplemented form.

Electrical Circuit 44
Example: Looping (Pairs)

Electrical Circuit 45
Looping: Groups of Four (Quads)
• Looping a group of four (quad) adjacent 1s in
K map eliminates 2 variables that appear in
complemented and uncomplemented form.

Electrical Circuit 46
Example: Looping (Quads)

Electrical Circuit 47
Looping: Groups of Eight (Octets)
• Looping a group of eight (octet) adjacent 1s
in K map eliminates 3 variables that appear
in complemented and uncomplemented form.

Electrical Circuit 48
Example: Looping (Octets)

Electrical Circuit 49
Simplification by K Map (SOP)
• Construct K map
• Examine the map for adjacent 1s
• Looping
• isolated 1s (no 1 neighbor) PAIR
• any 1s that are adjacent to only 1.
• any octets even they contain 1s that have already been
looped.
• any quads that contain one or more unlooped 1s. Use the
minimum number of loops.
• any pairs that contain one or more unlooped 1s. Use the
minimum number of loops.
• Form the OR sum of all the term generated by each
loop. Electrical Circuit 50
Example: Simplification by K Map
CD CD CD CD
AB 0 0 0 1

AB 0 1 1 0 ABCD
AB 0 1 1 0 +ACD
AB 0 0 1 0 +BD

Electrical Circuit 51
Exercise: Simplification by K map
CD CD CD CD CD CD CD CD
AB 0 1 0 0 AB 0 0 0 1

AB 0 1 1 1 AB 1 1 1 1

AB 1 1 1 0 AB 0 0 0 0

AB 0 0 1 0 AB 0 0 0 1

yCD + yBC + yCD + yBC

Electrical Circuit 52
Expression Simplification by K Map
• Transform the expression into SOP form
• Put 1s and 0s into K map accordingly
• Simplification by K map

Electrical Circuit 53
Ex(4): Expression Simplification
• Use a K map to simplify:
y = C(ABD + D) + ABC + D
Step 1: change to SOP form
y = CABD + CD + ABC + D
Step 2: create K map accordingly

Electrical Circuit 54
Ex(4): Expression Simplification (2)

Step 3: Looping CD CD CD CD
AB 1 1 0 1
Step 4: Write expression AB 1 1 0 1
accordingly:
AB 1 1 0 1

AB 1 1 1 1
y = AB + C + D
y = CABD + CD + ABC + D

Electrical Circuit 55
Five-Variable K Map
• Use two 4-variable K maps
• Cell adjacencies:

Electrical Circuit 56
Ex(5): 5-variable K Map

DE DE DE DE DE DE DE DE
BC 0 0 0 1 BC 0 0 0 1
BC 1 1 1 1 BC 1 0 0 1

BC 0 0 0 0 BC 0 0 0 0

BC 0 0 0 1 BC 0 1 0 1
A=0 A=1

ABCDE + BCDE + BCDE + ABC + BDE


Electrical Circuit 57
Don’t Care Condition
• No specified output in some input states
• Most probable cause:
• input states not occurred in reality
• Denoted by “x”
• Choose 1 or 0 to make the simplest design

Electrical Circuit 58
Example of Don’t Care Table

Electrical Circuit 59
Exercise (3): Binary Comparator
• Design the circuit that compare the value x1x0
with y1y0 and return high when the two
values are equal.
Step 1: Construct truth table
Step 2: Simplify the expression
Step 3: Draw the circuit

Electrical Circuit 60
Exercise (4): Circuit Simplification
• Simplify the following
circuit:
Step 1: Write the expression
Step 2: Simplify the
expression

Electrical Circuit 61
Ex.(6): Parity Circuit
The number of 1’s is an even number.
• Design the even-parity generator for 4-bit
data and design the even-parity checker for 5-
bit data (4 bit + 1 parity bit)

Electrical Circuit 62
Electrical Circuit 63
Boolean Theorems: Single Variable
1. x⋅0=0
2. x⋅1=x
AND OPERATOR
3. x⋅ x=x
4. x⋅ x=0
5. x+0=x
6. x+1=1
7. x+x=x OR OPERATOR
8. x+x=1
Electrical Circuit 64
Boolean Theorems: Multivariable
9. x + y = y + x commutative laws
10. x⋅ y = y⋅ x
11. x+(y+z) = (x+y)+z = x+y+z
associative laws
12. x ( yz ) = ( xy ) z = xyz
13. a) x (y + z) = xy + xz
b) (w + x) (y + z) = wy + xy + wz + xz distributive law
14. x + xy = x
15. a) x + xy = x + y
b) x + xy = x + y

Electrical Circuit 65
Expression Simplification
• Apply Boolean theorems for expression
simplification
• E.g.
• y = ABD + ABD
= AB (D + D) ; distributive law
= AB ( 1 ) ; Theorem (8)
= AB ; Theorem (2)

Electrical Circuit 66
Additional Examples
• z = AC + ABC

• x = ABCD + ABCD

• y = (AD + ABD)(AD + ABD)

Electrical Circuit 67
DeMorgan’s Theorems
• Useful for expression simplification
(x+y)=x⋅y

(x⋅y)=x+y

• E.g. simplify z = ( A + C ) ( B + D )
= (A + C) + (B + D)
= (A ⋅ C) + (B ⋅ D) = AC + BD
Electrical Circuit 68
Universality of NAND Gates
• Any logic operators can be written by the
combination of NAND gates
•x=A=A⋅A

•x=A+ B=A⋅B =A⋅A⋅B⋅B

• x = AB = AB = AB ⋅ AB

Electrical Circuit 69
Universality of NOR Gates
• Any logic operators can be written by the
combination of NOR gates
•x=A=A+A
• x = A + B = A + B = (A + B) + (A + B)

• x = AB = A + B = (A + A) + (B + B)

Electrical Circuit 70
Ex. (7): Conveyor Belt
• A conveyor belt will shutdown (x=HIGH)
whenever the following specific conditions
occurred:
• conveyor belt speed is too fast (A=HIGH) and
collection bin at the end of the conveyor belt is
full (B=HIGH)
• belt tension is too high (C=HIGH) and manual
override is off (D=HIGH)
• Create logic circuit by using only 74LS00,
74LS08, and 74LS32 IC
Electrical Circuit
X = AB + CD 71
Available ICs for Ex. (7)
X = AB + CD
a. 1 OR gate from 74LS32
b. 2 AND gates from 74LS08

X = AB + CD
= AB ⋅ CD
3 NAND gate from 74LS00
Electrical Circuit 72
Ex. (7): Best Solution

X= AB ⋅ CD
(1)74LS00 74LS00
A (3) (9)
(2)
B (8)
(4)
C (6) (10)
(5)
D
74LS00

Electrical Circuit 73
Simplification Method
• Rewrite the logic in Boolean expression
• Simplify Boolean expression with the
Boolean theorems
• apply De Morgan’s theorem repetitively until the
expression is in SOP form
• check for common factors and simplify the
circuit

Electrical Circuit 74
Ex. (8): Circuit Simplification
• Simplify the following circuits:

Electrical Circuit 75
Ex(9): Expression Simplification
• Simplify the expression:
x = (A + B)(A + B + D)D
= AAD + ABD + BAD + BBD + BDD
= 0 + ABD + BAD + BD + 0
= BD (A + A + 1)
= BD

Electrical Circuit 76
Exercise (5):

• z = AC(ABD) + ABCD +ABC


• Simplify the following circuit

Electrical Circuit 77
Exercise (6): Logic Design
• Design the logic circuit with 3 inputs. The
output is HIGH when the majority of the
inputs are high.

Electrical Circuit 78
Exercise (7): Logic Design
• Design the logic circuit that will warn the
user (z = LOW) when the measured voltage
is less than 6
MSB
A
Analog-to- B z
Digital
Converter
C Logic Circuit
D
LSB

Electrical Circuit 79
Exercise (8)

Find the circuit which generates the above output and input.

Electrical Circuit 80

You might also like