0% found this document useful (0 votes)
17 views24 pages

ALU and Memory Devices Explained

The document outlines various experiments related to computer architecture, focusing on the Arithmetic Logic Unit (ALU) and memory devices such as RAM, ROM, HDD, and FDD. It details the functions and designs of different circuits including a common bus, combinational shifter, arithmetic circuit, BCD adder/subtractor, and a binary multiplier. Each section includes the aim, theory, ICs used, and precautions for conducting the experiments.

Uploaded by

Shabs
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views24 pages

ALU and Memory Devices Explained

The document outlines various experiments related to computer architecture, focusing on the Arithmetic Logic Unit (ALU) and memory devices such as RAM, ROM, HDD, and FDD. It details the functions and designs of different circuits including a common bus, combinational shifter, arithmetic circuit, BCD adder/subtractor, and a binary multiplier. Each section includes the aim, theory, ICs used, and precautions for conducting the experiments.

Uploaded by

Shabs
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EXPERIMENT:- 01

AIM​: To study arithmetic and logic unit and memory devices (RAM, ROM, HDD,
FDD) .

ARITHMETIC AND LOGIC UNIT

Stands for "Arithmetic Logic Unit." An ALU is an Integrated circuit within a CPU
or GPU that performs arithmetic and logic operations. Arithmetic instructions
include addition, subtraction, and shifting" operations, while logic instructions
include Boolean comparisons, such as AND, OR, XOR and NOT operations on
the values held in the processors REGISTERS or its ACCUMULATOR.

ALUs are designed to perform integer calculations. Therefore, besides adding


and subtracting numbers, ALUs can often handle the multiplication of two
integers, since the result is also an integer. However, ALUs typically do not
perform division operations, since the result may be a fraction or a "floating
point" number. Instead division operations are usually handled by the floating-
point unit (FPU) which also performs other non- integer calculations.

While the ALU is a fundamental component of all processors, the design and
function of an ALU may vary between different processor models. For
example, some only perform integer calculations, while others are designed to
handle floating point operations as well. Some processors contain a single ALU,
while others include several arithmetic logic units that work together to
perform calculations. Regardless of the way an ALU is designed, its primary job
is to handle integer operations: Therefore, a computer's integer performance
is tied directly to the processing speed of the ALU.

Typically, the ALU has direct input and output access to the processor
controller, main memory (random access memory or RAM in a personal
computer), and input/output devices. Inputs and outputs flow along an
electronic path that is called a bus. The input consists of an instruction word
(sometimes called a machine instruction word) that contains an operation
code (sometimes called an "OP code"), one or more operands, and sometimes
a format code. The operation code tells the ALU what operation to perform
and the operands are used in the operation. (For example, two operand may
be added together or compared logically). The format may be combined with
the op code and tells, for example, whether this is a fixed-point or a
floating-point instruction. The output consists of a result that is placed in a
storage register and settings that indicate whether the operation was
performed successfully. (If it isn't, some sort of status will be stored
permanent place that is sometimes called machine status word).

RANDOM ACCESS MEMORY


Alternatively referred to as main memory, primary memory, or system
memory, RAM (random access memory) is the place in a computing device
where the operating system (OS), application programs and data in current use
are kept so they, can be quickly reached by the device's processor. RAM is
much faster to read from and write to than other kinds of storage in a
computer, such as a hard disk drive), solid-state drive (SSD) or optical drive.
Data remains in RAM as long as the computer is running. when the computer is
turned off, RAM loses its data. When the computer is turned on again, the OS
and other files are once again loaded into RAM, usually from an HDD or SSD.
RAM contains multiplexing and demultiplexing circuitry, to connect the data
lines to the addressed storage for reading or writing the entry. Usually more
than one bit of storage is accessed by the same address, and RAM devices
often have multiplexes and are said to be '8-bit' or '16-bit' etc. devices.
You can compare RAM to a person's short-term memory and a hard disk to
long-term memory. Short-term memory focuses on the work at hand, but can
only keep many facts in view at one time. If short-term memory fills up, your
brain is sometimes able to refresh it from facts stored in long-term memory. A
computer also works this way. If RAM fills up, the processor needs to
continually go to the hard disk to overlay old data in RAM with new, slowing
the computer’s operation. Unlike a hard disk, which can become completely
full of data and unable to accept any more, RAM never runs out of memory,
but the combination of RAM and storage memory can be completely used up.
RAM comes in two primary forms:-
Dynamic random access memory:- DRAM is what makes up the typical
computing device RAM and, as noted above, requires constant power to hold
on to stored data.
Static random access memory:- SRAM doesn't need constant power to hold on
to data, but the way the memory chips are made means they are much larger
and thousands of times more expensive than an equivalent amount of DRAM.
However, SRAM is significantly faster than DRAM. The price and speed
differences mean SRAM is mainly used in small amounts as cache memory
inside a device's processor.

READ ONLY MEMORY


ROM is "built-in" computer memory containing data that normally can only be
read, not written to. ROM contains the programming that allows your
computer to be "booted up" or regenerated each time you turn it on. Unlike a
computer's random access memory (RAM), the data, in ROM is not lost when
the computer power is turned off. The ROM is sustained by a small long-life
battery in your computer. lf you ever do the hardware setup ​procedure with
your computer, you effectively will be writing to ROM.
Recently, ROM has come to include memory that is read-only in normal
operation, but can still be reprogrammed in some way. Erasable
programmable read-only memory (EPROM) and electrically erasable
programmable read-only memory (EEPROM)" can be erased and
re-programmed, but usually this can only be done at relatively slow speeds,
may require special equipment to achieve, and is typically only possible a
certain number of times.

HARD DISK DRIVE


A hard disk is part of a unit, often called a "disk drive," "hard drive," or "hard
disk drive," that stores and provides relatively quick access to large amounts of
data on an electromagnetically charged surface or set of surfaces. Today's
computers typically come with a hard disk that contains several billion bytes
(gigabytes) of storage. A hard drive can be used to store any data, including
pictures, music, videos, text documents, and any files created or downloaded.
Also, hard drives store files for the operating system and software programs
that run on the computer.
A hard disk is really a set of stacked "disks," each of which, like phonograph
records, has data recorded electromagnetically in concentric circles or "tracks"
on the disk. A "head" (something like a phonograph arm but in a relatively
fixed position) records (writes) or reads the information on the tracks. Two
heads, one on each side of a disk, read or write the data as the disk spins. Each
read or write operation requires that data be located, which ls an operation
called a "seek. " (Data already In a disk cache, however, will be located more
quickly.)
A hard, disk/drive unit comes with a set rotation speed varying from 4500 to
7200 rpm. Disk access time ls measured In milliseconds. Although the physical
location can be identified with cylinder, track, and sector location;\, These are
actually mapped to a logical block address (LBA) that works the larger address
range on today's hard disks.

FLOPPY DISK DRIVE


A floppy disk, also called a floppy, diskette or just disk, is a type of disk storage
composed of a disk of thin and flexible magnetic storage medium, sealed in a
rectangular plastic enclosure lined with fabric that removes dust particles. The
5%-inch disk has a large circular hole in the centre for the drive's spindle and. a
small oval aperture in both sides of the plastic to allow the drive's heads to
read and write data ; the : magnetic medium can be spun by rotating it from
the middle hole. A small notch on the right of the disk identifies that it ls
writable, detected by a mechanical switch or phototransistor above it if it is
not present, the disk is read-only.
A spindle motor in the drive rotates the magnetic medium at a certain speed,
while a stepper motor-operated mechanism moves the magnetic read/write
head(s) radially along the surface of the disk. Both read and write operations
require the media to be rotating and the head to contact the disk media, an
action originally accomplished by a "disk load” solenoid.
A blank unformatted diskette has a coating of magnetic oxide with no
magnetic order to the particles. During formatting, the particles are aligned
forming. A pattern of magnetized tracks, each broken up into sectors, enabling
the controller to properly read and write data. The tracks are concentric rings
around the centre, with spaces between tracks where no data is written ; gaps
with padding bytes are provided between the sectors and at the end of the
track to allow for slight speed variations in the disk drive, and to permit better
inter-operability with disk drives connected to other similar systems. Each
sector of data has a header that identifies the sector location on the disk. A
cyclic redundancy check (CRC) is written into the sector headers and at the end
of the user data so that the disk controller can detect potential errors. Some
errors are soft and can be resolved by automatically re-trying the read
operation; other errors are permanent and the disk controller will signal a
failure to the operating system if multiple attempts to read the data still fail.
Experiment No. :- 03

Aim:-​ ​To design a 4-bit common bus using 4:1 mux to transfer data from register to
bus.

IC's Used:-
74153: Dual 4: 1 MUX
7496: Shift Register

Theory:-
A multiplexer (or mux) is a device that selects one of several analog or digital input
signals and forwards the selected input into a single line.
A register is a quickly accessible location available to a computer's central processing
unit (CPU). Registers usually consist of a small amount of fast [Link] are
normally measured by the number of bits they can hold.
Example an "8-bit register" or a "32-bit register".

Types of registers
• User-accessible registers can be read or written by machine instructions.
• General purpose registers (GPRs) can store both data and addresses.
• Constant registers hold read-only values such as zero, one, or pi.

The operations that can be performed using these registers have a significant impact on
the efficiency of code generated by optimizing compilers.

A bus is a communication system that transfers data between .components inside a


computer, or between computers. This expression covers all related hardware
components (wire, optical fibre, etc.) and software, including communication protocols.
If common bus is not used then every register has to be connected to individual bus
creating a complex and impossible situation to implement memory transfer. So it must
be required, to have a bus which is connected to the memory as well as the register
from which the data transfer has to occur.
Schematic:-

Output:-

PRECAUTIONS:-
1. The connections must be done properly and there must be no loose connections as
it may affect the circuitry.
2. Proper ICs must be selected in order to have an efficient circuit design.
3. The output must be verified with the help of the truth tables mentioned above.
4. The aliasing must be done properly to ensure better readability of the circuit design.
Experiment No.:- 04
Aim:​ ​To design a 2-bit combinational shifter circuit which implements the logical
shift, circular shift, arithmetic shift for both direction.

IC Used:
74153 (Dual 4:1 MUX)
74157

Theory:
The shift operators are the basic operations performed on the data bits of a
register. The various shift operations result in the different types of data to be
implemented in the data.
Various kinds of shift operations include:
1. Logical shift
i. Shift Right (shr).
ii. Shift Left (shl).
2. Circular shift
i. Circular Shift Right (cshr).
ii. Circular Shift Left (cshl) .
3. Arithmetic shift
i. Arithmetic Shift Right (ashr).
ii. Arithmetic Shift Left (ashl).

Schematic:
Output:

Precautions:
1. The connections must be done properly and there must be no loose
connections as it may affect the circuitry.
2. Proper ICs must be selected in order to have an efficient circuit design.
3. The output must be verified with the help of the truth tables mentioned above.
4. The aliasing must be done properly to ensure better readability of the circuit
design.
Experiment No. :- 05
Aim: ​To design 2 bit arithmetic circuit which performs the following arithmetic
operations add, add with carry, subtract, subtract with borrow, increment and
decrement.

IC Used:
74153 (8:2 mux)
7482 (2 bit full adder)
7404

Theory:
An arithmetic circuit is a logic circuit that performs basic arithmetic operations Iike
addition, subtraction, increment, decrement and transfer operations using a single
combinational circuit. It uses multiplexers and full adders to do so. The selection bits,
along with an additional input at 2 and 3 input positions of the multiplexer, determine the
type of operation to be done on the input data.

There are two selection variables S1 and SO and two 2-bit data inputs A and B. The
circuit generates the eight arithmetic operations in conjunction with the carry, C.

The following is the truth table for the given circuit.


Schematic:

Output:

Precautions:
1. The connections must be done properly and there must be no loose connections as
it may affect the circuitry.
2. Proper ICs must be selected in order to have an efficient circuit design.
3. The output must be verified with the help of the truth tables mentioned above.
4. The aliasing must be done properly to ensure better readability of the circuit design.
Experiment No.:- 06

Aim :-​ To design 4-bit BCD Adder & Subtractor using IC 7483.

Theory:-
- BCD numbers:-
Humans do arithmetic calculations with decimal numbers because our number
system is base ten. Because microprocessors use a binary number system, special
techniques are needed to add or subtract decimal [Link] of the decimal digits
can be coded in binary using four bits. This representation is called binary coded
decimal or BCD. Thus the decimal numbers 26 and 27 would be stored as 0010 0110
and 0010 0111 inBCD. Many data input or output devices represent numbers as
decimal digits and encode them as BCD. For this reason, it is useful to do addition and
subtraction in BCD, but special techniques are required.

- BCD Adder:-
Addition of two BCD digits requires two 4-bit Parallel Adder Circuits. One 4-bit
Parallel Adder adds the two BCD digits. A BCD Adder uses a circuit which checks the
result at the output of the first adder circuit to determine if the result has exceeded 9 or
a Carry has been generated. If the circuit determines any of the two error conditions the
circuit adds a 6 to the original result using the second Adder circuit. The output of the
second Adder gives the correct BCD output. If the circuit finds the result of the first
Adder circuit to be a valid BCD number (between 0 and 9 and no Carry has been
generated), the circuit adds a zero to the valid BCD result using the second Adder. The
output of the second Adder gives the same result.

- BCD Subtractor:-
As their name implies, a Binary Coded Decimal Subtractor is a decision making
circuit that subtracts two binary coded decimal numbers from each other, for example, X
– Y to find the resulting difference between the two numbers.
Unlike the Binary Coded Decimal Adder which produces a SUM and a CARRY bit when
two binary coded numbers are added together, the ​binary subtractor produces a
DIFFERENCE, D by using a BORROW bit, B from the previous column. Then
obviously, the operation of subtraction is the opposite to that of addition.
Schematic:-
Output:-
Experiment No.:- 07
Aim :- ​ ​To design a 2-bit multiplication circuit.

Theory:- ​A Binary Multiplier is a digital circuit used in digital electronics to multiply


two binary numbers and provide the result as output. The method used to multiply two
binary numbers is similar to the method taught to school children for multiplying decimal
numbers which is based on calculating partial product, shifting them and adding them
together. Similar approach is used to multiply two binary numbers. Long multiplicand is
multiplied by 0 or 1 which is much easier than decimal multiplication as product by 0 or
1 is 0 or same number respectively. Figure 1 below shows the block diagram of a 2-bit
binary multiplier. The two numbers A1A0 and B1B0 are multiplied together to produce a
4-bit output P3P2P1P0. (The maximum product term can be 3 * 3 = 9, which is 1001, a
4-bit number).

1011 (this is 11 in binary)


x 1110 (this is 14 in binary)
======
0000 (this is 1011 x 0)
1011x (this is 1011 x 1, shifted one position to the left)
1011xx (this is 1011 x 1, shifted two positions to the left)
+ 1011xxx (this is 1011 x 1, shifted three positions to the left)
=========
10011010 (this is 154 in binary)
Truth Table for 2-bit binary multiplier :-

Schematic :-

Output :-
Experiment No. - 08

Aim :​ ​Verify the function table of arithmetic logic unit using IC 74181.

IC's Used :
• 74181 (ALU IC)
• DIGITAL CLOCK

Theory :
ALU stands for the arithmetic and logical unit and is one of the important unit in
almost all the calculating machine these days be it with the hand-held mobile, or
computers. All the computational work in the system are carried out by this unit.
The typical ALU sizes are:
● 4-bit ALU: ALU that processes two 4-bit numbers.
● 8-bit ALU : ALU that processes two 8-bit numbers.
Still in the latest systems ALU sizes are 16, 32, 64-bit etc. Figure-1 shows the
block diagram of a typical [Link] figure-9.1, the 1x2 selector on the left is as a
mode selector to select one of the two units i.e. either the arithmetic unit or the
logical unit. The function select lines are then used to select one of the many
functions of arithmetic or the logical type.
Schematic :
Output :
Precautions :
I . Proper ICs must be selected in order to have an efficient circuit design.
2. The outputs must be verified by truth tables.
3. Aliasing must be done properly to ensure better readability of the circuit.

You might also like