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

week 06-07_241009_075053

The document provides an overview of digital signals, Boolean algebra, and logic gates, essential components in electrical and electronic equipment for industrial machinery. It covers various types of logic gates, their functions, and applications, as well as combinational and sequential logic circuits like latches and flip-flops. Additionally, it includes examples of circuit simplification and practical applications such as a car safety alarm system.
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)
6 views

week 06-07_241009_075053

The document provides an overview of digital signals, Boolean algebra, and logic gates, essential components in electrical and electronic equipment for industrial machinery. It covers various types of logic gates, their functions, and applications, as well as combinational and sequential logic circuits like latches and flip-flops. Additionally, it includes examples of circuit simplification and practical applications such as a car safety alarm system.
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/ 64

Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery

University of Technology

Digital

PhD Trần Quang Phước 1


Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

CONTENTS
Content

Digital Signals and Boolean Algebra

Logic Gates

Boolean Rules

Latch and Flip-flop

Counter

2
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Digital Signals and Boolean Algebra

3
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Digital Signals

In digital circuits, binary bit values of 0 and 1


are represented by voltage signals measured in
reference to a common circuit point called
ground. An absence of voltage represents a
binary “0” and the presence of full DC supply
voltage represents a binary “1.”

4
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Digital Signals

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

5
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Digital Signals

6
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Boolean Algebra
Boolean algebra (Đại số Boole)
In Boolean algebra, a variable is a symbol used to
represent an action, a condition, or data. A single
variable only have a value of 1 or 0

Logic 0 Logic 1
False True
Off On
George Boole
Low High (1815–1864)

No Yes
Open switch Closed switch
A B x
Truth table (Bảng chân trị)
0 0 ?
0 1 ?
A Gate x
B 1 0 ?
1 1 ?
7
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Logic Gates

8
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Logic Gate

A logic gate, or simply gate, is a special form of amplifier circuit designed to


input and output logic level voltages (voltages intended to represent binary
bits).
Gate circuits are most commonly represented in a schematic by their own unique
symbols rather than by their constituent transistors and resistors.

The power supply connections to gates are often omitted in schematic diagrams for the
sake of simplicity

9
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

NOT Gate

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

10
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

NOT Gate

11
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

OR Gate
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

12
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
OR Gate
Boolean addition corresponds to the logical function of an “OR” gate, as well
as to parallel switch contacts:

Input A

Input B

Output

13
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

OR Gate

Application

14
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
AND Gate
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

15
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

AND Gate

Boolean multiplication corresponds to the logical function of an “AND” gate, as


well as to series switch contacts:

Input A

Input B

Output
16
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
NOR Gate and NAND Gate
NOR (NOT-OR) gate
A x=A+B
B A B A+B A+B
0 0 0 1
NOR gate
0 1 1 0
A x=A+B 1 0 1 0
B 1 1 1 0

NAND ( NOT AND) gate

A B A.B A.B
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0

17
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Negative-AND Gate and Negative-OR Gate
Negative-AND gate Negative-OR gate

18
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
XOR Gate and XNOR Gate
XOR gate XNOR gate

19
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Utility of NOR Gate and NAND Gate
INVERTER
A A A A
1 1

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

20
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Combinational Logic Circuits

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
21
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Combinational Logic Circuits

Give the scheme

Determine the Boolean expression

x = ABC(A + D)
22
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Combinational Logic Circuits

Give the Boolean expression

x = AB+BC

Draw the scheme

A AB x = AB + BC
B

B
BC
C

23
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Boolean Rules

24
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Boolean Algebraic Identities

25
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Boolean Algebraic Properties

26
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Boolean Algebraic Properties

27
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

DeMorgan’s Theorems

DeMorgan’s Theorems describe the equivalence between gates with inverted


inputs and gates with inverted outputs. Simply put, a NAND gate is equivalent
to a Negative-OR gate, and a NOR gate is equivalent to a Negative-AND gate.

A B  A B
A B  A  B

28
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Circuit simplification examples

29
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Circuit simplification examples
A flame detection circuit for a toxic waste incinerator.
The intense heat of the fire is intended to neutralize the toxicity of the waste introduced into
the incinerator.
Due to the high degree of hazard involved with potentially passing un-neutralized waste out
the exhaust of this incinerator, it is decided that the flame detection system be made
redundant (multiple sensors)
Using "two out of three" sensor logic, whereby the waste valve is opened if at least two
out of the three sensors show good flame.

30
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Circuit simplification examples

A flame detection circuit for a toxic waste incinerator.

31
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Circuit simplification examples
A flame detection circuit for a toxic waste incinerator.
Using Boolean algebra techniques, the expression may be significantly
simplified:

32
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Circuit simplification examples
A flame detection circuit for a toxic waste incinerator.

33
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Minterm and Maxterm


Minterm (tích chuẩn) and Maxterm (tổng chuẩn)

34
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Minterm and Maxterm
A flame detection circuit for a toxic waste incinerator.

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 M 1M 2 M 4

35
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Logic Gate Integrated Circuits

Logic gates can be


connected inside an IC
to create timers,
counters, latches, shift
registers, and other
basic logic circuitry.

IC 74LS00 IC 74LS08

36
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

IC 74LS32

4 3
1 2
1

2 1
IC 74LS08
3
4 3
1 2

37
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Examples
Car safety alarm
Design a car safety alarm using Logic gates considering four input.
Alarm (A) should sound if:
Etheir (a) The key is in, and door is not closed
or (b) The door is closed, the key is in, and the driver is on seat, but the seat
belt is not strapped

Input Binary value Status


1 Door closed
Door (D)
0 Door open
1 Key is plugged into the car
Key (K)
0 Key is not plugged into the car
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
38
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

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)

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
39
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

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)

40
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Examples

41
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Latch and Flip-flop

42
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Latch and Flip-flop
In the same way that gates are the building blocks of combinatorial circuits,
latches and flip-flops are the building blocks of sequential circuits.

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.

43
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Latch

S-R Latch: Activation of the S input sets the circuit, while activation of the R
input resets the circuit. If both S and R inputs are activated simultaneously, the
circuit will be in an invalid condition.

Invalid!

44
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Latch
Gated S-R Latch

D Latch

45
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Flip-flop
Flip-flop: A flip-flop is a latch circuit with a “pulse detector” circuit connected
to the enable (E) input, so that it is enabled only for a brief moment on either
the rising or falling edge of a clock pulse.
Pulse detector circuits may be made from time-delay relays for ladder logic applications, or
from semiconductor gates (exploiting the phenomenon of propagation delay)

Positive edge-triggered Negative edge-triggered

46
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Flip-flop

S-R Flip-flop

47
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Flip-flop
J-K flip-flop: A J-K flip-flop is an S-R flip-flop with an added layer of feedback.
This feedback selectively enables one of the two set/reset inputs so that they
cannot both carry an active signal to the multivibrator circuit, thus eliminating
the invalid condition.
When both J and K inputs are activated, and the clock input is pulsed, the
outputs (Q and not-Q) will swap states. That is, the circuit will toggle from a set
state to a reset state, or vice versa.

48
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Flip-flop
J-K flip-flop

49
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Counter

50
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Binary count sequence
A four-bit binary count sequence from 0000 to 1111

Most significant bit


(MSB)

Least significant bit


(LSB)

• Circuits may be built that “count” in a binary sequence,


using J-K flip-flops set up in the “toggle” mode.
51
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Asynchronous counters

Four J-K flip-flops connected in such a way to always be in the "toggle" mode

Count up

52
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Asynchronous counters
An "up" counter may be made by connecting the
clock inputs of positive-edge triggered J-K flip-
flops to the Q’ outputs of the preceding flip-flops.

Another way is to use negative-edge triggered flip-flops,


connecting the clock inputs to the Q outputs of the preceding
flip-flops.

In either case, the J and K inputs of all flip-flops


are connected to Vcc or Vdd so as to always be
"high.

53
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Asynchronous counters

Ripple effect

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.
54
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Asynchronous counters
In many applications, the ripple effect is tolerable, since the ripple happens very, very
quickly
Ex: Drive a set of light-emitting diodes (LEDs) with the counter’s outputs
If we use this counter to drive the “select” inputs of a multiplexer, index a memory
pointer in a microprocessor (computer) circuit, it would not be acceptable.
There is a way to use this type of counter circuit in applications sensitive to false, ripple-
generated outputs, and it involves a principle known as strobing.

Essentially, the enable input of


such a circuit is connected to
the counter’s clock pulse in
such a way that it is enabled
only when the counter outputs
are not changing, and will be
disabled during those periods
of changing counter outputs
where ripple occurs

Another disadvantage of the asynchronous, or ripple, counter circuit is limited speed.


Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Synchronous counters

A synchronous counter, in contrast to an asynchronous counter, is one whose output


bits change state simultaneously, with no ripple.

Does this circuit function as a counter?

56
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology
Synchronous counters

A B C D

A B C D

57
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Synchronous counters

Counter Circuit with Selectable “up” and “down” Count Modes

58
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Applications
Up/down counter circuits are very useful devices.

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.
59
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Applications

If we re-design the encoder to have two sets of LED/phototransistor pairs, those pairs
aligned such that their square-wave output signals are 900 out of phase with each other,
we have what is known as a quadrature output encoder (the word “quadrature” simply
refers to a 900 angular separation).

A phase detection circuit may be made from a D-type flip-flop, to distinguish


a clockwise pulse sequence from a counter-clockwise pulse sequence

60
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Counter IC
Asynchronous counter IC
• 74LS293: 4 bit counter
• 74HC4024: 7 bit counter (CMOS)
Synchronous counter IC
• 74LS163: synchronous 4-bit counter
• 74LS192:synchronous UP/DOWN
• 74LS193:synchronous UP/DOWN
IC 74LS293
• Four J-K Flip-flop (Q3Q2Q1Q0)
• Each flip-flop has a CP input, similar
to the CLK input.
• CP inputs of Q1 and Q0 are connected
with pin 11 and pin 10, respectively.
• Clear inputs of flip-flops are conneted
with output of a NAND gate which
has two inputs MR1 and MR2
• Q3Q2Q1 are a 3-bit counter
• Q0 is not connected with orther flip-
flop
61
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Homeworks

1. Tìm khai triển Boole


2. Lập bản chân trị
3. Rút gọn khai triển
A

C
62
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Johnson counter
assuming that all Q outputs begin in the low state

63
Ho Chi Minh City Electrical & Electronic Equipment for Industrial Machinery
University of Technology

Ứng dụng cho mạch tạo xung điều khiển động cơ step

64

You might also like