1 / 32
Arithmetic Logic Unit (ALU) By : Khawar Nehal 18 June 2020 - - PowerPoint PPT Presentation
Arithmetic Logic Unit (ALU) By : Khawar Nehal 18 June 2020 - - PowerPoint PPT Presentation
Arithmetic Logic Unit (ALU) By : Khawar Nehal 18 June 2020 Updated 21 June 2020 1 / 32 Arithmetic Logic Unit (ALU) An arithmetic-logic unit (ALU) is the part of a computer processor (CPU) that carries out arithmetic and logic operations on
SLIDE 1
SLIDE 2
2 / 32
Arithmetic Logic Unit (ALU)
An arithmetic-logic unit (ALU) is the part of a computer processor (CPU) that carries out arithmetic and logic operations on the operands in computer instruction words. In some processors, the ALU is divided into two units, an arithmetic unit (AU) and a logic unit (LU).
SLIDE 3
3 / 32
Arithmetic Logic Unit (ALU)
Some processors contain more than one AU - for example, one for fjxed-point operations and another for fmoating-point operations. (In personal computers fmoating point operations are sometimes done by a fmoating point unit on a separate chip called a numeric coprocessor.)
SLIDE 4
4 / 32
Co processor examples
SLIDE 5
5 / 32
Co processor details
30 year old story of autocad, BOQ, Autolisp, co processors and co processor emulators available for those interested.
SLIDE 6
6 / 32
Co processor word in the 2020s
EnsembleSeries™ GSC6204 - Powerful GPU co-processor
6U OpenVPX GPU NVIDIA Quadro Co-Processor
SLIDE 7
7 / 32
Co processor future
Those interested in the future of high performance computers and super computing can discuss research papers in this fjeld.
SLIDE 8
8 / 32
Arithmetic Logic Unit (ALU)
T ypically, 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 fmow 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
- peration code (sometimes called an "op code"), one
- r more operands, and sometimes a format code.
SLIDE 9
9 / 32
Arithmetic Logic Unit (ALU)
The operation code tells the ALU what operation to perform and the operands are used in the
- peration. (For example, two operands might be
added together or compared logically.) The format may be combined with the op code and tells, for example, whether this is a fjxed- point or a fmoating-point instruction.
SLIDE 10
10 / 32
Fixed point and fmoating point
https://www.tutorialspoint.com/fjxed-point-and-fm
- ating-point-number-representations
There are two major approaches to store real numbers (i.e., numbers with fractional component) in modern computing. These are (i) Fixed Point Notation and (ii) Floating Point
- Notation. In fjxed point notation, there are a
fjxed number of digits after the decimal point, whereas fmoating point number allows for a varying number of digits after the decimal point.
SLIDE 11
11 / 32
Fixed-Point Representation:
This representation has fjxed number of bits for integer part and for fractional part. For example, if given fjxed-point representation is IIII.FFFF, then you can store minimum value is 0000.0001 and maximum value is 9999.9999. There are three parts of a fjxed-point number representation: the sign fjeld, integer fjeld, and fractional fjeld.
SLIDE 12
12 / 32
Fixed-Point Representation:
SLIDE 13
13 / 32
One’s complement
SLIDE 14
14 / 32
Two’s complement
SLIDE 15
15 / 32
Fixed-Point Representation:
0.50000000 = 4/8 = ½ + 0.12500000 = 1/8
- = 0.62500000 = 5/8
101011 in binary = 43 in base 10
SLIDE 16
16 / 32
Fixed-Point Representation:
SLIDE 17
17 / 32
Fixed-Point Representation:
SLIDE 18
18 / 32
Arithmetic Logic Unit (ALU)
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 in a permanent place that is sometimes called the machine status word.)
SLIDE 19
19 / 32
Arithmetic Logic Unit (ALU)
In general, the ALU includes storage places for input operands, operands that are being added, the accumulated result (stored in an accumulator), and shifted results. The fmow of bits and the operations performed
- n them in the subunits of the ALU is controlled
by gated circuits.
SLIDE 20
20 / 32
Arithmetic Logic Unit (ALU)
The gates in these circuits are controlled by a sequence logic unit that uses a particular algorithm
- r sequence for each operation code.
In the arithmetic unit, multiplication and division are done by a series of adding or subtracting and shifting
- perations.
There are several ways to represent negative
- numbers. In the logic unit, one of 16 possible logic
- perations can be performed - such as comparing
two operands and identifying where bits don't match.
SLIDE 21
21 / 32
16 common operations
https://en.wikipedia.org/wiki/74181 For details. This example is for the 74181 chip.
SLIDE 22
22 / 32
16 common operations
SLIDE 23
23 / 32
Active low
Active LOW is a term used in the fjeld of digital electronics to describe the required logic state
- f an integrated circuit (IC) pin that will enable
its internal function. Usually, the physical pin provides access to a function within the IC, and changing its state to LOW activates this function.
SLIDE 24
24 / 32
Active low and high
Active low and high reasons are not discussed as of now. There are advantages and disadvantages to both methods.
SLIDE 25
25 / 32
Arithmetic Logic Unit (ALU)
The design of the ALU is obviously a critical part
- f the processor and new approaches to
speeding up instruction handling are continually being developed.
SLIDE 26
26 / 32
Logic Gates
The ALU is made with logic gates. They are presented in the next slide. We shall not go into how to make these gates using transistors or other methods. That is a topic for electronics courses and digital computer logic. If you need to get those explained, then it can be provided as extra. But it shall not be tested in this course.
SLIDE 27
27 / 32
SLIDE 28
28 / 32
Multiplexers and Decoders
Multiplexers and decoders are used in ALU design to convert from binary to separate parallel wires and the reverse process.
SLIDE 29
29 / 32
SLIDE 30
30 / 32
SLIDE 31
31 / 32
SLIDE 32
32 / 32