Computer architecture
Instruction set architecture (ISA)
Also called: ISA · machine code · opcode · RISC · assembly
Definition
The ISA is the contract between software and hardware: the instructions, registers, data types and addressing modes a processor promises to support.
Picture it
Different chips can implement the same ISA in very different ways, fast or cheap, and still run the same machine code. Each instruction is a bit pattern divided into fields: an opcode saying what to do and fields naming registers or constants.
The maths
instruction width = opcode bits + operand field bits number of opcodes = 2^(opcode bits)
| Quantity | Unit | Symbol |
|---|---|---|
| information | bit | bit |
Worked example
A 16-bit instruction format has a 4-bit opcode and three register fields. How many opcodes are possible, and how many registers can each field name if all remaining bits are used equally?
- 2^4 = 16 opcodes
- 16 − 4 = 12 bits left, 4 bits per field
- 2^4 = 16 registers
Answer16 opcodes; 16 registers per field.
✓ The 2 numbers in this answer are recomputed from scratch by an automated test.
Common misconceptions
- Misconception: Assembly language is a readable spelling of machine code, not a different program.
- Misconception: RISC does not mean 'fewer capabilities'; it means simpler, regular instructions.