Arithmetic and Logic Unit: Yuivr VI U Ho Kohud College of Education of Akre Department of English Language
Arithmetic and Logic Unit: Yuivr VI U Ho Kohud College of Education of Akre Department of English Language
yuivr vi u ho kohud
Course:Re1202
Date:22/6/2020
Table of Contents
noitpodntnaCp.rhtpahC ...................................................................................................... 6
1.1.What is ALU………………………..……………………………………………………………………………………………………..2
1.2.History……………………………….………………………………………………………………………………………………………3
1.4.Arithmetic Oparation………..…………………………………………………………………………………………………………6
2.1.Signals………………………………………………………………………………………………………..9
2.1.1 Status…………………………………………………………………………………………………9
2.2.Data…………………………………………………………………………………………………………….9
2.3.Apcode………………..………………………………………………………………………………………10
2.4.Application……………..……………………………………………………………………………………10
2.5.Design of ALU……………………………………………………………………………………………….12
Chapter .3 .Conclusition………………………………………………………………………………16
1
Chapter .1.intrudoction
1.1Arithmetic
The inputs to an ALU are the data to be operated on, called operands, and a code
indicating the operation to be performed; the ALU's output is the result of the performed
operation. In many designs, the ALU also has status inputs or outputs, or both, which
convey information about a previous operation or the current operation, respectively,
between the ALU and external status registers.
ALU stands for Arithmetic and Logic Unit. It is a subsystem or a component of CPU.
The main objective of it is to handles arithmetic and logic operations. Arithmetic
operations are addition, subtraction, division, multiplication etc. The logical operations
determine whether a statement is true or false. Furthermore, Graphical Processing Units
(GPU), Floating Point Units (FPU) also have ALUs. A single CPU, FPU or a GPU can
have multiple ALUs to handle advanced calculations ALU performs various calculations.
The inputs to it are the data on which it is to operate. They are called operands. In a
mathematical expression such as “2+3 = 5”, 2 and 3 are the operands .
2
1.2. History
Mathematician John von Neumann proposed the ALU concept in 1945 in a report on
the foundations for a new computer called the EDVAC.[1]
The cost, size, and power consumption of electronic circuitry was relatively high
throughout the infancy of the information age. Consequently, all serial computers and
many early computers, such as the PDP-8, had a simple ALU that operated on one data
bit at a time, although they often presented a wider word size to programmers. One of
the earliest computers to have multiple discrete single-bit ALU circuits was the
1948 Whirlwind I, which employed sixteen of such "math units" to enable it to operate
on 16-bit words.
In 1967, Fairchild introduced the first ALU implemented as an integrated circuit, the
Fairchild 3800, consisting of an eight-bit ALU with accumulator.[2] Other integrated-
circuit ALUs soon emerged, including four-bit ALUs such as the Am2901 and 74181.
These devices were typically "bit slice" capable, meaning they had "carry look ahead"
signals that facilitated the use of multiple interconnected ALU chips to create an ALU
with a wider word size. These devices quickly became popular and were widely used in
bit-slice minicomputers.
Microprocessors began to appear in the early 1970s. Even though transistors had
become smaller, there was often insufficient die space for a full-word-width ALU and,
as a result, some early microprocessors employed a narrow ALU that required multiple
cycles per machine language instruction. Examples of this includes the popular Zilog
Z80, which performed eight-bit additions with a four-bit ALU.[3] Over time, transistor
geometries shrank further, following Moore's law, and it became feasible to build wider
ALUs on microprocessors.
Modern integrated circuit (IC) transistors are orders of magnitude smaller than those of
the early microprocessors, making it possible to fit highly complex ALUs on ICs.
Today, many modern ALUs have wide word widths, and architectural enhancements
such as barrel shifters and binary multipliers that allow them to perform, in a single
clock cycle, operations that would have required multiple operations on earlier ALUs.
3
1.3 How an ALU Works
An ALU performs basic arithmetic and logic operations. Examples of arithmetic
operations are addition, subtraction, multiplication, and division. Examples of logic
operations are comparisons of values such as NOT, AND, and OR.
The s Implest type of operation is a NOT gate. This uses only a single transistor. It uses
a single input and produces a single output, which is always the opposite of the input
This figure (1) shows the logic of the NOT gate:
4
Other gates consist of multiple transistors and use two inputs. The OR gate results in a
1 if either the first or the second input is a 1. The OR gate only results in a 0 if both
inputs are 0. This figure (2) shows the logic of the OR gate:
The AND gate results in a 1 only if both the first and second input are 1s. figure (3)
shows the logic of the AND gate:
5
NOT gate : Not gate is used to reverse the result of gates or reverse Boolean state from
0 to 1 and 1 to 0.Not gate is also used with ‘AND’ and ‘OR’ gate. While using with
AND or ‘OR’ gate, NOT gate is representing an as small circle in front of both gates.
After using NOT gate, AND gates convert into NAND or ‘OR’ gate convert into NOR.
Figure(4)
1.4.arithmatic operation
The basic arithmetic operations for real numbers are addition, subtraction,
multiplication, and division.
The basic arithmetic properties are the commutative, associative, and distributive
properties.
Addition
Addition is the most basic operation of arithmetic. In its simplest form, addition
combines two quantities into a single quantity, or sum. For example, say you have a
group of 2 boxes and another group of 3 boxes. If you combine both groups together,
you now have one group of 5 boxes. To represent this idea in mathematical terms:
2+3=5
6
Subtraction
5−3=2
Multiplication
2+2+2+2=8
2⋅4=82⋅4=8
Note that both methods give you the same result—8—but in many cases, particularly
when you have large quantities or many groups, multiplying can be much faster.
Division
8÷4=2
7
The Basic Arithmetic Properties :
Commutative Property
The commutative property describes equations in which the order of the numbers
involved does not affect the result. Addition and multiplication are commutative
operations:
2+3=3+2=52+3=3+2=5
5⋅2=2⋅5=105⋅2=2⋅5=10
Associative Property
The associative property describes equations in which the grouping of the numbers
involved does not affect the result. As with the commutative property, addition and
multiplication are associative operations:
(2+3)+6=2+(3+6)=11(2+3)+6=2+(3+6)=11
(4⋅1)⋅2=4⋅(1⋅2)=8(4⋅1)⋅2=4⋅(1⋅2)=8
Distributive Property
The distributive property can be used when the sum of two quantities is then multiplied
by a third quantity.
(2+4)⋅3=2⋅3+4⋅3=18(2+4)⋅3=2⋅3+4⋅3=18
8
Chapter 2 . body & method
2.1.signals
2.1.1 status
Type 1 –output he status outputs are various individual signals that convey
supplemental information about the result of the current ALU operation. General-
purpose ALUs commonly have status signals such as:
Carry-out, which conveys the carry resulting from an addition operation, the borrow
resulting from a subtraction operation, or the overflow bit resulting from a binary
shift operation.
Zero, which indicates all bits of Y are logic zero.
Negative, which indicates the result of an arithmetic operation is negative.
Overflow, which indicates the result of an arithmetic operation has exceeded the
numeric range of Y.
Parity, which indicates whether an even or odd number of bits in Y are logic one.
At the end of each ALU operation, the status output signals are usually stored in
external registers to make them available for future ALU operations (e.g., to
implement multiple-precision arithmetic) or for controlling conditional branching. The
collection of bit registers that store the status outputs are often treated as a single, multi-
bit register, which is referred to as the "status register" or "condition code register".
Type 2_inputs
The status inputs allow additional information to be made available to the ALU when
performing an operation .typically this is a single "carry-in "bit that is the stored carry –
out fr0m a previous ALU opretion.
2.2.Data
A basic ALU has three parallel data buses consisting of two input operands (A and B)
and a result output (Y). Each data bus is a group of signals that conveys one binary
integer number. Typically, the A, B and Y bus widths (the number of signals
comprising each bus) are identical and match the native word size of the external
circuitry (e.g., the encapsulating CPU or other processor).
9
2.3. Apcode
The opcode input is a parallel bus that conveys to the ALU an operation selection code,
which is an enumerated value that specifies the desired arithmetic or logic operation to
be performed by the ALU. The opcode size (its bus width) determines the maximum
number of different operations the ALU can perform; for example, a four-bit opcode
can specify up to sixteen different ALU operations. Generally, an ALU opcode is not
the same as a machine language opcode, though in some cases it may be directly
encoded as a bit field within a machine language opcode
2.4 applications
2.4.1.Multiple-precision arithmetic
bit fragments: 0x12 (MS), 0x34 , and 0x56 (LS). Since the size of a fragment exactly
matches the ALU word size, the ALU can directly operate on this "piece" of operand.
The algorithm uses the ALU to directly operate on particular operand fragments and
thus generate a corresponding fragment (a "partial") of the multi-precision result. Each
partial, when generated, is written to an associated region of storage that has been
designated for the multiple-precision result. This process is repeated for all operand
fragments so as to generate a complete collection of partials, which is the result of the
multiple-precision operation.
10
operands are processed MS first in right-shift operations because the MS bit of each
partial must be obtained from the LS bit of the previously right-shifted, more-significant
operand.
In bitwise logical operations (e.g., logical AND, logical OR), the operand fragments
may be processed in any arbitrary order because each partial depends only on the
corresponding operand fragments (the stored carry bit from the previous ALU operation
is ignored).
Figure(5)
11
2.5.disign of ALU
Traditional craftsman does not distinguish between the conceptualization and the
artifact.
Separation comes about because of complexity.
The concept is captured in one or more representation languages .
Process Design
Finishes As Assembly
Design understood in terms of components and how they have been assembled
Top Down decomposition of complex functions (behaviors) into more primitive
functions.
bottom-up composition of primitive building blocks into more complex
assemblies.
UPC
FGRDGDTR
TEETERETR
CETRTESC
CCCFOCC
htatataD DFFHFFC
UoranoC
FTF
dtrN etag
12
Design Refinement
Initial Specification
Intermediate Specification
Physical Implementation
-- Given design space of components & assemblies, which part will yield the best
solution?
13
2.6. Difference Between ALU and CPU
The key difference between ALU and CPU is that the ALU is an electronic circuit
which is a subsystem of CPU that performs arithmetic and logical operations while
CPU is an electronic circuit that handles instructions to operate the computer.
A computer system consists of both hardware and software. Hardware is the electronic
or mechanical components. Software refers to the data and instructions. The essential
component to perform the tasks of the computer is the CPU. CPU consist of two main
subsystems. They are the ALU and the Control Unit.
What is ALU?
ALU stands for Arithmetic and Logic Unit. It is a subsystem or a component of CPU.
The main objective of it is to handles arithmetic and logic operations. Arithmetic
operations are addition, subtraction, division, multiplication etc. The logical operations
determine whether a statement is true or false. Furthermore, Graphical Processing Units
(GPU), Floating Point Units (FPU) also have ALUs. A single CPU, FPU or a GPU can
have multiple ALUs to handle advanced calculations ALU performs various calculations.
The inputs to it are the data on which it is to operate. They are called operands. In a
mathematical expression such as “2+3 = 5”, 2 and 3 are the operands .
14
What is CPU?
CPU (or commonly known as a processor) handles instructions to perform various tasks
of the computer. The main subsystems of the CPU are ALU and CU. ALU handles
arithmetic and logical operations. The CU that stands for the Control Unit regulates and
synchronizes operations of the computer. And it consists of programmable registers and
other electronics. Therefore, it fetches instructions from memory, decodes them and
directs them to various units to perform the required task.
Memory is an important component for the CPU to function properly. It provides the
instructions for the CPU to perform, and also after data processing, the result goes back to
the memory for storing. Furthermore, the other components that CPU relies on are system
clock, secondary storage, data and address buses. CPU can process 32bit instructions or 64-
bit instructions depending on the computer architecture.
The difference between ALU and CPU is that ALU is an electronic circuit, which is a
subsystem of CPU that performs arithmetic and logical operations while a CPU is an
electronic circuit that handles instructions to operate the computer.
15
Chapter .3 .Conclusion
The arithmetic logic unit (ALU) is a coalition of digital electronic chain that executes
real numbers and bitwise logical operations on integer binary numbers.
1. The variety of arithmetic and logic functions it can perform (i.e., the
functionality)
2. the speed of operation
The Arithmetic Logic Unit (ALU) is split into three units (and also three physical
cards): the logic unit, the arithmetic unit and the control unit. The logic and arithmetic
cards handle 8-bit logic and arithmetic functions respectively. The control unit handles
function decoding, zero detection and holds the condition registers.
About design
Block Diagrams
Circuit Diagrams
Four bit Arithmetic Logic Unit (ALU) is designed and simulated using logic gates.
Forty eight logical and arithmatic operations are implementedn
The difference between ALU and CPU is that ALU is an electronic circuit, which is a
subsystem of CPU that performs arithmetic and logical operations while a CPU is an
electronic circuit that handles instructions to operate the computer.
16
The central processing unit (CPU) is a complex set of electronic circuitry that
executes program instructions; it consists of a control unit and an arithmetic/logic
unit.
The central processing unit interacts closely with primary storage, or memory.
Memory provides temporary storage of data while the computer is executing the
program. Secondary storage holds permanent or semipermanent data.
The control unit of the CPU coordinates execution of the program instructions by
communicating with the arithmetic/logic unit and memory—the parts of the system
that actually execute the program.
The arithmetic/logic unit (ALU) contains circuitry that executes the arithmetic and
logical operations.
17
Chapter .4. reference
2.https://wps.prenhall.com/bp_capron_computers_8/9/2481/635350.cw/
content/index.html
3.http://www.eng.ucy.ac.cy/mmichael/courses/ECE314/alu-design.pdf.
4.https://www.sciencedirect.com/topics/computer-science/arithmetic-
logic-unit
18