Instruction Set Architecture: Basic Concepts

Instruction Set Architecture: Basic Concepts

An instruction set is the set of machine code instructions that the processor can carry out. CPU (Processor), the centerpiece of the computer’s architecture, is in charge of executing the instructions of the currently loaded program. Each processor has its own unique instruction set specifically designed to make the best use of the capabilities of that processor. These instruction set tells the processor to carry out various calculations, to read and write values from and into the memory, and to conditionally jump to execute other instructions in the program. Let's get to the basics of this architecture.

Earlier Article: Computing Technologies: Servers

What is an Instruction Set?

The instruction set, also called instruction set architecture (ISA), is part of a computer that pertains to programming, which is basically machine language. The instruction set provides commands to the processor, to tell it what it needs to do. The instruction set consists of addressing modes, instructions, native data types, registers, memory architecture, interrupt, and exception handling, and external I/O.

An example of an instruction set is the x86 instruction set, which is common to find on computers today. Different computer processors can use almost the same instruction set while still having very different internal design. Both the Intel Pentium and AMD Athlon processors use nearly the same x86 instruction set. An instruction set can be built into the hardware of the processor, or it can be emulated in software, using an interpreter. The hardware design is more efficient and faster for running programs than the emulated software version.

Fixed and Variable length Instructions

Instructions are translated to machine code. In some architecture, all machine code instructions are the same length i.e. fixed length. In other architectures, different instructions may be translated into variable lengths in machine code.

Variable length instructions are commonly used on CISC machines. The advantage of using variable length instructions is that each instruction can use exactly the amount of space it requires, so that variable length instructions reduce the amount of memory space required for a program.

On the other hand, it is possible to have fixed length instructions, where as the name suggests, each instruction has the same length. Fixed length instructions are commonly used with RISC processors. Since each instruction occupies the same amount of space, every instruction must be long enough to specify a memory operand, even if the instruction does not use one. Hence, memory space is wasted by this form of instruction.

The advantage of fixed length instructions is that they make the job of fetching and decoding instructions easier and more efficient, which means that they can be executed in less time than the corresponding variable length instructions.

In general, computer programs that execute very quickly tend to use larger amounts of storage, while programs to carry out the same tasks, that do not use so much storage, tend to take longer to execute.

Here are a few examples of basic instruction sets

ADD - Add two numbers together.

COMPARE - Compare numbers.

IN - Input information from a device, e.g., keyboard.

JUMP - Jump to designated RAM address.

JUMP IF - Conditional statement that jumps to a designated RAM address.

LOAD - Load information from RAM to the CPU.

OUT - Output information to device, e.g., monitor.

STORE - Store information to RAM


We shall discuss the Classification of Instruction Set Architecture, briefly analysing CISC and RISC in the next article, stay tuned for that.

And like always, if you have any queries, doubts or suggestions, please ask questions from the left panel of your screen.

Thank You