The contract between software and hardware: which instructions exist, how they encode into bit fields, and the RISC-vs-CISC split.
An instruction set architecture (ISA) is the agreed *contract* between software and a processor: exactly which instructions exist, what registers and memory model the programmer sees, and how each instruction is encoded as bits. It is the line where software stops and hardware begins — a compiler emits instructions the ISA defines, and any chip that implements that ISA must run them. x86-64, ARM, and RISC-V are ISAs; different chips implement each one differently underneath.
Every instruction is a number, sliced into fields. An opcode field says *what* to do — add, load, jump — and operand fields say *what to act on*: register numbers, or a constant baked into the instruction. Decoding an instruction is literally pulling these slices apart.
A simple 16-bit ADD, fields packed left to right:
opcode | rd | rs | rt
0001 | 010 | 011 | 100 (ADD r2, r3, r4)
4 bits | 3 bits| 3 bits| 3 bits
opcode 0001 = ADD
rd = r2 (destination), rs = r3, rt = r4 (sources)Two design philosophies pull in opposite directions. RISC (Reduced Instruction Set Computer) keeps instructions few, simple, and fixed-width, and only special load/store instructions touch memory — everything else works register-to-register. CISC (Complex Instruction Set Computer) offers many powerful, variable-width instructions that can operate directly on memory, packing more work into each one.
ARM, MIPS, and RISC-V are RISC; x86 is the classic CISC.