Lab 01 MIP Solved
Lab 01 MIP Solved
Programming
EL-3002
LABORATORY MANUAL
Fall 2024
LAB 01
Verification of ALU Operations and
Implementation of a Basic Memory Model Using
Flip-flops on Proteus
______________________________________
LAB ENGINEER SIGNATURE & DATE
Learning Objectives:
a. Brief overview of Proteus.
b. To verify Arithmetic Logic Unit IC (ALU-74HC181) operations
c. How to build a basic model of a memory elements (registers) using flip flops
d. How to read and write from/to registers
Equipment Required:
a. PC
b. Proteus
Introduction:
1. Verification of ALU operations:
ALU is a digital circuit used to perform arithmetic and logic operations.
It represents the fundamental building block of the central processing unit (CPU) of
a computer. Modern CPUs contain very powerful and complex ALUs.
In addition to ALUs, modern CPUs contain a control unit (CU).
A register is a small amount of storage available as part of a CPU. The control unit
tells the ALU what operation to perform on that data, and the ALU stores the result
in an output register. The control unit moves the data between these registers, the
ALU, and memory.
(a) (b)
74HCT181: (a) pin configuration (b) its proteous view
Task 1:
Verify all operations of ALU using available IC on Proteus. Display it on seven segment
display.
To evaluate an ALU in Proteus, integrate IC models for simulation and use a seven-segment
display to visually verify the outputs.
Task 2:
Fill the missing term in the following table.
L L L H A+B
L L H L ĀB A+
L L H H Logical 0 minus 1
L H L L A plus A
L H L H B’ (A + B) plus A
L H H L A minus B minus 1
L H H H A A minus 1
H L L L Ā+B A plus AB
H L L H A plus B
H L H L B (A + ) plus AB
H L H H A*B AB minus 1
H H L L Logical 1 A plus A(1)
H H L H A+ (A + B) plus A
H H H L A+B (A + ) plus A
H H H H A minus 1 A minus 1
In electronics, a flip-flop is a circuit that has two stable states and can be used to store state
information.
It is the basic storage element in sequential logic.
Flip-flops and latches are a fundamental building block of digital electronics systems used
in computers, communications, and many other types of systems.
Flip-flops and latches are used as data storage elements. Such data storage can be used for
storage of state, and such a circuit is described as sequential logic.
Flip-flops can be either simple (transparent or opaque) or clocked (synchronous or edge
triggered).
Although the term flip-flop has historically referred generically to both simple and clocked
circuits, in modern usage it is common to reserve the term flip-flop exclusively for
discussing clocked circuits
The simple ones are commonly called latches. Using this terminology, a latch is level-
sensitive, whereas a flip-flop is edge-sensitive. That is, when a latch is enabled it becomes
transparent, while a flip flop's output only changes on a single type (positive going or
negative going) of clock edge.
D CK Q
0 0 1
1 1 0
X Q (previous) (previous)
X 0/1 Q (previous) (previous)
Task 3:
Draw the waveform for D flip flop.
The 74HC/HCT173 is 4-bit parallel load registers with clock enable control, 3-state
buffered outputs (Q0 to Q3) and master reset (MR).
When the two data enable inputs (E1 and E2) are LOW, the data on the Dn inputs is loaded
into the register synchronously with the LOW-to-HIGH clock (CP) transition.
When one or both En inputs are HIGH one set-up time prior to the LOW-to-HIGH clock
transition, the register will retain the previous data. Data inputs and clock enable inputs are
fully edge-triggered and must be stable only one set-up time prior to the LOW-to-HIGH
clock transition.
The master reset input (MR) is an active HIGH asynchronous input. When MR is HIGH,
all four flip-flops are reset (cleared) independently of any other input condition. The 3-state
output buffers are controlled by a 2-input NOR gate.
When both output enable inputs (OE1 and OE2) are LOW, the data in the register is
presented to the Qn outputs.
Task 4:
From the above flip flop IC fill the following table.
Task 5:
Implement memory using 74HC173. This memory must have the capability of writing to or
reading from any of the 4 memory locations.
Operation:
Write: Set Write Enable low, select location via decoder, input data, and clock it in.
Read: Set Write Enable high, select location, and read data from the output bus.
This setup provides a 4x4 bit memory array using 74HC173 ICs.
Marking Criterion: