In this article, I will first explain What is Instruction. After that, we will have a look at What is Instruction set and everything else about it. In the previous article about Computer Architecture, we explained the Instruction Set Architecture(or ISA).
What is Instruction?
An instruction is a command or small program to computer for performing a particular or multiple tasks. These instructions are a set of commands in machine language that a particular processor understands and executes these commands to perform the intended task. A computer or machine performs these tasks on the basis of provided commands and intructions.
An instruction is made up of groups called fields. These groups or fields comprises of:
- The Operation code (Opcode): It is the field that specifies the intended operation or task.
- The Address field: It contains the memory location of the operand, i.e., a register or memory location.
- The Mode field: The location of the operand is determined by the Mode field.
What is Instruction Set?
The instruction set is a component of a computer that is used to program, which is essentially machine language. The instruction set gives the processor orders to accomplish what it needs to perform. Addressing modes, instructions, native data types, registers, memory architecture, interrupt and exception management, and external I/O are all part of the instruction set.
Examples of Instruction Set
- ADD – It is used to add two numbers together.
- COMPARE – It is used to compare numbers.
- IN – It is used to Input information from a device, e.g., keyboard.
- JUMP – It is used to Jump to a designated RAM address.
- JUMP IF – It is used to Conditional statement that jumps to a designated RAM address.
- LOAD – It is used to Load information from RAM to the CPU.
- OUT – It is used to output information to the device, e.g., monitor.
- STORE – It is used to Store information to RAM.