BIT151 ยท 2082
Differentiate between RISC and CISC Architecture and Booth's Multiplication
Differentiate between RISC and CISC Architecture and Booth's Multiplication
RISC vs CISC Architecture and Booth's Multiplication Algorithm
Given
- Multiply 9 ร 7 using Booth's Algorithm
- Multiplicand $M = 9$
- Multiplier $Q = 7$
- Both positive, need signed 2's complement representation
Bit-width check: $9 = 1001_2$ (4 bits). To represent as signed positive, we need a leading 0, so minimum 5 bits: $9 = 01001$. Similarly $7 = 00111$. Use $n = 5$ bits.
Part 1: RISC vs CISC Architecture [4 Marks]
RISC (Reduced Instruction Set Computer) uses a small set of simple, fixed-length instructions, each executing in a single clock cycle.
CISC (Complex Instruction Set Computer) uses a large set of complex, variable-length instructions where one instruction may perform several low-level operations over multiple cycles.
| Feature | RISC | CISC |
|---|---|---|
| Instruction Set | Small, simple | Large, complex |
| Instruction Length | Fixed | Variable |
| Execution Time | Single clock cycle | Multiple clock cycles |
| Addressing Modes | Few | Many |
| Control Unit | Hardwired | Microprogrammed |
| Registers | Large number | Fewer |
| Memory Access | Load/Store only | Instructions can access memory directly |
| Examples | ARM, MIPS, SPARC | Intel x86, VAX |
Part 2: Booth's Multiplication -- 9 ร 7 [6 Marks]
Booth's Rules
| $Q_0$ | $Q_{-1}$ | Operation |
|---|---|---|
| 0 | 0 | Shift only |
| 1 | 1 | Shift only |
| 0 | 1 | $A = A + M$, then shift |
| 1 | 0 | $A = A - M$, then shift |
Setup
- $M = 01001$
- $-M = 10111$ (2's complement of $M$)
- $Q = 00111$
- $A = 00000$, $Q_{-1} = 0$, $n = 5$
Step-by-Step
Initial: $A=00000,\ Q=00111,\ Q_{-1}=0$
Cycle 1: $Q_0 Q_{-1} = 10 \Rightarrow A = A - M$ $$A = 00000 + 10111 = 10111$$ Before ASR: $A=10111,\ Q=00111,\ Q_{-1}=0$ After ASR: $A=11011,\ Q=10011,\ Q_{-1}=1$
Cycle 2: $Q_0 Q_{-1} = 11 \Rightarrow$ no op After ASR: $A=11101,\ Q=11001,\ Q_{-1}=1$
Cycle 3: $Q_0 Q_{-1} = 11 \Rightarrow$ no op After ASR: $A=11110,\ Q=11100,\ Q_{-1}=1$
Cycle 4: $Q_0 Q_{-1} = 01 \Rightarrow A = A + M$ $$A = 11110 + 01001 = 00111$$ Before ASR: $A=00111,\ Q=11100,\ Q_{-1}=1$ After ASR: $A=00011,\ Q=11110,\ Q_{-1}=0$
Cycle 5: $Q_0 Q_{-1} = 00 \Rightarrow$ no op After ASR: $A=00001,\ Q=11111,\ Q_{-1}=0$
Summary Table
| Cycle | A | Q | $Q_{-1}$ | $Q_0Q_{-1}$ | Operation |
|---|---|---|---|---|---|
| Init | 00000 | 00111 | 0 | -- | Initialize |
| 1 | 10111 | 00111 | 0 | 10 | A = A - M |
| ASR | 11011 | 10011 | 1 | Shift | |
| 2 | 11011 | 10011 | 1 | 11 | No op |
| ASR | 11101 | 11001 | 1 | Shift | |
| 3 | 11101 | 11001 | 1 | 11 | No op |
| ASR | 11110 | 11100 | 1 | Shift | |
| 4 | 00111 | 11100 | 1 | 01 | A = A + M |
| ASR | 00011 | 11110 | 0 | Shift | |
| 5 | 00011 | 11110 | 0 | 00 | No op |
| ASR | 00001 | 11111 | 0 | Shift |
Result
$$AQ = 00001,11111$$
Converting to decimal: $0000111111_2 = 63$
$$9 \times 7 = 63 \checkmark$$
Conclusion: Booth's algorithm correctly yields the product 63.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.