Microoperations III
Microoperations III
Microoperations III
Nada Sharaf
Arithmetic Operations
Arithmetic Circuit
Logic Operations
Shift Operations
Output = A + Y + Cin
S1 S0 Cin Y D Micro operation
0 0 0 B A+B Addition
0 0 1 B A+B+1 Addition with carry
0 1 0 B’ A+B’ Subtract with Borrow
0 1 1 B’ A+B’+1 Subtraction
1 0 0 0 A Transfer A
1 0 1 0 A+1 Increment A
1 1 0 1(1111) A-1 Decrement A
1 1 1 1(1111) A(A-1+1) Transfer A
Binary operations
For bits stored inside the registers
Bit-Wise: consider bits separately
Each bit is treated as a binary variable
Examples: ∧, ∨, ⊕
+ vs ∨
I ∨ represent the oring microoperation
I + is used as the arithmetic addition when used as a microoperation
I + is used as the or boolean function when used as part of the control
function
P : R1 ← R1 ⊕ R2
1010 Contents of R1
1100 Contents of R2
--------
0110 Contents of R1 after P=1
P + Q : R1 ← R2 + R3, R4 ← R5 ∨ R6
S1 S0 Output Operation
0 0 A∧B AND
0 1 A∨B OR
1 0 A⊕B XOR
1 1 A Complement
Given A: 11011001. What is the operand (B) and the microoperation that
converts A to
11000001 Use sli.do Code: 836692
I Selective Clear
I B: 00011000
I A ← A ∧ B0
Right Shift
Left Shift
R1 ← shl R1
R2 ← shr R2
The register must be the same on both sides
R ← ashr R
Example if R=1010 before shifting after shifting it is 1101
Chapter 4