Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

202051116

Mayank Mangal Mourya CS268


CS268-laboratory-Assignment-1

Aim: Designing of 11-bit and 4-bit


bit ALU using Logisim.

Project Prerequisites:
 Basic understanding of Boolean concepts
 Basic understanding of logic gates

Objective: 4 bit arithmetic logic unit (with AND, OR, XOR, ADD operation)
 Understanding behavior of arithmetic logic unit from working module
and the module designed by the student as part of the experiment.
 Designing an arithmetic logic unit for given parameter.

Tool: Logisim

Loading data in the arithmetic logic unit

i. Examining the AND behavior

ii. Examining the OR behavior


202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1

iii. Examining the XOR behavior


202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1

iv. Examining the ADD behavior


202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1

Theory and Design


ALU or Arithmetic Logical Unit is a digital circuit to do arithmetic operations like
addition, subtraction , divisior , multiplication and logical operations
rations like and,
or, xor, nand, nor etc. A simple block diagram o off a 4 bit ALU for operations and
or , xor and Add is shown here .
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1

1 bit ALU circuit in logisim.

4-bit-ALU-circuit
circuit in logisim using 11-bit-ALU-circuit
circuit
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1
Test plan :
1. Set inputs 0101 and 0011 and check output for all possible select input
combinations.
When carry = 0
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1

When carry = 1
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1

2. Set any two 16-bit


bit number and check output for all possible select input
combinations.
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1

We take different value and get above mention result for 16 bit ALU.
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1
Assignment Statements:
1. Design a 4 bit ALU comprising only the AND, OR, XOR and Add operations.

2. Design a 16-bit
bit ALU comprising all logic gates and arithmetic operators.
202051116
Mayank Mangal Mourya CS268-laboratory-Assignment-1

Aim: To implement Data Path Architecture structure using


4-bit ALU.

Project Prerequisites:
● Basic understanding of ALC.

● Basic understanding of PC, Registers.

Objective:
1. Understanding operation of ALU.

2. Understanding operation of CPU,Memory

3. Understanding Datapath Operation.

Tool: Logisim
Theory and Design
A data path (also written as datapath) is a set of functional units that carry out
data processing operations. Datapaths, along with a control unit, make up the
CPU (central processing unit) of a computer system. A larger data path can also
be created by joining more than one together using multiplexers.

Currently, data paths can only be configured once. Researchers are trying to find
ways to imprint data paths on fabrics and make them reconfigurable. This
action would allow them to be configured at runtime, providing for improved
efficiency and power savings.
202051116
Mayank Mangal Mourya CS268
CS268-laboratory-Assignment-1
202051116
Mayank Mangal Mourya CS268-laboratory-Assignment-1

Before you pass the laboratory exercise, think about the questions
below and explain to your supervisor:
 What is the role of 16 * 32 bit Sign extender?
Sign-extending means the value of the most significant bit of the 16-
bit integer (the sign bit, for signed 16-bit integers) is used to fill the
16 higher bits. This means that if your 16 bits represent a signed
integer, your 32-bit value will represent the same integer.
 Why ALU would we need this in MIPS to execute instructions?
ALU is very important in MIPS. Because it supports 6 operations (AND,
OR, add, sub, slt, and NOR) in a combinational circuit that calculates a
32-bit output based on two 32-bit inputs and a 4-bit input specifying
the ALU operation to perform. The ALU also computes three flag bits,
C, V, and Z.
 Explain Registers.
Register is smallest data storage unit in computer Architecture which used
to quickly storage, transfer and accept data and instructions.
 How Read/Write implementation happens in data path architecture?
Read and write implementation happens with the help of “system buses” in
data path architecture. In this process three mainly buses works 1. Address
bus 2.Data bus 3. Control bus. Mainly read and write operation done by
control bus.
 Explain Data and Instruction Memory ?
This is one of the concept which is given by Harvard Architecture “ We
consider a simple version of MIPS that uses Harvard architecture. Harvard
architecture uses separate memory for instruction and data.”
Instruction memory is read-only – a programmer cannot write into the
instruction memory. To read from the data memory, set Memory read =1
To write into the data memory, set Memory write =1
 Explain Program Counter.
202051116
Mayank Mangal Mourya CS268-laboratory-Assignment-1
the program counter is a register that manages the memory address of the
instruction to be executer next. The CPU Reads the Address where the
instruction to be executed next is stored from the PC and executes it in
sequences.

 Explain Load and Store Instructions.


It is one kind of instruction that manages by the Micro processor’s. In this,
Load instructions is responsible for “Moving data from memory to registers.
While on the other hand Store instructions is responsible for “Moving data
from registers to memory.

You might also like