Simplify the circuits shown in the figures below using Boolean Algebra a... Design a circuit that produces a HIGH out only when all three inputs are the same level... The following funct
Trang 1FACULTY OF COMPUTER SCIENCE & ENGINEERING
Digital Systems
Exercises Lab 3
Trang 2Problem 1 Simplify the following expressions using Boolean Algebra
a.� = ��� + �� = � (�� + �) = � (� + �) = �� + ��
b.� = (� + �)(� + �) = � (� + �) + � (� + �) = �� + �� + �� + ��
= 0 + �� + �� + 0 = �� + �� = Q⨁R
c.� = ��� + ��� + � = �� (� + �) + � = �� 1 + � = �� + � = � + �
d.� = ���(� + � + �) = (� + � + �) � � � = �.� �.� + �.� �.� + �.� �.�
= � �.� + � �.� + � �.� = � �.�
e.� = � � � + ��� + ��� + �� � + ��� = (� � � + ���) + (��� + ���) + ���
= � �(� + �) + ��(� + �) + ��� = � � 1 + �� 1 + ��� = � � + �� + ���
= �� + � (� + ��) = �� + � (� + �) = �� + �� + ��
f.� = (� + �)(� + �) + � + � + � = (� + �)(� + �) + � � �
= (� + �)(� + �) + ��� = �(� + �) + �(� + �) + ��� = �� + � � + ���
= � � + � (� + ��) = � � + � (� + �) = � � + �� + ��
g.� = (� + �) + ��� + �� � + � � �� = � � + ��� + �� � + ����
= �(� + ��) + �� � + ���� = �(� + �) + �� � + ����
= �� + �� + �� � + ����
h.� = ��(��) + ��� + � � � = ��(� + �) + ��� + � � �
= ��(� + �) + ��� + � � � = ��� + ��� + ��� + � � �
Problem 2 Simplify the circuits shown in the figures below using Boolean Algebra
a
� = ��� + �� (��) = ��� + �� (� + �) = ��� + �� (� + �) = ��� + �� + ���
Trang 3= ��� + ��(1 + �) = ��� + �� = �(�� + �) = �(� + �) = �� + ��
b
� = ��� ��� ��� = ��� + ��� + ��� = ��� + ��� + ���
= ��(� + �) + ��� = �� 1 + ��� = �� + ��� = �(� + ��) = �(� + �)
= �� + ��
Problem 3 Use a K-map to simplify (all possible cases)
a �(�, �, �) = (�, �, �, �, �, �)
B C B C BC BC
A 0 1 1 1
A 1 0 1 1
Vậy �(�, �, �) = �� + � + ��
b �(�, �, �, �) = (�, �, �, �, �, �, ��, ��)
CD C D CD CD
AB 0 1 1 0
AB 1 1 1 1
AB 1 1 0 0
AB 0 0 0 0
Vậy �(�, �, �, �) = �� + �� + ��
c �(�, �, �, �) = (�, �, �, �, ��, ��, ��, ��)
Trang 4CD C D CD CD
AB 0 0 0 1
AB 0 1 1 0
AB 1 1 1 0
AB 1 0 0 1
Vậy �(�, �, �, �) = ��� + �� + �� �
d �(�, �, �, �) = (�, �, �, �, ��, ��, ��, ��, ��)
CD C D CD CD
AB 1 0 0 0
AB 0 0 0 1
AB 0 1 1 1
AB 1 1 1 1
Vậy �(�, �, �, �) = BCD + BCD + AD + AB
e �(�, �, �, �) = (�, �, �, �, �, �, �, ��, ��, ��, ��, ��)
CD C D CD CD
AB 1 0 0 0
AB 1 1 1 1
AB 0 1 1 1
AB 1 1 1 1
Vậy �(�, �, �, �) = ��� + �� + �� + ��
f �(�, �, �, �) = (�, �, �, �, �, �, ��, ��, ��, ��, ��, ��)
BA BA BA BA
DC 1 0 1 1
DC 0 1 1 0
DC 1 1 1 1
DC 1 0 1 1
Vậy �(�, �, �, �) = �� + �� + �� + ��
Trang 5g �(�, �, �, �) = (�, �, �, �, �, �, ��, ��, ��, ��)
BA BA BA BA
DC 1 1 0 0
DC 1 1 1 0
DC 0 1 1 1
DC 1 0 0 1
Vậy �(�, �, �, �) = �� + �� + � � � + ���
h �(�, �, �, �) = (�, �, �, ��, ��) + �(�, �, �, �, ��, ��, ��)
BA BA BA BA
DC x 1 x x
DC x 1 0 0
DC 1 x x x
DC x 0 0 1
Vậy �(�, �, �, �) = � � + � � + ��
Problem 4 Use a K-map to simplify (all possible cases)
a �(�, �, �, �) = �(�, �, �, �, �, �, ��, ��, ��) + �(�, ��)
CD C D CD CD
AB 1 1 x x
AB 0 1 1 0
AB 0 x 1 1
AB 1 0 0 1
Vậy �(�, �, �, �) = �� + �� + ��
b �(�, �, �, �) = �(�, �, �, �, ��, ��, ��, ��) �(�, �, �, �)
Trang 6CD C D CD CD
AB x 0 0 1
AB 0 0 x x
AB 0 1 0 0
AB x 1 0 1
Vậy �(�, �, �, �) = �� + ���
c �(�, �, �, �) = �(�, �, �, �, ��, ��) + �(�, �, �, ��, ��)
CD C D CD CD
AB 0 1 1 x
AB x x 0 1
AB 0 x x 0
AB 1 0 1 0
Vậy �(�, �, �, �) = ���� + ��� +
��� + ���
d �(�, �, �, �) = �(�, �, �, �, �, ��, ��) �(�, �, ��, ��)
CD C D CD CD
AB 1 0 1 1
AB 1 x x 0
AB x 1 0 1
AB 1 0 0 x
Vậy �(�, �, �, �) = (� + � + �)(� + � + �)
(� + � + �)
e �(�, �, �, �) = �(�, �, �, �, ��, ��) + �(�, �, �, �, ��, ��, ��)
BA BA BA BA
DC 1 1 0 0
DC 1 x x 1
DC x 0 x 1
DC x x x 1
Vậy �(�, �, �, �) = (� + � + �)(� + �)
Trang 7f �(�, �, �, �, �) = �(�, �, ��, ��, ��, ��, ��, ��) + �(�, ��, ��, ��)
CBA CBA CBA CBA CBA CBA CBA CBA
Vậy �(�, �, �, �) = ���� + ��� +
���� + ����
g �(�, �, �, �) = �(�, �, �, �, �, �)
CD C D CD CD
Vậy �(�, �, �, �) = (� + � + �)(� + � + �)
(� + � + �)
Problem 5 Design a circuit that produces a HIGH out only when all three inputs are the
same level.
a Use a truth table and K map to produce the SOP solution
- Sử dụng Truth table:
A B C x = f(A,B,C)
Từ bảng thực trị, ta viết công thức đại số: x=A B C 1 + A B C 0 + A B C 0 +
A B C 0 + A B C 0 + A B C 0 +
A B C 0 + A B C 1
→ x = A B C + ABC
Trang 8- Sử dụng K map:
B C B C B C BC
A 1 0 0 0
Biểu đồ Karnaugh gồm 2 LOOP1
→ x = A B C + ABC
b Use two-input XOR and other gates to find a solution
Theo đề, x = 1 khi A=B=C Xét:Y = A⨁ B = 1 (khi A=B) (1)
Z = B ⨁ C =1 (khi B=C) (2)
A = B = C khi cả (1) và (2) đều đúng
Ta có mạch như sau:
Problem 6 The following function is in minimum sum of products form Implement it
using only two-input NAND gates No gate may be used as a NOT gate.
� = � �� + �� � + ��� + ���
Ta có: � = � �� + �� � + ��� + ��� = �(� � + ��) + �(�� + ��)
Problem 7 Construct the following circuit using two-input NAND gates only:
Trang 9Mạch có thể viết dưới dạng logich:
� = �� � + ��� + ���
= ��� + �� � + ��� + ���
= � � + �(�� + ��)
= �(� + �� + ��) = �(� + ��)
= � + (� + ��) = � + �(� + �)
Problem 8 A manufacturing plant needs to have a horn sound to signal quitting time.
The horn should be activated when either of the following conditions is met:
a It’s after 5 o’clock and all machines are shutdown
b It’s Friday, the production run for the day is complete, and all machines are
shutdown.
* Gọi:
A = After 5 o’clock
B = It’s Friday
C = the production run for the day is
complete
D = all machines are shutdown
X = Horn, X = 1: activated, X = 0: not
activated
→ X = ABCD + ABC D + ABCD + ABCD
* Truth table:
Trang 10* Rút gọn bằng K-map
CD C D CD CD
AB 0 0 0 0
AB 0 0 1 0
AB 1 1 1 0
AB 0 0 0 0
Vậy � = ��� + ���
* Mô phỏng mạch:
Problem 9 Design the logic circuit with these three switches as inputs so that the alarm
will be activated whenever either of the following condition exists:
a The headlights are on while the ignition is off
b The door is open while the ignition if on
* Gọi:
L = headlights
I = ignition
D = door
Gía trị 1 khi công tắc ở trạng thái ON và 0
khi ở trạng thái OFF
- Điều kiện a: L=1, I=0 và D có thể mạng
bất kể gái trị nào
- Điều kiện b: D=1, I=1 và L có thể mang
bát kể gái trị nào
*Truth table:
D I L Y
0 0 0 1
X 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 1 X 0
Trang 11* Rút gọn bằng K-map
I L I L IL IL
D 1 0 1 1
D 1 0 0 0
Vậy � = �� + ��
* Mô phỏng mạch:
Problem 10 A BCD code is being transmitted to a remote receiver The bits are A3, A2,
A1, and A0, with A3 as the MSB The receiver circuitry includes a BCD error detector circuit that examines the received code to see if it is a legal BCD code (i.e., <= 1001) Design this circuit to produce a HIGH for any error condition.
* Truth table:
A3 A2 A1 A0 F
Các trường hợp khác 0
* K-map
A1A0 A1 A0A1 A0 A1A0 A3 A2 0 0 0 0 A3A2 0 0 0 0 A3 A2 1 1 1 1 A3A2 0 0 1 1
Vậy � = �3 �2 + �3�1
* Mạch mô phỏng: