Tech, ExplainedSemiconductors and devices
Concept

Instruction set architecture (ISA)

The commands a processor understands.

HOW IT WORKSA programmer writes aprogram in a languagesuch as CA compiler translatesit into instructionsfrom one ISA onlyEach instruction is afixed pattern of onesand zerosAny chip with that ISAreads the patterns andcarries them outA chip with anotherISA needs theprogram compiledagain or translatedThe ISA is the agreement between chip and software, so programs built for one ISA stay with it.HOW IT WORKSA programmerwrites aprogram in alanguage suchas CA compilertranslatesit intoinstructionsfrom oneISA onlyEachinstructionis a fixedpatternof onesand zerosAny chipwith thatISA readsthe patternsand carriesthem outA chip withanotherISA needsthe programcompiledagainor translatedThe ISA is the agreement between chip and software, so programs built for one ISA stay with it.HOW IT WORKSA programmer writes a program in alanguage such as C↓A compiler translates it intoinstructions from one ISA only↓Each instruction is a fixed pattern ofones and zeros↓Any chip with that ISA reads the patternsand carries them out↓A chip with another ISA needs the programcompiled again or translatedThe ISA is the agreement between chip and software, soprograms built for one ISA stay with it.
A compiler turns a program into instructions from one ISA, a chip with that ISA reads and carries them out, and a chip with another ISA cannot run them until the program is compiled again or translated.
opens a page inside this one a page in the same scene a page in another scene a concept page a label only, with no page

An instruction set architecture (ISA) is the fixed list of basic commands that a processor understands, such as add two numbers, compare two numbers, or jump to another part of the program. A processor is the chip that computes. The ISA is also called the instruction set. It is the agreement between the chip and the software: the chip carries out every command on the list, and the software uses only those commands. There are three main ISAs today. x86 is used in most laptops and servers. Arm is used in nearly all phones, and in a growing share of laptops, servers and cars. RISC-V is an open ISA that anyone may use without paying for it.

Here is how it works in general. A programmer writes a program in a language such as C. A program called a compiler translates it into machine code: a long list of instructions taken only from one ISA. Each instruction is stored as a fixed pattern of ones and zeros, often 32 of them. The processor reads one instruction, carries it out and moves to the next, billions of times a second. So a program compiled for x86 is a list of x86 patterns, and an Arm chip cannot read those patterns. To run on an Arm chip, the program must be compiled again for Arm, or converted by translation software while it runs, which is slower. That is why programs do not cross between ISAs on their own.

This makes an ISA very hard to replace. Decades of programs, operating systems and tools are built for x86 and Arm. A new chip that uses the same ISA can run all of them on its first day. Owning an ISA is also a business. Arm does not sell chips. It charges chip companies for the right to use its ISA and its designs, as described in semiconductor IP licensing.

Take, for example, an app on an Android phone. Its machine code is built for Arm, because the system-on-chip in almost every phone uses Arm.

Consider a company that moves its web servers to cheaper Arm-based CPUs. Its programs must first be compiled again for Arm, and tested again.

Say a maker of air conditioners replaces the microcontroller in its indoor unit with a newer chip that uses a different ISA. The cooling software must be rebuilt with the new chip's compiler before the first unit is shipped.

How is an ISA different from a microarchitecture? The ISA is the list of commands. The microarchitecture is the actual circuit that carries them out: how many instructions it works on at once, how much fast memory it has on the chip, and how much power it uses. Two chips with the same ISA can run the same program at very different speeds. A company that sells a ready-made design for that circuit sells it through processor IP licensing.

Appears in

Semiconductors and devices
Tech, Explained is a part of ingrid.fyi. Every page explains one piece of technology in plain words.