Eceg3202 - Computer Architecture and Organization
Eceg3202 - Computer Architecture and Organization
Eceg3202 - Computer Architecture and Organization
and Organization
Topics
Introduction
Microoperations
Register Transfer Language
Register Transfer
Bus and Memory Transfer
Design of Microoperations
Arithmetic Logic Shift Unit
Numbering of bits
7 6 5 4 3 2 1 0
Individual bits of register R
15 87 0
PC(H) PC(L)
Two parts of 16 bit register
Symbol Description
Capital letter (followed by Computer register
numerals)
Arrow, Replacement operator, Transfer
from register to register
Parenthesis ( ) Part of a register
Comma , Separates two microoperations
load
shift
reset
clk
Dout
ECEg3202 Computer Architecture and
Organization 12
Rather than connecting wires between all
registers, a common bus is used.
A bus structure consists of a set of common lines,
one for each bit of a register.
Multiplexers are used to selectively connect one of
the register outputs to the shared bus.
The load control of the destination register is
activated to copy the data on the bus.
Selected
S0 S1
Register
0 0 A
0 1 B
1 0 C
1 1 D
Select
Design a 3-to-8 decoder
D7
D6
in2 D5
output
in1
in0 D0
Symbol Description
R3 R1 + R2 Contents R1 plus R2 put in R3
R3 R1 R2 Contents R1 minus R2 put in R3
R2 R2 1s complement whats in R2
R2 R2 + 1 2s complement whats in R2
R3 R1 + R2 + 1 R1 plus 2s complement of R2
R1 R1 + 1 Increment R1 by 1
R1 R1 1 Decrement R1 by 1
4 FA
Y
ECEg3202 Computer Architecture and
Organization 27
The four selections lead to different operations
Select In Output
S1 S0 Cin Y D = A + Y + Cin Microoperation
0 0 0 B D=A+B Add A and B
0 0 1 B D=A+B+1 Add A and B w/carry
0 1 0 B D = A + B Subtract w/borrow
0 1 1 B D = A + B + 1 Subtract B from A
1 0 0 0 D=A Transfer A
1 0 1 0 D=A+1 Increment A
1 1 0 1 D=A1 Decrement A
1 1 1 1 D=A Transfer A
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Clear (0)
(AB)
(A+B)
A + B
A + B
Set (1)
(AB)
AB
A+B
AB
AB
AB
A
B
A
Function
ECEg3202 Computer Architecture and
Organization 31
Hardware Implementation
Logic gates inserted for each bit or pair of bits in the registers to
perform needed logic function
Most computers use only four microoperations and derive the
rest
AND, OR, XOR, complement
Circular Shift
Original value: 11010011
Value after shift right: 11101001
Value after shift left: 10100111
Serial
Input IL
Bi
Ai
Ai-1
Ai+1
ECEg3202 Computer Architecture and
Organization 40
Arithmetic Logic Shift Unit function table
Operation Selectors
S3 S2 S1 S0 Cin Operation Function
0 0 0 0 0 FA Transfer A
0 0 0 0 1 FA+1 Increment A
0 0 0 1 0 FA+B Add A and B
0 0 0 1 1 FA+B+1 Add A and B with carry
0 0 1 0 0 F A + B' Subtract B from A with borrow
0 0 1 0 1 F A + B' + 1 Subtract B from A
0 0 1 1 0 FA-1 Decrement A
0 0 1 1 1 FA Transfer A
0 1 0 0 x FA AND A and b
0 1 0 1 x FAB OR A and B
0 1 1 0 x FAB XOR A and B
0 1 1 1 x FA Complement A
1 0 x x x F shr A Shift right A into F
1 1 x x x F shl A Shift left A into F