You are on page 1of 6

North South University

Department of Electrical & Computer Engineering

LAB REPORT

Computer Organization and Architecture Lab


Experiment Number: Lab - #01
Experiment Name: Design of a 2-bit Arithmetic unit

Experiment Date: 27-10-2021

Report Submission Date: 01-11-2021

Section: 02

Student Name: Zunayed Islam Pranto. Score

Student ID: 1921609642


Remarks:

Design of a 2-bit Logic Unit

Objective : The intension of today’s experiment is to construct a 2-bit logic


unit. Our logic unit will perform 4 micro-operation those operations are AND, OR,
NOT, and XOR (2-bit logic unit is a part of ALU Arithmetic logic unit).
We know that these operations can operate only single bits. But our 2-bit logic
unit will enable us to perform 2-bit operations. These operations will help us to
manipulate data saved in a register. We are going to use MUX to easily switch
from one operation to another.

List of Equipment’s :
1. Trainer board
2. IC (7404, 7408, 7432, 7386, 74F153)
3. Wires for connections.

Theory : Micro operations like AND, OR, XOR and NOT operations can operate
only single bit operation . And logic gate gives output 1 if all the inputs are 1. OR
gate gives output 1 if one of the inputs is 1. XOR gate gives output 1 if two inputs
are different. NOT gate gives output the invert of its input. All these simple binary
logic gates operate on one pair of single bits at a time. 2-bit logic unit is used to
operate two pairs of 2 single bits at a time. Two most significant bits and two least
significant bits of 2, two-bit number is separated and then micro-operations are
performed. One part performs logical operation of most significant bits other part
perform operation of least significant bit. MUX is used to select which operation
to perform. MUX (multiplexer) is a combinational circuit that uses several data
inputs to generate a single output. MUX has only one output. And its number of
inputs is 2^n of it select bit. Select bit decides which input to send as output.

Circuit Diagram :
F1: 2-bit logic unit

Data/Reading/Truth table :
A1 A0 B1 B0 AND1 AND OR1 OR0 XOR1 XOR NOT NOT
0 0 A1 A0
0 0 0 0 0 0 0 0 0 0 1 1
0 0 0 1 0 0 0 1 0 1 1 1
0 0 1 0 0 0 1 0 1 0 1 1
0 0 1 1 0 0 1 1 1 1 1 1
0 1 0 0 0 0 0 1 0 1 1 0
0 1 0 1 0 1 0 1 0 0 1 0
0 1 1 0 0 0 1 1 1 1 1 0
0 1 1 1 0 1 1 1 1 0 1 0
1 0 0 0 0 0 1 0 1 0 0 1
1 0 0 1 0 0 1 1 1 1 0 1
1 0 1 0 1 0 1 0 0 0 0 1
1 0 1 1 1 0 1 1 0 1 0 1
1 1 0 0 0 0 1 1 1 1 0 0
1 1 0 1 0 1 1 1 1 0 0 0
1 1 1 0 1 0 1 1 0 1 0 0
1 1 1 1 1 1 1 1 0 0 0 0

Table: Truth table.


Discussion: In this lab experiment we have discussed how to build a 2 bit
Logic unit both in Logisim and bread board. In Logisim software we build the logic
unit using gates and trainer board we used IC.

In order to construct a 2-bit logic unit in Logisim, we first took 4


input pins A1, A0, B1, B0, here A1 and B1 is the most significant bit of two, two-bit
number and A0, B0 are least significant bits. For 4 micro-operations we used one
2 input AND gate, one 2 input OR gate, one 2 input XOR gate, a NOT gate and one
4*1 MUX. Then connected A1, B1 to the gates input pin (NOT gate input pin is
connected to A1). Then connected all 4 outputs to the MUX’s 4 input. MUX
output is connected to one output named it F1. Then repeated the process for
least significant bits A0, and B0 and connected its MUX output to F0. After that we
took two select bits s1 and s0, using a splitter we connected the select bits to
both MUX. We also disabled both MUX’s enable.
(We used so that just by changing the select bits we can decide which operation
to perform). Lastly, we checked two outputs of two MUX by changing the inputs
and select bit and marched those output with our truth table.
When we construct the logic unit in trainer board, we first
connected the ground and 5volt to the breadboard then connected all input pins
to output to check if all the pins and ground are working or not. Then we took one
7408 AND IC, one 7432 OR IC one 7406 XOR IC, one 7404 NOT IC and one 74F153
MUX. Then connected all GND pins (pin 7, for MUX 8) to GND port of breadboard
using wires. Then connected VCC (pin 14, for MUX 16) to 5 volts also connected
both enable pins to 5 volts. Then we connected sw4 to no.1 pin of 7408 IC and
used the same connection and connect to all other IC (except MUC IC). then sw6
to no.2 pin of AND7408 IC and connected the same connection to all other IC
(except Not and MUX IC). Then sw5 we connected to no 4pin of and IC and
connected the same connection to all other IC (For NOT IC then pin was no 3).
Lastly, we connected sw7 to no 5 pin of AND IC used the same connection for OR
and XOR IC. (Here sw4, sw5 represents A0, A1 and sw6,7 represents B0, B1). After
that we connected output pin of AND,OR,XOR IC , NOT IC (Pin no 3, for NOT IC pin
number 2) to MUX input pin 10a, 11a,12a,13a accordingly. And other output pin 6
of all IC (For NOT IC PIN 4) to 10b to 13b accordingly. After that, we connected
then s1 and s0 pin of MUX IC to sw8, sw9 and connected MUX output pins Ya and
Yb to output led pins of trainer board.

At last, we checked the outputs of our 2-bit logic unit by changing the
input values, select bits and matching the outputs with our truth table.

You might also like