2. 5. Digital Logic
Introduction:
• Digital electronic devices used for logic, display, sequencing, timing, and
other functions in mechatronic systems.
• The fundamentals presented in this chapter are important in understanding the
basic functioning of all digital components and systems used in the control of
mechatronic systems.
• Analog signal that changes in a continuous manner, a digital signal exists
only at specific levels or states and changes its level in discrete steps.
• Most digital signals have only two states: high and low.
• A system using two-state signals allows the application of Boolean logic and
binary number representations,
• which form the foundation for the design of all digital devices
Intr. to Mechatronics Prepare by: Bereket 2
3. 5. Digital Logic
• Digital devices are categorized according to their function as combinational
logic or sequential logic devices.
Combinational Logic Circuit
• Combinational Logic circuit contains logic gates where its output is
determined by the combination of the current input, regardless of the output
or the prior combination of input.
• Basically, combinational circuit can be depicted by Diagram 1 below:
• Digital devices convert digital inputs into one or more digital outputs.
• The difference between the two categories is based on signal timing.
Intr. to Mechatronics Prepare by: Bereket 3
4. 5. Digital Logic
• Logic circuits for half adder (HA)
Intr. to Mechatronics Prepare by: Bereket 4
5. 5. Digital Logic
Sequential Logic Circuit
• Sequential Logic Circuit contains logic gates arranged in parallel and its output
is not only determined by the combination of the current input, but also the
prior output.
• The circuit also contains memory elements that enable it to store the
information of the prior output.
• Examples of sequential circuits in the computer system are like registers,
counters and serial adders
Intr. to Mechatronics Prepare by: Bereket 5
7. 5. Digital Logic
• The standard AND, NAND, OR, NOR, and XOR gates have only two inputs,
but other forms are available with more than two inputs.
• In the case of a multiple input AND gate, the output is 1 if and only if all
inputs are 1.
• Logic gates are built using transistors
Intr. to Mechatronics Prepare by: Bereket 7
8. NOT Gate -- Inverter
X Y
0
1
1
0
X Y
Y
NOT
X Y
Y = ~X
NOT
9. NOT
X ~X ~~X = X
X ~X ~~X
0 1 0
1 0 1
Intr. to Mechatronics Prepare by: Bereket 9
10. AND Gate
AND
X
Y
Z
Z = X & Y
X Y Z
0 0 0
0 1 0
1 0 0
1 1 1
Intr. to Mechatronics Prepare by: Bereket 10
11. OR Gate
OR
X
Y
Z
Z = X | Y
X Y Z
0 0 0
0 1 1
1 0 1
1 1 1
Intr. to Mechatronics Prepare by: Bereket 11
12. NAND Gate
NAND
X
Y
Z
X Y Z
0 0 1
0 1 1
1 0 1
1 1 0
Z = ~(X & Y)
nand(Z,X,Y)
Intr. to Mechatronics Prepare by: Bereket 12
13. NAND Gate
NOT-AND
X
Y
Z
W = X & Y
Z = ~W = ~(X & Y)
X Y W Z
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0
W
Intr. to Mechatronics Prepare by: Bereket 13
14. NOR Gate
NOR
X
Y
Z
X Y Z
0 0 1
0 1 0
1 0 0
1 1 0
Z = ~(X | Y)
nor(Z,X,Y)
Intr. to Mechatronics Prepare by: Bereket 14
15. NOR Gate
NOT-OR
X
Y
W = X | Y
Z = ~W = ~(X | Y)
X Y W Z
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0
Z
W
Intr. to Mechatronics Prepare by: Bereket 15
16. Exclusive-OR Gate
X Y Z
XOR
X
Y
Z 0 0 0
0 1 1
1 0 1
1 1 0
Z = X ^ Y
xor(Z,X,Y)
Intr. to Mechatronics Prepare by: Bereket 16
17. Exclusive-NOR Gate
X Y Z
XNOR
X
Y
Z 0 0 1
0 1 0
1 0 0
1 1 1
Z = ~(X ^ Y)
Z = X ~^ Y
xnor(Z,X,Y)
Intr. to Mechatronics Prepare by: Bereket 17
18. 5. Digital Logic
Note: The algebraic symbols used to represent the logic functions are: plus (+) for
logic OR, dot (·) for the logic AND, and an overbar for logic NOT, denoting inversion.
Intr. to Mechatronics Prepare by: Bereket 18
29. 5. Digital Logic
• NAND and NOR gates are called universal gate
Intr. to Mechatronics Prepare by: Bereket 29
30. 5. Digital Logic
• Logic Chips are built from logic gates
• Integration levels may be Small(SSI), Medium(MSI), Large(LSI) or
Very Large Scale Integration (VLSI).
Intr. to Mechatronics Prepare by: Bereket 30
31. 5. Digital Logic
Draw the Circuit Diagram
Intr. to Mechatronics Prepare by: Bereket 31
32. End of Chapter V
Intr. to Mechatronics Prepare by: Bereket 32