OCR H446, section 1.1.2 (a)
A processor's instruction set is the list of machine code instructions that it can carry out. Designers have two main philosophies for how big and complicated that list should be.
CISC: complex instruction set computer
A CISC processor has a large set of instructions, including many powerful, complex ones. A single instruction can do a lot, such as load two values from memory, multiply them and store the result.
MULT A, B ; one complex instruction: A = A x B (memory to memory)
Characteristics:
- Many instructions (hundreds), of different lengths.
- Complex instructions that may take several clock cycles to complete.
- Fewer instructions are needed for a program, so the program is smaller in memory.
- Many different addressing modes.
- The hardware is more complicated, often using microcode to carry out the complex instructions.
- Few registers.
RISC: reduced instruction set computer
A RISC processor has a small set of simple instructions, each of which does one basic thing and is usually completed in one clock cycle.
LDR R1, A ; load A into a register
LDR R2, B ; load B into a register
MUL R1, R1, R2 ; multiply the registers
STR R1, A ; store the result
Characteristics:
- Few, simple instructions, all of the same length.
- Most execute in a single clock cycle.
- More instructions are needed for the same job, so programs are larger.
- Only the load and store instructions access memory. Everything else works on registers.
- Many general-purpose registers, to avoid slow memory access.
- The hardware is simpler, cheaper and uses less power.
- The regular, simple instructions suit pipelining (1.1.1 (d)) very well.
- The compiler does more of the work, as it must turn complex operations into sequences of simple ones.
Comparison
| CISC | RISC | |
|---|---|---|
| Number of instructions | Large | Small |
| Complexity of each instruction | High: does a lot | Low: does one simple thing |
| Instruction length | Varies | Fixed |
| Clock cycles per instruction | Several | Usually one |
| Instructions needed for a task | Fewer | More |
| Program size | Smaller | Larger |
| Registers | Fewer | More |
| Memory access | Many instructions can | Only load and store |
| Hardware | More complex, more transistors | Simpler |
| Power use and heat | Higher | Lower |
| Pipelining | Harder (varying lengths and times) | Easier |
| Compiler | Simpler | More work to translate efficiently |
Where each is used
| Type | Typical uses |
|---|---|
| CISC | Desktop PCs and laptops, using the x86 family of processors (Intel and AMD), and servers. Compatibility with decades of existing software is important |
| RISC | Smartphones and tablets, using ARM processors. Also embedded systems, games consoles, and increasingly laptops and servers. Low power use and long battery life are important |
The two have moved closer together. Modern CISC processors break complex instructions into simple internal steps (micro-operations), and RISC processors have grown more instructions.
Worked example
Task: a company is choosing a processor for a battery-powered smart watch. Which type is better, and why?
A RISC processor (such as an ARM design). It uses less power and produces less heat, which gives longer battery life. Its simpler hardware is cheaper and smaller, which suits a small device. The extra program size is not a big problem for a watch's simple, fixed programs.
For a desktop PC that needs to run large amounts of existing Windows software, a CISC (x86) processor is more suitable because the software was written for that instruction set.
Exam tip: compare the two on number and complexity of instructions, cycles per instruction, program size, registers and power and cost. Link each type to a typical use, and say why.
Check yourself
What does RISC stand for, and what is its main idea?
Reduced instruction set computer. It uses a small set of simple instructions, most of which take one clock cycle.
Why are RISC processors well suited to pipelining?
Their instructions are simple, all the same length, and take about the same time, so they pass through the pipeline stages smoothly.
Give one advantage of CISC over RISC
A task needs fewer instructions, so programs are smaller, and one instruction can do a lot of work. (Also, existing software written for it keeps working.)
Which type is typically used in smartphones, and why?
RISC (such as ARM), because it uses less power and produces less heat, which gives longer battery life.