No history yet

Instruction Set Architectures

The Language of Processors

At its core, a CPU understands a specific set of commands, much like a person understands a language. This set of commands is called the Instruction Set Architecture, or ISA. It’s the fundamental contract between the hardware (the processor) and the software (the programs you run). Every program, no matter how complex, must eventually be translated into these simple instructions that the CPU can execute.

The ISA dictates what the hardware can do, and the software must work within those rules. It defines everything from the basic operations like addition and subtraction to how the processor accesses memory.

Think of two chefs. One has a set of highly specialised kitchen gadgets: an apple-corer, an egg-slicer, a banana-peeler. The other has only a few simple, versatile tools: a sharp knife, a cutting board, and a bowl. Both can prepare a fruit salad, but their methods will be very different.

This is the core difference between the two dominant philosophies in processor design: CISC and RISC.

Two Philosophies

CISC, or Complex Instruction Set Computer, is like the chef with all the specialised gadgets. The goal is to make each instruction as powerful as possible. A single command might tell the CPU to load a value from memory, perform a calculation with it, and store the result back in a different memory location. This moves complexity from the software developer to the hardware engineers. Early processors, like the ones in desktop PCs, followed this path. The popular architecture used in most laptops and desktops is a classic example of CISC.

RISC, or Reduced Instruction Set Computer, takes the opposite approach. It's the chef with the simple knife. RISC processors have a small, highly optimised set of instructions. Each instruction does one simple thing, like loading a value from memory into a temporary storage spot called a register, adding two values that are already in registers, or storing a value from a register back into memory. To do something complex, you combine many of these simple instructions.

The RISC idea was to drastically reduce the number of instructions, which would simplify the internal design of the CPU.

This simplicity makes the processor easier to design, more power-efficient, and often faster at executing its simple commands. The architecture, which powers virtually every smartphone, is the most successful example of RISC design.

How Instructions Work

Every instruction has two main parts: the opcode and the operands. The (operation code) tells the CPU what to do. It’s the verb, like ADD, LOAD, or STORE. The operands are the nouns—they specify what data to use for the operation, such as a memory address or a register number.

This distinction leads to a key architectural difference. CISC processors often use a register-memory architecture, allowing operations to directly manipulate data in memory. RISC processors exclusively use a load-store architecture. This means data must first be loaded from memory into a register before it can be worked on. When the calculation is done, the result must be explicitly stored back into memory.

The load-store approach simplifies the processor's design, as it only needs to know how to perform calculations on data held in its internal registers, which are extremely fast.

Compilers and Trade-offs

The choice of ISA has a huge impact on the compiler, the software that translates human-readable code (like C++ or Python) into machine instructions. For a CISC processor, the compiler has a rich vocabulary of complex instructions. It might be able to translate a single line of high-level code into just one machine instruction.

For a RISC processor, the compiler has to do more work. It breaks down complex operations into a sequence of simple RISC instructions. This makes the compiler's job harder, but it also gives it more opportunity to optimise the code, for instance by rearranging instructions to avoid delays and keep the processor's pipeline full and running efficiently.

FeatureCISC (e.g., Intel x86)RISC (e.g., ARM, RISC-V)
Instruction SetLarge, complex, variable-lengthSmall, simple, fixed-length
Design GoalEase of programming (for humans)Simplicity for hardware, speed
Memory AccessRegister-memory (ops on memory)Load-store (ops on registers)
Clock CyclesMultiple cycles per instructionOne cycle per instruction (ideal)
Power UsageGenerally higherGenerally lower
Dominant MarketDesktops, ServersSmartphones, Embedded Systems

The battle between these two philosophies continues. While your phone likely runs on a RISC chip for its power efficiency, your laptop probably uses a CISC chip for performance and compatibility. Both approaches are constantly evolving, borrowing ideas from each other to meet the ever-increasing demands for speed and efficiency.

Quiz Questions 1/6

What does ISA stand for in the context of computer architecture?

Quiz Questions 2/6

Using the analogy from the text, a CISC (Complex Instruction Set Computer) processor is like a chef who has...