Professional Documents
Culture Documents
Chapter-4 Updated
Chapter-4 Updated
Industrial Machinery
Chapter 4
Digital System
Chapter 4. Digital System >>1. Numeration Systems
The analog signal is denoted by sine The digital signal is denoted by square
waves. waves.
The values of the analog signal varies in The values of the digital signal is only one
the range. of two values: LOW or HIGH.
The analog signal doesn’t offer any fixed The digital signal has a finite number, 0 and
range. 1.
Decimal Number
255 = 2 × 10 + 5 × 10 + 5 × 10
2 5 5 . 1 2 3
255.123 = 2 × 10 + 5 × 10 + 5 × 10 + 1 × 10 + 2 × 10 + 3 × 10
0 b 1 1 0 0 1 1 1 1
0b11001111 = 1 × 2 + 1 × 2 + 0 × 2 + 0 ×
2 + 1 × 2 + 1 × 2 + 1 × 2 + 1 × 2 = 207
25010 = 0b_________
1 1 0 0 1 1 1 1 . 1 0 1
11001111.1012= 1 × 2 + 1 × 2 + 0 × 2 + 0 × 2 + 1 × 2 + 1 × 2 + 1 × 2 + 1 × 2 +
1 × 0.5 + 0 × 0.25 + 1 × 0.125 = 207.625
13.687510 = _________2
0 O 5 2 25010= 0O____
0 b 1 0 1 0 1 0
22 21 20 22 21 20
HCM City Univ. of Technology, Faculty of Mechanical Engineering 11 Duong Van Tu
Chapter 4. Digital System >>1. Numeration Systems
Octal Number
Prefix
0 O 5 2 . 1 7
0 X 1 F 25010= 0x________
0b10101100 = 0x____
0 b 0 0 0 1 1 1 1 1
0 X 1 F . 1 2
Hexadecimal point
1F.1216= 1 × 16 + 15 × 16 + 1 × 16 + 2 × 16 = 31.0703125
B2F16= ____________2
Binary Addition
There is little to memorize in the way of rules for the addition of binary bits
0+0=0
1+0=1
0+1=1
1 + 1 = 10
1 + 1 + 1 = 11
Complementation
We assign the leftmost bit to serve a special purpose.
The leftmost bit possesses a negative place-weight value.
10112 = -510
1 × −2 + 0 × 2 + 1 × 2 + 1 × 2 = −8 + 3 = −5
Step 1: Invert all the bits to obtain 0102 (the “one’s complement”).
Step 2: Add one to obtain 0112, or -510 in three-bit. (The two’s complement form)
Step 3: Combine two’s complement form and the negative-weight bit. (10112)
We’d have to determine the two’s complement based on all seven of the other bits.
510 -> 00001012 , invert all bit -> 11110102, then add one 11110112, and combine
negative-weight bit 111110112
1810= 0100102
11 <--- Carry bits
100111 -2510
+010010 1810
--------
111001
Since there is no extra bit, we don’t need to discard any bit.
(1 x -3210) + (1 x 1610) + (1 x 810) + (1 x 110) = -710
Rule of Multiplication: 1 1 1 0 1
0x0=0 x 1 0 0 1
0x1=0 1
1x0=0 1 1 1 0 1
Add all the 1
1x1=0 0 0 0 0 0
partial products 1
1 0 0 0 0 0
Rule of Binary Addition:
+ 1 1 1 0 1
0+0=0
0+1=1 Final product 1 0 0 0 0 0 1 0 1
1+0=1
1 + 1 = 0 carry 1
1 + 1 + 1 = 1 carry 1
HCM City Univ. of Technology, Faculty of Mechanical Engineering 22 Duong Van Tu
Chapter 4. Digital System >>2. Binary Arithmetic
Binary Division
Example: Consider two binary numbers, B = 0110102
Rule for Binary Division: and C = 01012 where we want to divide B by C.
1
0:1=0 1 1 0 1 0 1 0 1
1:1=1 -
1 0 1 1 0 1
Division by zero is 1 1
-
meaningless 0 0
1
Rule of Binary Subtraction: - 1 1 0
A A
Q B Q
B ? ?
C A B C Q
Logic gate
0 0 0
Logic gate/circuit
0 0 1
A B Q 0 1 0
0 0 0 0 1 1
0 1 1 1 0 0
1 0 1 1 0 1
1 1 1 1 1 0
1 1 1
OR operation/ OR Gate
The output Q of a “Logic OR Gate” only returns “LOW” when ALL of its inputs are LOW.
A A
Q B Q
B C
A B C Q
Q=A+B Q=A+B+C 0 0 0 0
0 0 1 1
A B Q
0 1 0 1
0 0 0
0 1 1 1
0 1 1
1 0 0 1
1 0 1
1 0 1 1
1 1 1
1 1 0 1
“If either A or B is true, then Q is true” 1 1 1 1
OR operation/ OR Gate
B
OUT
A B Q
X=A+B
0 0 0
0 1 1
1 0 1
1 1 1
Q = A.B Q = A.B.C A B C Q
0 0 0 0
A B Q 0 0 1 0
0 0 0 0 1 0 0
0 1 0 0 1 1 0
1 0 0 1 0 0 0
1 1 1 1 0 1 0
1 1 0 0
“If both A and B are true, then Q is true” 1 1 1 1
B
A B Q OUT
0 0 0 X = A.B
0 1 0
1 0 0
1 1 1
A Q
A Q
0 1 Q=A
1 0
A A+B Q = A+B
B
A B Q
0 0 1
0 1 0
1 0 0
OUT
1 1 0
Q = A+B
A
A A
Q B Q
B C
A B C Q
A B Q 0 0 0 1
0 0 1 0 0 1 1
0 1 1 0 1 0 1
Q = A. B Q = A. B. C
1 0 1 0 1 1 1
1 1 0 1 0 0 1
1 0 1 1
1 1 0 1
“If both A and B are true, then Q is NOT true” 1 1 1 0
A Q
A Q
0 0 Q=A
1 1
Adding One
2 4
Example:
Example:
Example:
Example:
Give
• Combinational Logic Circuits are made up from basic logic AND, OR or NOT gates.
• The outputs of Combinational Logic Circuits are determined by the logical function
of their current input state.
A B Q Minterm
0 0 0 AB
0 1 1 AB
1 0 1 AB
1 1 1 AB
To get the desired canonical SOP expression we will add the Minterms (product terms)
for which the output is 1
HCM City Univ. of Technology, Faculty of Mechanical Engineering 58 Duong Van Tu
Chapter 4. Digital System >>4. Boolean Algebra
Sum of Product (SOP)
Let denote the following notation
AB = (00)2 = m0 A B Q Minterm
0 0 0 AB
AB = (01)2 = m1
0 1 1 AB
AB= (10)2 = m2 1 0 1 AB
AB= (11)2 = m3 1 1 1 AB
Step 2. Use a truth table to show all the possible combinations of input conditions that
will produces an output.
= ∑m(2, 4, 6, 7) 0 1 1 0
1 0 0 1 A. B. C
Step 2. Use a truth table to show all the 1 0 1 0
possible combinations of input conditions 1 1 0 1 A. B. C
that will produces an output. 1 1 1 1 A. B. C
A B Q Maxterm
0 0 0 A + B
0 1 1 A + B
1 0 1 A+ B
1 1 0 A + B
To get the desired canonical POS expression we will multiply the maxterms (sum terms)
for which the output is 0.
HCM City Univ. of Technology, Faculty of Mechanical Engineering 63 Duong Van Tu
Chapter 4. Digital System >>4. Boolean Algebra
Product of Sum (POS)
Let denote the following notation
A + B = (00)2 = M0 A B Q Maxterm
A + B = (01)2 = M1 0 0 0 A + B
A + B = (10)2 = M2 0 1 1 A + B
1 0 1 A+ B
A + B = (11)2 = M3
1 1 0 A + B
Step 2. Use a truth table to show all the possible combinations of input conditions that
will produces a “0” output.
C B A Q
0 0 0 0 A + B + C
0 0 1 1
0 1 0 0 A + B + C
0 1 1 1
1 0 0 1
1 0 1 0 A + B + C
1 1 0 0 A + B + C
1 1 1 1
Introduction
The Karnaugh Map will simplify logic faster and more easily in most cases.
Venn Diagrams and Sets: The Venn diagram bridges the Boolean algebra to the
Karnaugh Map.
If everything inside the circle is A, then anything outside of the circle is not A. It is a
similar manner for set B and set not B.
Karnaugh Map ̅ ≡ 0, ≡1
≡ 0, ≡1
Two variables
Karnaugh Map ̅ ≡ 0, ≡1
≡ 0, ≡1
Three variables ̅ ≡ 0, ≡1
3. For SOP, put 1’s in cell of Karnaugh map respective to the Minterms.
4. For POS, put 0’s in cell of Karnaugh map respective to the Maxterms.
6. Find the product terms and sum them up for SOP form.
1. No zeros allowed.
2. No diagonals.
3. Only power of 2 number of cells in each group.
4. Groups should be as large as possible.
5. Everyone must be in at least one group.
6. Overlapping allowed.
7. Wrap around is allowed.
8. Get the fewest number of groups possible.
Don’t cares in a Karnaugh map, or truth table, may be either 1’s or 0’s.
We plot these cells with an asterisk, *, among the normal 1’s and 0’s.
Treat the don’t care cell as either a 1 or a 0, or ignore the don’t cares.
S-R Latches
Reset ->
Output
Set ->
S-R Latches
Timing diagram
D Flip-Flops
D Q(t+1)
S-R Latches
0 0
1 1
Q(t)
Q(t+1) = D
CLK
Q(t)
D
HCM City Univ. of Technology, Faculty of Mechanical Engineering 85 Duong Van Tu
Chapter 4. Digital System >>6. Multivibrators
Flip-Flops
Flip-flops is formed by the basic building blocks called Latches.
D Flip-Flops
D Q(t+1)
0 0
Timing diagram
1 1
Q(t+1) = D
JK Flip-Flops
Present Inputs Present Next
State State
S-R Latches
J K Q(t) Q(t+1)
K 0 0 0 0
Q(t)
0 0 1 1
0 1 0 0
0 1 1 0
CLK
1 0 0 1
1 0 1 1
Q(t)
J 1 1 0 1
1 1 1 0
JK Flip-Flops
Present Inputs Present Next
State State
J K Q(t) Q(t+1)
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
JK Flip-Flops
Present Inputs Present Next
State State
KQ(t)
J 00 01 10 11 J K Q(t) Q(t+1)
0 0 0 0
0 1
0 0 1 1
1 1 1 1 JQ(t) 0 1 0 0
0 1 1 0
KQ(t)
1 0 0 1
1 0 1 1
Q(t + 1) = JQ(t) + KQ(t) 1 1 0 1
1 1 1 0
T Flip-Flop
S-R Latches
Inputs Present Next
State State
Q(t)
T Q(t) Q(t+1)
0 0 0
CLK 0 1 1
1 0 1
Q(t) 1 1 0
T
T Flip-Flop
⇒ Q t + 1 = T⨁Q(t)
HCM City Univ. of Technology, Faculty of Mechanical Engineering 91 Duong Van Tu
Chapter 4. Digital System >>7. Sequential Circuits
Binary Count Sequence
J-K flip-flops are ideally suited for this task, because they have the ability to “toggle”
their output state at the command of a clock pulse when both J and K inputs are made
“high”.
HCM City Univ. of Technology, Faculty of Mechanical Engineering 100 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
, , = (3, 6, 7)
Truth Table
Input Output
Decimal equivalent Product
A B C Y
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
HCM City Univ. of Technology, Faculty of Mechanical Engineering 101 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
= + ̅ + ABC
= + ̅+ + ABC Applying + =
= + ̅ + + ̅ Applying + ̅=1
= +
HCM City Univ. of Technology, Faculty of Mechanical Engineering 102 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
AB
00 01 11 10
C
HCM City Univ. of Technology, Faculty of Mechanical Engineering 103 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
, , = (1,2,3,6)
Truth Table
Input Output
Decimal equivalent Product
A B C Y
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
HCM City Univ. of Technology, Faculty of Mechanical Engineering 104 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Boolean Algebra
= ̅C + AB + BC
HCM City Univ. of Technology, Faculty of Mechanical Engineering 105 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Simplified expression:
=
HCM City Univ. of Technology, Faculty of Mechanical Engineering 106 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
00
01
11
Simplified expression:
10
=
HCM City Univ. of Technology, Faculty of Mechanical Engineering 107 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Y = (A’+B’)(A’+B)(A+B)
Karnaugh map – 2 variables
B
0 1
A
Simplified expression: 1
=
HCM City Univ. of Technology, Faculty of Mechanical Engineering 108 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Input Decimal Output
Exercise 5: Simplification of the logic equivalent
Sum
A B C D Y
expression by K-map. 0 0 0 0 0
0 0 0 1 1
F(A,B,C,D)=∏ (3,5,7,8,10,11,12,13) 0 0 1 0 2
0 0 1 1 3
Karnaugh map – 4 variables
AB 0 1 0 0 4
00 01 11 10
0 1 0 1 5
CD
0 1 1 0 6
00 0 1 1 1 7
1 0 0 0 8
1 0 0 1 9
01
1 0 1 0 10
1 0 1 1 11
11 1 1 0 0 12
1 1 0 1 13
10 1 1 1 0 14
1 1 1 1 15
HCM City Univ. of Technology, Faculty of Mechanical Engineering 109 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
F(A,B,C,D)=∏ (3,5,7,8,10,11,12,13)
00 1 1 0 0
01 1 0 0 1
11 0 0 1 0
Simplified expression:
10 1 1 1 0
=
HCM City Univ. of Technology, Faculty of Mechanical Engineering 110 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Exercise 6: Design a digital system whose output is defined as logically low if the 4-bit
input binary number is a multiple of 3; otherwise, the output will be logically high. The
output is defined if and only if the input binary number is greater than 2.
HCM City Univ. of Technology, Faculty of Mechanical Engineering 111 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Exercise 6 Truth Table Input Decimal
Product
Output
A B C D equivalent Y
Minterm: 0 0 0 0 0
0 0 0 1 1
= ( ) 0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
+ ( ) 0 1 0 1 5
0 1 1 0 6
0 1 1 1 7
Maxterm:
1 0 0 0 8
= ( ) 1 0 0 1 9
1 0 1 0 10
1 0 1 1 11
+ ( ) 1 1 0 0 12
1 1 0 1 13
1 1 1 0 14
1 1 1 1 15
HCM City Univ. of Technology, Faculty of Mechanical Engineering 112 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Exercise 6 Truth Table Input Decimal
Product
Output
A B C D equivalent Y
0 0 0 0 0 x
Karnaugh map – 4 variables 0 0 0 1 1 x
0 0 1 0 2 x
0 0 1 1 3 0
CD 0 1 0 0 4 1
00 01 11 10
0 1 0 1 5 1
AB
0 1 1 0 6 0
00 0 1 1 1 7 1
1 0 0 0 8 1
1 0 0 1 9 0
01
1 0 1 0 10 1
1 0 1 1 11 1
11 1 1 0 0 12 0
1 1 0 1 13 1
10 1 1 1 0 14 1
1 1 1 1 15 0
HCM City Univ. of Technology, Faculty of Mechanical Engineering 113 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Exercise 6 Grouping
CD CD
00 01 11 10 00 01 11 10
AB AB
00 X X 0 X 00 X X 0 X
01 1 1 1 0 01 1 1 1 0
11 0 1 0 1 11 0 1 0 1
10 1 0 1 1 10 1 0 1 1
SOP POS
HCM City Univ. of Technology, Faculty of Mechanical Engineering 114 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Exercise 6 Grouping
CD CD
00 01 11 10 00 01 11 10
AB AB
00 X X 0 X 00 X X 0 X
01 1 1 1 0 01 1 1 1 0
11 0 1 0 1 11 0 1 0 1
10 1 0 1 1 10 1 0 1 1
SOP POS
HCM City Univ. of Technology, Faculty of Mechanical Engineering 115 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Exercise 6
HCM City Univ. of Technology, Faculty of Mechanical Engineering 116 Duong Van Tu
Chapter 4. Digital System >>8. Exercises
Exercise 6
HCM City Univ. of Technology, Faculty of Mechanical Engineering 117 Duong Van Tu