Early computers added more and more instructions, some of them close to a small program in themselves. In the 1980s designers asked whether a smaller set of simple instructions, executed very fast, might be better. The answer gave the RISC design.
Characteristics of RISC
A reduced instruction set computer (RISC) uses a small set of simple instructions. Its main features are: a relatively small number of instructions, few addressing modes, memory access only by LOAD and STORE, all other operations in registers, a fixed instruction length, hardwired control and, as far as possible, one instruction per clock cycle. A RISC processor has a large number of registers, and in some designs overlapped register windows reduce the cost of procedure calls. Overlapped windows work as follows. The registers are divided into windows, one for each procedure, and adjacent windows share some registers. The caller places the parameters in the shared registers, so the called procedure finds them at once, without copying data to memory. This saves many memory accesses on every procedure call.
Definition: RISC. A computer design that uses a small set of simple, fixed-length instructions, executes most in one clock cycle, and accesses memory only through load and store instructions.
Complex Instruction Set Computer
A complex instruction set computer (CISC) has a large set of instructions, many addressing modes, instructions of variable length and microprogrammed control. One instruction can do a lot of work, so programs are short, but the instruction takes several clock cycles.
RISC versus CISC
Table 3.9 compares them. A RISC program has more instructions, but each is simple and fast, and this suits pipelining, which is described in Unit IV. A CISC program needs less memory for the instructions.
Table 3.9: Comparison of RISC and CISC
| Feature | RISC | CISC |
|---|---|---|
| Number of instructions | Small | Large |
| Instruction length | Fixed | Variable |
| Addressing modes | Few | Many |
| Memory access | Only by load and store | Many instructions |
| Control unit | Hardwired | Microprogrammed |
| Clock cycles per instruction | Usually one | Several |
| Registers | Many | Few |
| Pipelining | Easy | Difficult |
Example 3.10: Counting cycles for an addition
Problem: To add two memory values and store the result, a CISC machine uses one instruction that takes 6 cycles. A RISC machine uses LOAD, LOAD, ADD and STORE, each taking one cycle. Compare the number of instructions and cycles.
Solution:
- CISC: 1 instruction and 6 cycles.
- RISC: 4 instructions and 4 cycles.
- The RISC program is longer by 3 instructions but needs 2 fewer cycles.
Result: The RISC version takes 4 cycles against 6, though its code is longer.
Common mistakes
- Saying that RISC has more instructions than CISC.
- Believing that RISC allows memory operands in every instruction.
- Assuming that CISC programs always run slower than RISC programs.
Key takeaways
- RISC: few simple fixed-length instructions, load and store memory access, hardwired control.
- CISC: many complex instructions, variable length, microprogrammed control.
- RISC programs are longer but run in fewer cycles per instruction.
- RISC suits pipelining.
Practice questions
- What does RISC stand for?
- Which instructions access memory in a RISC machine?
- State one advantage of CISC.
Answers to the practice questions
- Reduced Instruction Set Computer.
- Only LOAD and STORE.
- Programs are shorter because each instruction does more work.
Sources
- Official BCA syllabus Computer Architecture, course code 25BCA401DS02, Unit III
