ALU Final Report
ALU Final Report
Section
Group No.
Writers Roll
Writers Name
Group Members
B1
03
1205016
Rashid Abid Rafi
1205016
1205026
1205028
1205034
Date of Submission:
1205052
04 October 2016
Introduction:
An arithmetic and logic unit (ALU) is a multi-operation, combinational-logic digital
function. It can perform a set of basic arithmetic instructions and a set of logic
operations. The ALU has a number of selection lines to select a particular
operation in the unit.
The design of a typical ALU is carried out in three stages:
i)
ii)
iii)
Problem Specification:
Required Flags:
Carry
Sign
Overflow
Zero
Block Diagram:
cs2
Cout
cs1
cs0
Assigned Operations:
cin
cs2
cs1
cs0
Functions for
Group 3
Transfer A
Increment A
Subtract
OR
AND
Yi
cs2
1 bit Full Adder
Fi
cs1
cs0
i)
cs1
cs2
cs0
Xi
Yi
cin
Operations
Transfer
INC
SWB
Sub
ii)
cs1
cs2
cs0
Yi
0
Bi
Xi
Ai +Bi
Ai +Bi
iii)
Flag Register:
S= F4
Z= (F1+F2+F3+F4)
C= Cout
V= ?
Operations
OR
AND
A4 i A3 i A2 i A1 i
B4 0 B3 0 B2 0 B1 0
(+)
F4 d4 F3 d3 F2 d2 F1 d1
i = input dummy. i = 1 in case of arithmetic operations and i=0 in logical
operations.
d = output dummy.
So,
V= F4 d4, as d4 indicates there has been an input carry propagation to MSB.
IC Count:
1)
2)
3)
4)
5)
Discussion:
1) The whole design is implemented with two 4 bit full adders. This could have
been done with one 4 bit full adder if we stated overflow flag (V) in a
different manner.
If V was computed with only sign bits (as only same signs can produce
overflow), this could have been done with only 4 bit full adder.
2) In many cases, the ICs are defective and could produce erroneous result if
not tested properly.
3) The wires can be defective too.
4) The LEDs used to show the output might be defective and could operate on
floating voltage and lighten up erroneously.
5) IC counts were minimized to make the circuit design optimal in the sense of
circuitry and power consumption.
6) The whole circuit should be implemented very very carefully.
U8:A
1
3
2
74LS86
U1:A
1
3
2
74LS32
U1:B
4
U3
6
5
A4
10
8
3
1
74LS32
U1:C
A3
11
7
4
16
10
A2
74LS32
13
U1:D
12
A1
A1
A2
A3
A4
S1
S2
S3
S4
9
6
2
15
F4
B1
B2
B3
B4
C0
F3
?
C4
14
F2
74LS83
11
13
74LS32
F1
U2:A
1
U8:B
1
3
3
2
74LS86
B3
U2:B
4
B2
6
5
11
7
4
16
74LS86
7408
U2:C
U5:C
9
8
U6:B
U4
10
8
3
1
U5:B
6
13
10
A1
A2
A3
A4
S1
S2
S3
S4
9
6
2
15
U9:A
8
3
74LS32
14
CS1
U5:D
11
6
7408
U7:A
CS0
U6:C
1
3
6
2
7408
74LS04
U7:B
4
U6:D
13
6
5
12
7408
74LS04
U7:C
9
U6:E
11
8
10
10
7408
74LS04
U6:F
9
U7:D
8
12
11
74LS04
13
7408
74LS04
?
74LS32
13
74LS32
C4
U9:B
74LS86
12
10
7408
13
CS2
U6:A
12
11
U9:C
74LS04
74LS83
10
74LS86
B1
B2
B3
B4
C0
74LS86
U2:D
6
7408
B4
B1
U5:A