Computer Architecture: Practicals
Practical
No. 5
Title: To Verify the Truth Table
of Special Purpose Logic Gates
Aim
To understand the
specific operational characteristics of Exclusive-OR
(XOR) and Exclusive-NOR
(XNOR) logic gates and verify their
corresponding truth tables.
Introduction
While basic and
universal gates form the core of digital logic, certain tasks in digital design
require gates with unique logical behaviors.
·
Exclusive-OR
(XOR) Gate: Outputs ‘1’ only when
inputs are different. Applications include digital comparison, parity checking,
and basic arithmetic.
·
Exclusive-NOR
(XNOR) Gate: Outputs ‘1’ only when
inputs are the same. Ideal for equality detection.
Understanding their
truth tables is fundamental for utilizing these gates effectively in digital
circuits. These concepts align with Chapter 2.4 Exclusive Gates from the course
material.
Procedure
/ Example
Example: Verifying the
Truth Table of a 2-Input XOR Gate
1.
Inputs: A and B;
Output: Q.
2.
With 2 inputs, there
are 2² = 4 possible input combinations.
3.
Apply inputs and record
outputs:
o A = 0, B = 0 → Q = 0
o A = 0, B = 1 → Q = 1
o A = 1, B = 0 → Q = 1
o A = 1, B = 1 → Q = 0
4.
Logical expression: Q = A ⊕ B
Truth Table (XOR Gate):
|
A |
B |
Q |
|
0 |
0 |
0 |
|
0 |
1 |
1 |
|
1 |
0 |
1 |
|
1 |
1 |
0 |
Exercises
1.
Exclusive-OR
(XOR) Gate
·
Logical Symbol: (Draw standard
2-input XOR gate: OR gate with an additional curved line before the inputs)
·
Logical Expression: Q = A ⊕ B
·
Truth Table:
|
A |
B |
Q |
|
0 |
0 |
|
|
0 |
1 |
|
|
1 |
0 |
|
|
1 |
1 |
2.
Exclusive-NOR
(XNOR) Gate
·
Logical Symbol: (Draw
standard 2-input XNOR gate: XOR gate symbol with small circle at output)
·
Logical Expression: Q = ¬(A ⊕ B) or Q = A ⊙ B
·
Truth Table:
|
A |
B |
Q |
|
0 |
0 |
|
|
0 |
1 |
|
|
1 |
0 |
|
|
1 |
1 |
Result
/ Conclusion
This practical
successfully demonstrated the unique operational characteristics and verified
the truth tables of Exclusive-OR
(XOR) and Exclusive-NOR
(XNOR) gates. These special-purpose gates are essential for
functions such as data comparison and error detection in digital systems.