Documente Academic
Documente Profesional
Documente Cultură
COMPUTER ARCHITECTURE
Instructor:
\
Dr.M.yousuf
.
Supervisor:
DEDICATION:
ACKNOWLEDGEMENT
We all are very thankful to Almighty ALLAH for giving us courage for
making this report.
And we are also very thankful to our teacher Dr. Muhammad Yousaf for
giving us this project from which we explored the corporate sector.
GROUP MEMBERS
TABLE OF CONTENT
INTRODUCTION:
The ALU is a fundamental building block of the central processing unit of a computer.
The ALU is abbreviation for arithmetic-logic unit. The ALU is a combinational logic
device (which basically means it can be constructed from AND, OR, and NOT gates, and
is the implementation of a Boolean function).
PURPOSE:
PURPOSE
The purpose of the ALU is to perform computation on its data inputs, such as adding the
two sets of inputs, or subtracting, or performing bit wise operations. The control bits tell
the ALU which operation to perform.
Components of ALU:
ARITHMETIC UNIT:
• For addition we need an adder; there are two kinds of adders, half adder and
the full adder. A full adder is made up of two half adders. Half adder is used
to add two bits. But if we want to add more than two bits then we use full
adder.
Inputs Outputs
A B C (carry) S (sum)
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
A Half S
Adder
B C
Ø Circuit diagram:
Inputs Outputs
S(Switch) A B C S (sum)
(carry)
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
A S
Full
B C
Adder
S
MULTIPLEXER:
MULTIPLEXER:
A multiplexer or mux (occasionally the term muldex is also found, for a
combination multiplexer-demultiplexer) is a device that selects one of many data-sources
and outputs that source into a single channel.
A
M
U
D
X
B
SW
C(I/P)
A0
B0 F0
M F.A
U
X
A1
F1
F.A
B1
M
U
X
A2
B2 F2
M F.A
U
X
A3
F3
F.A
B3 M
U
X
Carry (o/p)
SW
Ø LOGIC UNIT:
The logic unit (LU) is a digital circuit that performs logic operations (like an
Exclusive or) between two numbers.
SW
A0
G0
MUX
B0
A1
G1
B1
MUX
A2
G2
B2
MUX
A3
G3
MUX
B3
COMPLETE ALU:
NOTE:
LOGIC GATES
Digital systems are said to be constructed by using logic gates. These gates are
the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic
operations are described below with the aid of truth tables.
Ø AND GATE
The AND gate is an electronic circuit that gives a high output (1) only if all its
inputs are high. A dot (.) is used to show the AND operation i.e. A.B. Bear in
mind that this dot is sometimes omitted i.e. AB
Ø OR GATE
The OR gate is an electronic circuit that gives a high output (1) if one or
more of its inputs are high. A plus (+) is used to show the OR operation.
Ø NOT GATE
The NOT gate is an electronic circuit that produces an inverted version of the
input at its output. It is also known as an inverter.If the input variable is A, the
inverted output is known as NOT .This is also shown as A', or A with a bar
over the top, as shown at the outputs. The diagrams below show two ways that
the NAND logic gate can be configured to produce a NOT gate.
Ø EXOR GATE
The 'Exclusive-OR' gate is a circuit which will give a high output if either, but
not both, of its two inputs are high. An encircled plus sign ( ) is used to show
the EOR operation.
OPERATION OF ALU: