Assignment
Assignment
Assignment
No Topic Pg
no.
1 Basic Logic Gates Implementation 3
2 NAND and NOR as Universal Gates 6
3 Boolean Expression Simplification 11
and Circuit Design
4 Half Adder and Full Adder Design 13
5 Design of a 2-Bit Magnitude 16
Comparator
6 Memory Simulation: RAM Module 19
2
1. Basic Logic Gates Implementation
o Design and simulate basic logic gates
(AND, OR, NOT) using Logisim.
o Verify the truth tables for each gate
using different input combinations.
Ans:
AND Gate:
Logic Diagram
Truth
Table
Input Output
A B C X = (A .
B . C)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
3
The output is 1 if input A, input B and Input C
equal to 1; otherwise the output is 0.
The boolean expression for a 3-input AND gate is:
X = (A . B . C).
The algebraic symbol of the OR function is “ . ” ,
similar to arithmetic multiplication.
OR Gate:
Logic Diagram
Trut
h
Table
Input Output
A B C X = (A +
B + C)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
4
The output is 0 if input A, input B and Input C
equal to 0; otherwise the output is 1.
The boolean expression for a 3-input OR gate is:
X = (A + B + C).
The algebraic symbol of the OR function is “ + ” ,
similar to arithmetic addition.
Not Gate:
Logic Diagram
Tru
th
Table
Input Output
A X = (A’)
0 1
1 0
5
o Implement and simulate NAND and
NOR gates as universal gates.
o Construct AND, OR, and NOT gates
using only NAND and NOR gates.
Ans:
NAND Gate:
Logic Diagram
Truth
Table
Input Output
A B C X = ( A . B . C)
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
6
The NAND or “Not AND” function is a
combination of the two separate logical
functions, the AND function and the NOT function
in series.
The boolean expression for a 3-input AND gate is:
X = ( A . B . C) .
It produces a 0 output when all of the inputs are
1; otherwise the output is 1 .
NAND gate also called as derived gate or
Universal gate.
NOR Gate:
Logic Diagram
Truth Table
Input Output
A B C X = ( A+ B+C
)
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 0
7
A NOT-OR operation is known as NOR operation.
The NOR function is the complement of the OR
function.
The NOR or “Not OR” function is a combination of
the two separate logical functions, the OR function
and the NOT function in series.
The boolean expression for a 3-input AND gate is:
X = ( A+ B+C ) .
It produces a 0 output when any or all of the
inputs are 1 and 1 output when all the inputs are
0.
NOR gate also called as derived gate or Universal
gate.
Logic Diagram
Truth Table
Input Output
A B ( A . B) X = (A .
B)
0 0 1 0
0 1 1 0
1 0 1 0
1 1 0 1
8
The And gate using NAND gate function is the
complement of the NAND function.
It produces a 1 output when all of the inputs are
1; otherwise the output is 0.
The boolean expression is : X = (A . B).
Logic Diagram
Truth Table
Input Output
A B ( A+ B) X = (A +
B)
0 0 1 0
0 1 0 1
1 0 0 1
1 1 0 1
9
It produces a 0 output when all of the inputs are
0; otherwise the output is 1.
The boolean expression is : X = (A + B).
Logic Diagram
Truth Table
Input Output
A X = (A’)
0 1
1 0
10
3. Boolean Expression Simplification
and Circuit Design
o Simplify a given Boolean expression
using Boolean algebra.
o Design and simulate the simplified
logic circuit in Logisim.
Ans:
Simplification of Boolean
Expression
X=A’B + C’D
X(A,B,C,D) = A’B + C’D
= (A’∧ B) ∨ (C’∧ D)
= (A’∨ C’) ∧ (A’∨ D) ∧ (B ∨ C’) ∧ (A’∨
D)
Logic Diagram
11
Truth Table
Input Output
A B C D X = (A’B +
C’D)
0 0 0 0 0
0 0 0 1 1
0 0 1 0 0
0 0 1 1 0
0 1 0 0 1
0 1 0 1 1
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 1
1 1 1 0 0
1 1 1 1 0
12
o Design and simulate a half adder
circuit using basic logic gates.
o Expand the design to simulate a full
adder and test it with all possible input
combinations.
Ans:
Half Adder:
Logic Diagram
Truth Table
Input Output
A B SUM CARR
Y
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
13
Half adder is a combinational logic circuit with
two inputs and two outputs.
This circuit has two outputs carry and sum.
The Carry output is 0 unless both the inputs are
1.
Half Adder Produce sum of two variables and
carry value which are those binary digit.
Then the Boolean expression for a half adder is
⦁ For the SUM bit: SUM = A XOR B = A ⊕ B
as follows.
⦁ For the CARRY bit: CARRY = A AND B = A.B
Full Adder:
Logic Diagram
Truth Table
14
Input Output
A B CARR SUM CARRY
Y IN OUT
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
15
5. Design of a 2-Bit Magnitude
Comparator
o Implement and simulate a 2-bit
magnitude comparator using logic gates.
o Test the circuit with different pairs of
binary inputs to verify the comparison
results.
Ans:
Logic Diagram
16
Truth Table
Input Output
A1 A0 B1 B0 A< A= A>
B B B
0 0 0 0 0 1 0
0 0 0 1 1 0 0
0 0 1 0 1 0 0
0 0 1 1 1 0 0
0 1 0 0 0 0 1
0 1 0 1 0 1 0
0 1 1 0 1 0 0
0 1 1 1 1 0 0
1 0 0 0 0 0 1
1 0 0 1 0 0 1
1 0 1 0 0 1 0
1 0 1 1 1 0 0
1 1 0 0 0 0 1
1 1 0 1 0 0 1
1 1 1 0 0 0 1
1 1 1 1 0 1 0
17
Inputs and Outputs:
Inputs:
18
6. Memory Simulation: RAM Module
o Design and simulate a simple RAM
module in Logisim.
o Test read and write operations to the
RAM module with different addresses.
Ans:
Logic Diagram
CS CS R W Memory State of
1 2 D R Function data bus
0 0 x x Inhibit High-
impedance
0 1 x x Inhibit High-
impedance
1 0 0 0 Inhibit High-
impedance
1 0 0 1 Write Input data
19
to RAM
1 0 1 x Read Output
data to
RAM
1 1 x X Inhibit High-
impedance
20