Computer Architecture : Practicals
Practical No. 3
Title: To Verify the Truth Table of Basic Logic Gates
Aim
To understand the
fundamental operation of basic logic gates and verify
their corresponding truth tables.
Introduction
Digital computers
operate using binary logic, where information is represented by two states: ‘0’
and ‘1’. Logic gates are the fundamental building blocks of digital circuits
that perform logical operations on these binary inputs to produce a binary
output. There are three basic logic gates: AND, OR, and NOT. Each gate has a
unique function that can be precisely described by its truth table. A truth
table systematically lists all possible combinations of inputs to a logic gate
and shows the resulting output for each combination, serving as a complete
definition of the gate’s behavior. Understanding and
verifying these truth tables is crucial for comprehending how digital circuits
process information. This practical focuses on the concepts covered in Chapter 2.2 Basic
Logic Gates from your course material.
Procedure / Example
This practical involves
examining the behavior of AND, OR, and NOT gates by
applying all possible input combinations and observing their respective
outputs. For each gate, you will draw its logical symbol and complete a truth
table based on the observed or calculated output for every input scenario.
Example:
Verifying the Truth Table of an AND Gate
1.
Identify
Inputs and Output: For a 2-input AND
gate, there are two inputs (A, B) and one output (Q).
2.
Determine
Possible Input Combinations:
With 2 inputs, there are $2^2 = 4$ possible combinations:.
3.
Apply
Inputs and Record Output: For
each combination:
o Input A = 0, Input B = 0: The logical AND operation states that if any input is 0,
the output is 0. So, Q = 0.
o Input A = 0, Input B = 1: The output is still 0.
o Input A = 1, Input B = 0: The output is still 0.
o Input A = 1, Input B = 1: Only when both inputs are 1, the output is 1. So, Q = 1.
4.
Complete
the Truth Table: Fill in the
observed/calculated outputs into the truth table.
|
A |
B |
Q |
|
0 |
0 |
0 |
|
0 |
1 |
0 |
|
1 |
0 |
0 |
|
1 |
1 |
1 |
Exercises:
For each of the
following basic logic gates, perform the verification by filling in the details
below:
1.
AND Gate
·
Logical
Symbol: (Draw the standard logical
symbol for a 2-input AND gate here)
·
Logical
Expression: $Q = A \cdot B$
·
Truth
Table:
|
A |
B |
Q |
|
0 |
0 |
|
|
0 |
1 |
|
|
1 |
0 |
|
|
1 |
1 |
2.
OR Gate
·
Logical
Symbol: (Draw the standard logical
symbol for a 2-input OR gate here)
·
Logical
Expression: $Q = A + B$
·
Truth
Table:
|
A |
B |
Q |
|
0 |
0 |
|
|
0 |
1 |
|
|
1 |
0 |
|
|
1 |
1 |
3.
NOT Gate
·
Logical
Symbol: (Draw the standard logical
symbol for a NOT gate/inverter here)
·
Logical
Expression: $Q = \overline{A}$
·
Truth
Table:
|
A |
Q |
|
0 |
|
|
1 |
Result / Conclusion
This practical
successfully demonstrated the fundamental operations of AND, OR, and NOT logic
gates. By systematically applying all input combinations and recording the
outputs, the truth tables for each basic gate were verified. This exercise
solidifies the understanding of how these elementary components form the basis
of all digital information processing.