You are on page 1of 14

ARITHMETIC AND LOGIC

UNIT
RASHED OBAID
BRIXENDOR HERNANDEZ
BSIT 2
ARITHMETIC LOGIC UNIT

• An arithmetic logic unit (ALU) is a digital electronic circuit that performs


arithmetic and bitwise logical operations on integer binary numbers.
• This is in contrast to a floating-point unit (FPU), Which operates on
floating point numbers. It is a fundamental building block of many types
of computing circuits, including the central processing unit (CPU) of
computers, FPUs, and graphics processing units.
• A single CPU, FPU or GPU may contain multiple ALUs.
HISTORY
• Mathematician John von Neumann
 proposed the ALU concept in 1945
in a report on the foundations for a
new computer called the EDVAC
(Electronic Discrete Variable
Automatic Computer).
TYPICAL SCHEMATIC SYMBOL OF AN ALU

• A and B: the inputs to the ALU


• R: Output or Result
• F: Code or Instruction from the
Control Unit
• D: Output status; it indicates cases
CIRCUIT OPERATION

• An ALU is a combination logic circuit


• Its outputs will change asynchronously in response to input
changes
• The external circuitry connected to the ALU is responsible
for ensuring the stability of ALU input signals throughout the
operation.
ALU OPERATIONS

• 1. Fixed point operations


• 2. Floating point operations
FIXED POINT OPERATIONS
• Add

• Add with carry AND

• Subtract

• Multiply

• Subtract with Borrow

• Divide Unsigned Divide

• OR

• XOR

• NOT

• L- Shift

• R- Shift
BASIC COMPONENTS
• A transistor is a binary switch and the
fundamental building block of computer
circuitry. Like a light switch on the wall, the
transistor either prevents or allows current to
flow through.
FLOATING POINT OPERATIONS
• F add
• F sub
• F Mul
• F Div
FUNCTIONS

• 3 types of functions-
Arithmetic operations
Bitwise Logical Operations
Bit Shift operations
A 1-BIT ALU
• The logical operations are easiest, because they map directly onto the hardware
components.
• The 1-bit logical unit for AND and OR looks like figure below. The multiplexor on
the right then selects a AND b or a OR b, depending on whether the value of
Operation is 0 or 1. The line that controls the multiplexor is shown in color to
distinguish it from the lines containing data. In the figure below control and output
lines of the multiplexor were renamed to names that reflect the function of the ALU.
A 32-BIT ALU
• 32-bit ALU is created by connecting adjacent “black boxes”. Using xi to mean the each bit of x, blow
shows a 32-bit ALU. The adder created by directly linking the carries of 1-bit adders is called a ripple
carry adder.
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.
PRACTICAL OVERVIEW

• Most of a processor’s operations are performed by one or


more ALU. An ALU loads data from input registers,
executes, and stores the result into an output register. A
Control Unit tells the ALU what operation to perform on
the data. Other mechanisms move data between these
registers and memory.

You might also like