0% found this document useful (0 votes)
10 views

Lecture Note-7 S0KFRXJ

Uploaded by

Pari Gautam
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)
10 views

Lecture Note-7 S0KFRXJ

Uploaded by

Pari Gautam
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
You are on page 1/ 5

MODERNISATION OF HIGHER

EDUCATION
IN CENTRAL ASIA
THROUGH NEW TECHNOLOGIES
( HiEdTec )

Arithmetic logic unit (ALU)


Lecture note-7

An arithmetic logic unit (ALU) is a digital circuit used to perform arithmetic and
logic operations. It represents the fundamental building block of the central
processing unit (CPU) of a computer. Modern CPUs contain very powerful and
complex ALUs. In addition to ALUs, modern CPUs contain a control unit (CU).

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. All information in a computer is stored and manipulated in the form
of binary numbers, i.e. 0 and 1. Transistor switches are used to manipulate binary
numbers since there are only two possible states of a switch: open or closed. An open
transistor, through which there is no current, represents a 0. A closed transistor,
through which there is a current, represents a 1.
Operations can be accomplished by connecting multiple transistors. One transistor
can be used to control a second one - in effect, turning the transistor switch on or off
depending on the state of the second transistor. This is referred to as a gate because
the arrangement can be used to allow or stop a current. The simplest 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.

In computer science, ALUs serve as a combinational digital circuit that performs


arithmetic and bitwise operations on binary numbers. This is a foundational building
block of arithmetic logic circuits for numerous types of control units and computing
circuits including central processing units (CPUs), FPUs and graphics processing
units.

Long before modern PCs, ALUs first helped to support microprocessors


and transistors in the 1970s.

The following are a few examples of bitwise logical operations and basic arithmetic
operations supported by ALUs:

 Addition. Adds A and B with carry-in or carry-out sum at Y.


 Subtraction. Subtracts B from A or vice versa with the difference at Y and carry-
in or carry-out.
 Increment. Where A or B is increased by one and Y represents the new value.
 Decrement. Where A or B is decreased by one and Y represents the new value.
 AND. The bitwise logic AND of A and B is represented by Y.
 OR. The bitwise logic OR of A and B is represented by Y.
 Exclusive-OR. The bitwise logic XOR of A and B is represented by Y.

ALU shift functions cause A or B operands to shift, either right or left, with the new
operand represented by Y. Complex ALUs utilize barrel shifters to shift A or B
operands by any number of bits in a single operation.
MODERNISATION OF HIGHER
EDUCATION
IN CENTRAL ASIA
THROUGH NEW TECHNOLOGIES
( HiEdTec )

Arithmetic logic unit (ALU)


Lecture -7

Problem set #7
Choose correct answer

1. The ‘heart’ of the processor which performs many different operations


_____________
a) Arithmetic and logic unit
b) Motherboard
c) Control Unit
d) Memory
2. ALU is the place where the actual executions of instructions take place
during the processing operation.
a) True
b) False
3. Which of the following is not a bitwise operator?
a) |
b) ^
c) .
d) <<
4. The sign magnitude representation of -1 is __________
a) 0001
b) 1110
c) 1000
d) 1001
5. The ALU gives the output of the operations and the output is stored in the
________
a) Memory Devices
b) Registers
c) Flags
d) Output Unit
6. Number of bits in ALU is _________
a) 4
b) 8
c) 16
d) 2

You might also like