Вы находитесь на странице: 1из 13

Arithmetic Logic Unit

Presented by:
Sangam Sanjay Pandey
16007014
The Simplest Computer Building Blocks

Instruction Register (IR) Program Counter (PC)

Control Unit 2
(CU)
ALU 3

5
Status Register (FLAG) Accumulator (ACC)
.

CPU RAM
What’s ALU?

 An Arithmetic Logic Unit (ALU) is a digital circuit that performs arithmetic


and logical operations.
 The ALU is a fundamental building block of the Central processing unit of a
computer.
 Even the simplest of microprocessors contains one ALU for purposes such as
maintaining timers.
 Multiple Arithmetic Logic Units can be found in CPUs, GPUs and FPUs.
 In some computer processors, the ALU is divided into an AU and LU.
ALU in Machine Cycle
 ALU is the last component to perform calculations in the processor.
 The ALU uses operands and code that tells it which operations to perform
for input data. After the information has been processed by the ALU, it is
sent to the computer's memory.
Background
 Mathematician John von Neumann proposed the ALU concept in 1945 in a
report on the foundations for a new computer called the EDVAC.
 In 1967, Fairchild introduced the first ALU implemented as an integrated
circuit, the Fairchild 3800, consisting of an eight-bit ALU with accumulator.
 Other integrated-circuit ALUs soon emerged, including four-bit ALUs such as
the Am2901 and 74181
Typical Schematic Symbol of an ALU
A and B: the inputs to the ALU
(aka operands)
R: Output or Result
F: Code or Instruction from the
Control Unit (aka as op-code)
D: Output status; it indicates cases
such as:
•carry-in
•carry-out,
•overflow,
•division-by-zero
•And . . .
Numerical Systems

 An ALU must process numbers using the same format as the rest of
the digital circuit. For modern processors, that almost always is the
two's complement binary number representation. Early computers
used a wide variety of number systems, including one's
complement, sign-magnitude format, and even true decimal
systems, with ten tubes per digit.
 ALUs for each one of these numeric systems had different designs,
and that influenced the current preference for two's complement,
as this is the representation that makes it easier for the ALUs to
calculate additions and subtractions.
Simple Operations

Most ALU’s can perform the following operations:


 Integer arithmetic operations (addition, subtraction, multiplication
and division)
 Bitwise logic operations (AND, NOT, OR, XOR)
 Bit-shifting operations (shifting or rotating a word by a specified
number of bits to the left or right, with or without sign extension)
Complex Operations

 ALU can be designed to perform complex functions


 MAC(Multiply–accumulate operation)
the multiply–accumulate operation is a common step that computes the
product of two numbers and adds that product to an accumulator
 The MAC operation modifies an accumulator a:
 FMA
 FMAC
 VLIW operations
Let’s Build a 1-Bit ALU
This is an one-bit ALU which can do Logical AND and Logical OR
operation.

Result = a AND b when operation = 0


Result = a OR b when operation = 1

The operation line is the input of a MUX.


Building a 1-Bit ALU (cont’d)
Adding a full adder to our ALU
A 32-Bit ALU
By paralleling the one-bit ALUs and some other modification on
the logical circuits, we can create bigger ALUs.
THANK YOU!

Вам также может понравиться