Professional Documents
Culture Documents
D06 - Trang Bi Dien - Week - 06 - and - 07
D06 - Trang Bi Dien - Week - 06 - and - 07
Digital
Logic Gates
Boolean Rules
Counter
A single positive-going pulse is generated when the voltage goes from its normally
LOW level to its HIGH level then back to its LOW level.
A single negative-going pulse is generated when the voltage goes from its normally
HIGH level to its LOW level then back to its HIGH level
A B x
Truth table (Bảng chân trị) 0 0 ?
0 1 ?
A 1 0 ?
Gate x
B 1 1 ?
Ho Chi Minh City
University of Technology 7
Logic Gates
The power supply connections to gates are often omitted in schematic diagrams for the
sake of simplicity
An inverter, or NOT, gate is one that outputs the opposite state as what is
input. That is, a “low” input (0) gives a "high" output (1), and vice versa.
NOT
A x=A
0 1
1 0
x=A
A
NOT gate
Input Output
Input Output
The output of an OR gate will be “high“ (1) if any of the inputs are “high” (1).
The output of an OR gate goes "low" (0) if and only if all inputs are "low" (0).
OR
A B x=A+B
0 0 0
0 1 1
1 0 1
1 1 1
A x=A+B
B
OR gate
Ho Chi Minh City
University of Technology 12
OR Gate
Boolean addition corresponds to the logical function of an “OR” gate, as well
as to parallel switch contacts:
A x=A+B
B
OR gate
Input A
Input B
Output
The output of an AND gate will be “high“ (1) if and only if all inputs are “high” (1).
The output of an AND gate goes "low" (0) if any of the inputs are "low" (0).
AND
A B x = A.B
0 0 0
0 1 0
1 0 0
1 1 1
A x = A.B
AND gate
A x = A.B
AND gate
Input A
Input B
Output
NOR gate
0 1 1 0
1 0 1 0
A x=A+B 1 1 1 0
B
NAND gate
AND
A AB x = AB A A
1 2 1
B x = AB
3
B B
2
OR
A A
1
x=A+B A A+B x=A+B
3 1 2
B
B B
2
A x = (A + B)·C A
A+B A·B x = A·B + C
B B
C C
A B C A+B (A + B)C A B C AB AB + C
0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 0 1 0 0 0
1 0 0 1 0 1 0 0 0 0
1 1 0 1 0 1 1 0 1 1
0 0 1 0 0 0 0 1 0 1
0 1 1 1 1 0 1 1 0 1
1 0 1 1 1 1 0 1 0 1
1 1 1 1 1 1 1 1 1 1
A
A
ABC
B
C
ABC(A + D)
A
A+D A+D
D
x = ABC(A + D)
Ho Chi Minh City
University of Technology 22
Combinational Logic Circuits
Give the Boolean expression
x = AB+BC
A AB x = AB + BC
B
B
BC
C
A+ B = A⋅B
A⋅ B = A + B
Minterm
F ( A, B, C ) = ABC + ABC + ABC + ABC
= m3 + m5 + m6 + m7
Maxterm
F ( A, B, C ) = ( A + B + C )( A + B + C )( A + B + C )( A + B + C )
= M 0 + M1 + M 2 + M 4
IC 74LS00 IC 74LS08
Binary
Input Status D
value
1 Door closed K
Door (D) Logic A
0 Door open
S Circuits
1 Key is plugged into the car
Key (K)
0 Key is not plugged into the car B
1 Driver is on seat
Seat (S)
0 Driver is not on seat
1 Seat belt is strapped
Belt (B)
0 Seat belt is not strapped
Ho Chi Minh City
University of Technology 38
Examples
Car safety alarm
Design a car safety alarm using Logic gates considering four input.
Alarm (A) should sound if:
Statement (a) (K = 1) AND (D = NOT 1)
Statement (b) (D = 1) AND (K = 1) AND (S = 1) AND (B = NOT 1)
While gates had to be built directly from transistors, latches can be built from
gates, and flip-flops can be built from latches.
Both latches and flip-flops are circuit elements whose output depends not only
on the current inputs, but also on previous inputs and outputs.
The difference between a latch and a flip-flop is that a latch does not have a
clock signal, whereas a flip-flop always does.
Invalid!
D Latch
Count up
Counter circuits made from cascaded J-K flip-flops where each clock input receives
its pulses from the output of the previous flip-flop invariably exhibit a ripple
effect, where false output counts are generated between some steps of the count
sequence.
These types of counter circuits are called asynchronous counters, or ripple counters.
A B C D
A B C D
A common application is in machine motion control, where devices called rotary shaft
encoders convert mechanical rotation into a series of electrical pulses, these pulses
“clocking” a counter circuit to track total motion:
As the machine moves, it turns the encoder shaft, making and breaking the
light beam between LED and phototransistor, thereby generating clock
pulses to increment the counter circuit.