When designing Central Processing Units (CPUs), there are two primary architectural approaches that guide how instructions are processed and how the processor is designed: RISC (Reduced Instruction Set Computing) and CISC (Complex Instruction Set Computing). Both approaches have different philosophies regarding the instruction set, performance, and complexity of processors.
Simple Instructions: RISC processors are designed to execute a small set of instructions. These instructions typically take a fixed amount of time to execute (often one clock cycle).
Large Number of Registers: RISC systems tend to have more general-purpose registers. This reduces the need to use slower memory operations, as many operations can be performed directly in registers.
Load/Store Architecture: In RISC, operations on memory are separated from operations on registers. This means that only load (to read from memory) and store (to write to memory) instructions can access memory, while arithmetic and logical operations can only occur between registers.
Fixed-Length Instructions: Most RISC architectures use fixed-length instructions, meaning that every instruction is the same size. This simplifies instruction decoding, speeding up the processor.
Few Addressing Modes: RISC has fewer and simpler ways to specify where operands for instructions are located (e.g., registers or memory), making instruction decoding simpler and faster.
Pipelining: RISC architectures are designed to support pipelining, where multiple instruction stages (fetch, decode, execute, etc.) can be processed simultaneously. This allows for greater throughput and faster execution.
Complex Instructions: CISC processors have a wide variety of instructions that can perform multi-step operations with a single instruction. Some CISC instructions perform several tasks, like loading data from memory, performing an operation on it, and storing it back, all in one step.
Smaller Number of Registers: Since CISC processors can perform more work in a single instruction, they often have fewer general-purpose registers than RISC processors. More operations can be handled in memory.
Variable-Length Instructions: CISC instructions can vary in length, meaning some instructions are very short, while others are quite long, depending on the complexity of the operation. This can lead to more efficient use of memory but makes instruction decoding more complex.
Memory-to-Memory Operations: CISC allows instructions to operate directly on memory without having to load data into registers first. This is different from the RISC load/store architecture, where data must first be loaded into registers before being operated on.
Multiple Addressing Modes: CISC processors support a wide variety of addressing modes, allowing more flexibility in how memory operands are accessed. This helps in performing more complex operations directly with memory.
Microcode: CISC processors often use microcode to implement complex instructions. Microcode is a layer of low-level control instructions that help manage how high-level instructions are executed in hardware.
| Feature | RISC (Reduced Instruction Set Computing) | CISC (Complex Instruction Set Computing) |
|---|---|---|
| Instruction Set | Small, simple, fixed-length instructions | Large, complex, variable-length instructions |
| Execution Time | Typically one clock cycle per instruction | Instructions may take multiple clock cycles |
| Memory Access | Load/store architecture (only load/store instructions access memory) | Memory-to-memory operations are allowed |
| Registers | More general-purpose registers | Fewer general-purpose registers |
| Instruction Complexity | Simple, one operation per instruction | Complex, multiple operations per instruction |
| Pipelining | Easier to pipeline due to uniform instruction format | Difficult to pipeline due to variable instruction length |
| Code Size | Larger programs due to more instructions per task | Smaller programs due to fewer instructions per task |
| Program Speed | Faster execution for simpler programs, optimized for pipelining | Slower due to more complex instruction execution |
| Hardware Complexity | Simpler hardware design, optimized for performance | More complex hardware design to support varied instructions |
| Example Architectures | ARM, MIPS, SPARC | x86, VAX, Motorola 68k |
Both architectures have their strengths and weaknesses, and many modern processors (like Intel's x86-64 and ARM processors) combine elements of both RISC and CISC to try to get the best of both worlds, depending on the application needs.
Open this section to load past papers