Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Microoperations
1
contents
• Register Transfer
• Arithmetic Microoperations
• Logic Microoperations
• Shift Microoperations
Next steps:
– Define symbols for various types of microoperations,
• Arithmetic Microoperations
• Logic Microoperations
• Shift Microoperations
R1 7 6 5 4 3 2 1 0
15 0
PC
Numbering of bits
15 87 0
Upper byte PC(H) PC(L) Lower byte
• We are assuming that the circuits are available from the outputs of
the source register to the inputs of the destination register, and that
the destination register has a parallel load capability
cpe 252: Computer Organization 11
• Conditional transfer occurs only under a control condition
If (p=1) then (R2 ← R1)
P: R2 ← R1
R1
t t+1
Timing diagram
Clock
Synchronized
Load
with the clock
Transfer occurs here
• A bus: set of common lines, one for each bit of a register, through
which binary information is transferred one at a time
Bus lines
D3 D2 D1 D0 C3 C2 C1 C0 B3 B2 B1 B0 A3 A2 A1 A0
D3 C3 B3 A3 D2 C2 B2 A2 D1 C1 B1 A1 D0 C0 B0 A0
3 2 1 0 3 2 1 0 3 2 1 0
3 2 1 0 S0
S0 S0 S0
MUX3 MUX2 MUX1 MUX0 S1
S1 S1 S1
Control input C
Three-State Buffer
cpe 252: Computer Organization 18
C=1
Buffer
A B A B
C=0
Open Circuit
A B A B
B0
C0
• Read: DR ← M[AR]
• Write: M[AR] ← DR
RAM
R1 R1
100 66
• Addition Microoperation:
R3 ←R1+R2
• Subtraction Microoperation:
R3 ←R1+R2+1
x s = x’y’cn-1+x’yc’n-1+xy’c’n-1+xycn-1
y = x y cn-1 = (x y) cn-1
S
cn-1
cn
cpe 252: Computer Organization 26
Binary Adder
B3 A3 B2 A2 B1 A1 B0 A0
C3 C2 C1
FA FA FA FA C0
C4 S3 S2 S1 S0
C3 C2 C1 C0
FA FA FA FA
C4 S3 S2 S1 S0
4-bit adder-subtractor
C3 1, if overflow
V=
C4 0, if no overflow
A3 A2 A1 A0 1
x y x y x y x y
HA HA HA HA
C S C S C S C S
C4 S3 S2 S1 S0
• Gate:
• Gate:
• Gate:
• Gate:
• Symbols: and
• Gate:
• Symbols: and
• Gate:
1 0 E=AB AND
1 Ei
1 1 E=A Complem
ent
Shift Left
**Note that the bit ri is the bit at position (i) of the register
? rn-1 r3 r2 r1 r0 0
rn-1 r3 r2 r1 r0
rn-1 r3 r2 r1 r0
?
? rn-1 r3 r2 r1 r0 0
Sign
Arithmetic Shift Left
Bit
Vs = Rn-1 Rn-2
Rn-1 1 overflow
Vs=
Rn-2 0 no overflow
Select
H3 H2 H1 H0
One stage of Di
arithmetic
circuit (Fig.A)
Select
One stage of Fi
ALU Ci+1 0 4×1
1 MUX
One stage of Ei 2
logic circuit
Bi (Fig.B) 3
Ai
shr
Ai+1
shl
Ai-1