Sub topic 1
What an Instruction Set Architecture Defines
An instruction set architecture (ISA) is the contract between software and a processor. It describes what a program can observe and command. It does not prescribe the processor's internal circuit design. Two processors can implement the same ISA with different pipelines, caches, or control units and still run the same machine code.
Prerequisites
This chapter assumes familiarity with binary and hexadecimal numbers, memory addresses, registers, and basic digital logic. You should know that a register is a small, fast storage location inside the processor.
The programmer-visible contract
An ISA defines the instructions available to programs. Each instruction has an operation, such as addition, comparison, load, store, or branch. It also defines the operands that an instruction may use and the result it produces.
The ISA specifies the processor's registers and their roles. General-purpose registers hold values used by many instructions. Special-purpose registers may hold the program counter, stack pointer, or status flags. The ISA also defines register width, such as 32 or 64 bits, because width affects the range of representable values and address calculations.
An ISA defines supported data representations and operations. These may include unsigned integers, signed integers, floating-point values, characters, and Boolean values. It specifies how arithmetic results are represented and what happens when a result cannot fit.
Memory behavior is another part of the contract. The ISA describes address size, load and store operations, alignment rules, and the ordering that software can observe. It also defines how the processor accesses memory-mapped devices when that feature is provided.
Control-flow instructions determine how execution changes direction. Conditional branches test a value or status flag. Calls and returns support procedures. An ISA also defines exceptions and interrupts, which are controlled transfers caused by events such as invalid instructions, arithmetic errors, or external devices.
| ISA component | Question it answers |
|---|---|
| Instructions | Which operations can software request? |
| Registers | Which fast storage locations can instructions access? |
| Data representation | How are values encoded and interpreted? |
| Memory model | How can instructions read and write memory? |
| Exceptions | How does execution respond to unusual events? |
ISA versus implementation
The ISA is an abstraction boundary. A compiler targets the ISA, while hardware designers choose an implementation. The implementation may divide instructions into internal steps, execute several instructions in parallel, or use a cache. These choices can change performance without changing the machine-code contract.
In GATE questions, first separate architectural facts from implementation details. A register count, instruction encoding, address size, or flag definition belongs to the ISA. Cache latency and pipeline depth usually belong to the implementation unless the question states otherwise.
Exercise
A processor has a 64-bit register but implements a 32-bit ISA. Which fact belongs to the ISA: the register's physical circuit size or the operations visible to machine code?
Show answer
The operations visible to machine code belong to the ISA. The physical register size is an implementation detail unless the ISA exposes it.