Nepedia
Back to Discover
Advanced Reader
💻

Instruction set architecture

technology Maturity 7-9 Next article →

An instruction set architecture, or ISA, is an abstract model that defines the interface between software and hardware. It acts as a fundamental bridge for a computer's central processing unit, known as the CPU. The ISA determines how software interacts with the physical hardware components. It defines specific instructions, data types, and registers used by the processor. It also manages the programming interface for main memory. This includes addressing modes, virtual memory, and memory consistency mechanisms.

Mips32 addi
Mips32 addi

The ISA also defines the input/output model for the programmable interface.

The mechanism of an ISA relies on providing a set of rules for machine code. When a CPU interprets instructions described by an ISA, it is called an implementation. The ISA specifies the behavior of machine code without depending on the physical characteristics of the specific implementation. This provides binary compatibility between different devices. Because of this, a user can replace a low-performance, low-cost machine with a high-performance one. The software will still run because the machine code remains compatible. This allows microarchitectures to evolve over time while maintaining support for older software.

There are several ways to classify different types of ISAs. A common method is by architectural complexity. A Complex Instruction Set Computer, or CISC, uses many specialized instructions. Some of these instructions may only be used rarely in practical programs. In contrast, a Reduced Instruction Set Computer, or RISC, simplifies the processor. It efficiently implements only the instructions used frequently in programs. Less common operations are handled as subroutines. Other types include Very Long Instruction Word (VLIW) architectures. These seek to exploit instruction-level parallelism using less hardware. Even simpler types like Minimal Instruction Set Computers (MISC) have been studied.

Instructions are the discrete statements that build machine language. A single instruction might specify an opcode, which is the operation to be performed. It may also include explicit operands, such as registers or constant values. It can also specify addressing modes to access memory. Common operations include data handling, such as loading or storing data. This involves copying data between a register and a memory location. Arithmetic and logic operations allow the CPU to add, subtract, or multiply values. Control flow operations allow the program to branch to different locations.

Mips32 addi
Mips32 addi

These instructions can be conditional, meaning they only happen if a certain condition is met.

Some processors include complex instructions to perform large tasks quickly. A single complex instruction might perform an operation that takes many simple instructions elsewhere. For example, these can move large blocks of memory or perform complicated math. This includes functions like square roots or trigonometry, such as sine and cosine. Some architectures use Single Instruction, Multiple Data, or SIMD instructions. These allow a processor to perform the same arithmetic operation on many values at once. This is very helpful for processing sound, images, and video. SIMD implementations include trade names like MMX, 3DNow!, and AltiVec.

Instruction encoding determines how these commands are formatted. On traditional architectures, an instruction includes an opcode and operand specifiers. These specifiers might point to registers, memory locations, or literal data. In VLIW architectures, multiple opcodes and operands are specified in one single instruction. Some exotic architectures, like transport triggered architectures (TTA), do not use an opcode field. Other systems, called stack machines, use a "0-operand" instruction set. These machines use a stack to perform arithmetic operations. They use postfix notation, also known as reverse Polish notation, to handle expressions.

History shows how important the distinction between architecture and design is. The concept of an architecture separate from a specific machine was developed by Fred Brooks. He worked at IBM during the design phase of the System/360. This distinction allows different companies to create different hardware that runs the same software. For example, Intel Pentium and AMD Athlon use the x86 instruction set. They have radically different internal designs, or microarchitectures. However, because they share the same ISA, they can run the same machine code.

Mips32 addi
Mips32 addi

This separation is one of the most fundamental abstractions in all of computing.

674 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Mips32 addi.svg
Mips32 addi.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.