What an ISA specifies

An instruction set architecture (ISA) is the contract between software and processor hardware. It defines the instructions and their bit encodings, the registers visible to programs, the data types and addressing modes, how memory accesses are ordered, the privilege levels, and how interrupts and exceptions behave. The state the ISA defines is called architectural state; machine code can observe it and rely on it. An assembler translates assembly mnemonics almost one-to-one into these encodings, which is why each ISA has its own assembly language.

ISA versus microarchitecture

The microarchitecture is how a particular processor implements the ISA: pipeline depth, cache sizes, branch predictors, the number of instructions issued per cycle. One ISA can be implemented by tiny low-power cores and large out-of-order cores that run the same machine code at very different speeds. In the performance equation, execution time = instruction count × cycles per instruction (CPI) × cycle time, the ISA and compiler mainly set the instruction count, the microarchitecture the CPI, and circuits and process technology the cycle time. Spectre-type attacks exploit the boundary: misspeculated architectural state is rolled back, but cache contents are not.

Design choices that shape hardware

ISA details have lasting hardware consequences. RISC-V base instructions are a fixed 32 bits (16-bit forms only with the compressed C extension), so instruction boundaries are obvious, while x86 instructions range from 1 to 15 bytes and must be partly decoded to find where the next one starts, making wide decoders complex. x86 branches test flags set by an earlier compare or arithmetic instruction; RISC-V compares two registers within the branch, leaving no implicit flag state to track. The MIPS branch delay slot showed the risk of encoding one pipeline's quirks into an ISA that outlives it.

Modular and open ISAs

RISC-V is an open ISA whose specification anyone may implement without license fees. It combines a small base integer set (RV32I or RV64I, about 40 to 50 instructions) with optional extensions: M for multiply and divide, A for atomics, F and D for floating point, C for compressed instructions, V for vectors, plus custom instructions. Leaving out an extension saves area but costs speed: without M, the compiler turns a C multiplication into a call to a library routine that multiplies with shifts and adds. Arm and x86 are proprietary and licensed or implemented by their owners.

Try it: questions about Instruction set architecture (ISA)

Which statement is correct about two CPUs that implement the same instruction set architecture (ISA)?

  1. AThey are built with the same circuits, so their performance and power are the same
  2. BEven if their internal circuits differ, they can run the same machine-code program
  3. CThey must be made in the same fab using the same process
Show answer and explanation

Answer: B. Even if their internal circuits differ, they can run the same machine-code program

An ISA is the contract between software and hardware that defines the kinds of instructions, their bit layout, the number of registers and so on. The internal organization, such as the number of pipeline stages, the cache sizes and the branch predictor, is called the microarchitecture and is chosen separately from the ISA. So one ISA can have both small low-power cores and large high-performance cores that differ in speed and power yet run the same machine code. The fab and process have nothing to do with the ISA.

Which statement about instruction length in the RISC-V base ISA and in x86 is correct?

  1. ABoth use a fixed 32-bit length
  2. BRISC-V is variable-length and x86 is a fixed 32 bits
  3. CRISC-V base instructions are a fixed 32 bits; x86 instructions vary from 1 to 15 bytes
Show answer and explanation

Answer: C. RISC-V base instructions are a fixed 32 bits; x86 instructions vary from 1 to 15 bytes

All RISC-V base instructions are 32 bits, so instruction boundaries are obvious (the compressed C extension mixes in 16-bit instructions). x86 ranges from 1-byte instructions up to 15 bytes including prefixes and immediates, and the start of the next instruction is unknown until the current one is decoded. As a result, decoding several x86 instructions at once requires complex circuitry.

FAQ

What is the difference between an ISA and a microarchitecture?

The ISA is the specification software sees: instructions, registers and behavior. The microarchitecture is a specific hardware design that implements that specification, so two processors with different microarchitectures can run the same programs if they share an ISA.

Are x86, Arm and RISC-V instruction set architectures?

Yes. They are three different ISAs, so machine code compiled for one cannot run directly on another, even though each is implemented by many different processor designs.

What is the difference between an ISA and an ABI?

The ISA defines what the processor executes, while the ABI is a software convention on top of it covering calling conventions, data type sizes and system calls. One ISA can have several ABIs, for example for different operating systems.

Questions that mention Instruction set architecture (ISA) (9)

Instruction set architecture (ISA) appears in 11 practice questions across 4 topics, including ISA & Assembly, CPUs and architecture, Performance Analysis.

  1. What do names like ARM, x86 and RISC-V mainly refer to?
  2. Which is a characteristic of RISC-V?
  3. What is the relationship between assembly language and machine code?
  4. What instructions does the RISC-V M extension add to the base integer instruction set?
  5. When C's "a * b" (multiplying two ints) is compiled for an RV32I CPU without the M extension, what generally happens?
  6. What is true of the branch delay slot found in early ISAs such as MIPS (the rule that the one instruction right after a branch always executes, taken or not)?
  7. Which correctly describes an ABI (application binary interface)?
  8. Which is the basic formula for a program's CPU execution time?
  9. Why does information still leak in attacks like Spectre even though speculatively executed instructions are rolled back?

Books on CPUs and architecture Ad

As an Amazon Associate I earn from qualifying purchases.

Comparisons that include this term

This page was drafted with AI and fact-checked by a separate AI review before publication. Our Editorial policy explains how we write and check content. If you spot an error, please tell us on our Contact page.

Back to the glossary