An instruction is a bit pattern with two jobs: say what to do (the opcode) and say where the operands are. A three-address instruction like ADD R1, R2, R3 is easy to read but long; a zero-address instruction works on an implicit stack and is short but needs more instructions. Worked example: in a 32-bit instruction with a 6-bit opcode and three 5-bit register fields, the bits left for an immediate value are 32 - 6 - 15 = 11 bits. That arithmetic — opcode plus operand fields must fit the word — is how exam questions test whether you understand formats. RISC and CISC are two philosophies about how many instructions a processor should have, and the trade-off between them shapes every modern CPU.
Premium Chapter
Instruction formats & RISC/CISC
Computer Science & Applications (Paper 2) (Code 87) · Unit 2 · ~14 min read · Original chapter
Free previewPremium full chapter
Free preview
Checking premium access…