In This Article
What is Instruction Set Architecture (ISA)?
The ISA or Instruction Set architecture in computer science refers to the abstract model or architecture of the computer. It is a part of the computer with reference to programming and is somewhat like a machine code.
- The Instruction Set Architecture actually defines how the software controls the processor of the computer. Being a significant element of the abstract model of the system it specifies what the processor can do and how to the hardware and software of the computer.
- The ISA is the only way for a user to interact with the hardware of a computer. In this respect, it acts as the manual of the assembly language programmers because it is the only part of the machine that is visible to them, the application programmer and the compiler writer.
- The instruction sets contained in it are the addressing modes, registers, interrupt, memory architecture, instructions, external I/O, native data types, and exception handling.
- Instructions and other capabilities can be added to the ISA to extend it. It can also be done by adding support for larger data values and addresses.
Understanding Instruction Set Architecture (ISA)
The behavior of the machine code is defined by the ISA and the element of the computer that follows it is called implementation.
This may or may not depend on the characteristics of the particular implementation, for example, the CPU.
These implementations may differ in terms of different aspects such as:
- Physical size
- Performance levels
- Cost to name just a few.
However, all these implementations have the ability to follow the same machine code during operation.
The main objective of the architecture is to provide binary compatibility between these implementations that allows numerous implementations of it. This helps in different ways such as:
- Replacing a low cost and low performing machine with a high performing and costlier one without requiring replacing the software and
- Developing and in fruition of the microarchitectures of the different implementations that are following a particular ISA.
This ensures that the new machine can run the software that was running on the earlier generation of the implementations.
However, the machine code will run on those implementations of the ISA only when the operating system follows a specific standard and a compatible ABI or Application Binary Interface.
It is not guaranteed that the machine code will run as smoothly in one operating system as the other, especially if the ISA allows running several operating systems.
In simple terms, the ISA of a computer signifies different supported aspects of the model such as:
- The data types
- Addressing modes
- Hardware support to the management of the main memory of the system
- Memory consistency
- I/O model
- Virtual memory and other basic features.
It is possible to extend an ISA by adding additional capabilities or instructions and even with extra support for data values and larger addresses.
These extended ISAs will also be able to run machine codes of different versions even without the specific extensions.
However, when they use the extensions it is required by the implementations to support those particular extensions in order to run smoothly.
Typically, it is the binary compatibility provided by the ISAs that make them the most important and basic abstractions for computing.
Instructions build up the machine language and it particularly specifies:
- Constant or literal values and
- Addressing modes.
The simple instructions in a set may involve different operations such as:
- Data handling
- Memory management
- Setting a register
- Copying data from memory location to the register or vice versa
- Reading and writing data from and to hardware devices
- Arithmetic and logic operations
- Bitwise operations
- Comparing register values
- Controlling flow operations and
- Coprocessor operations.
It may also include some complex instructions such as:
- Taking instruction from other components or computers
- Controlling different functional units
- Moving several registers to or from the memory at once
- Transferring large blocks of memory
- Handling integer and floating point arithmetic
- Following SIMD of Single Instruction/Multiple Data instructions and
- Executing atomic instructions.
An ISA should not be confused with microarchitecture since it is a set of techniques for designing a particular processor for the purpose of implementing the instruction sets.
Processors can share a common instruction set even with diverse microarchitectures.
The ISA plays a significant role in helping the compiler understand the instructions and make the best use of them.
It also helps the developers to write more efficient and productive machine codes.
In addition to that, these instruction sets help them to estimate the output of the compiler so that it helps in the debugging process which will accelerate the performance and enhance the processing power.
In short, ISA helps the developers to write firmware and software according to the specifications.
How Does ISA Work?
An ISA is typically least concerned about the details specific to the implementation. It works mainly with the basic operations and the collection of it that the computer has to support. It tells the CPU about that with the help of several different instruction sets.
The instructions handled and conveyed by the ISA include Arithmetic or Logic operations, data transfer, from the memory to the registers of the processor and vice versa, and branch and jump instructions for implementation of conditional statements and functions.
The ISA also defines the maximum length of every instruction type and the formats of them which include R, I, and J instruction format.
Types of Instruction Set Architecture
Ideally, there are three basic types of ISAs namely stack, accumulator and General Purpose register or GPR, each of them having different characteristics, pros and cons.
Stack – This refers to the short instructions where the operands are on top of it implicitly. This is actually the simple model for reverse polish or expression evaluation.
However, it cannot be accessed at random which makes it quite difficult to generate more efficient codes. When it is accessed for every single operation, it creates a bottleneck itself.
Accumulator – This is also for short instructions and there is one operand in it implicitly. This however is only a temporary storage and therefore this type has the highest memory traffic.
General Purpose Register – In the GPR all of the operands are mentioned quite explicitly and these are either memory locations or registers. The GPR typically makes it very easy to generate codes and the registers allow storing data for a long period of time. However, all the operands stored here are to be named which makes the instructions longer.
Nowadays the CPUs are actually GPR processors but earlier processors were off the first two types.
The primary reason for the shift is that the registers are much faster in comparison to the memory and if more data can be stored in the CPU internally, the program will run faster.
Another reason behind this is that the registers are more convenient and easier to use by a compiler.
Instruction Set Architecture Examples
One of the most common examples of an ISA is the x86 instruction set. This is extensively found in most of the computers today.
However, when it comes to classifying an ISA, it can be done in a lot of different ways. One of the most common ways is on the basis of the complexity of the architecture.
A Complex Instruction Set Computer or CISC may have a few specialized instructions that may be hardly used in realistic programs.
On the other hand, a Reduced Instruction Set Computer or RISC has instructions that the processor follows more frequently and the lesser ones are used as subroutines.
This offsets the resulting extra execution time due to infrequent use.
A few other types of architectures are also there such as:
- The Very Long Instruction Word or VLIW architectures
- The Closely Related Long Instruction Word or LIW architectures and
- The Explicitly Parallel Instruction Computing or EPIC architectures.
There are also a few less complex architectures that have not been commercialized extensively as the others. These are:
- The Minimal Instruction Set Computer or MISC and
- The One Instruction Set Computer or OISC.
The more modern ISAs follow the x86 instruction architecture type and also exhibit both the CISC and RISC features such as the ARM or Advanced RISC Machine processors that are used extensively in the mobile devices and Microprocessor without Interlocked Pipeline Stages or MIPS processors that are used more commonly in the embedded systems such as video game consoles.
Where is Instruction Set Architecture?
Being a part of the processor, the ISA typically resides in the CPU and helps it to understand the process. It gives command to the processor and also tells what functions it has to perform.
It also acts as an interface between the hardware and software of the computer system.
ISA is a very important machine code that helps the computer system in its operations.
Different components of the device follow the instructions available in the three different types of ISAs that are usually found in the processor, as pointed out in this article.