Instruction Set
Different computer processors have their own different ways of expressing instructions. An instruction set describes the commands which can be executed by a specific processor.
Types of Instructions
Data Transfer: LOAD, STORE
Arithmetic: ADD, SUBTRACT
Comparison (Rational): Compares two values
Logical: NOT, OR, ANT, XOR
Branch: Conditional & Unconditional
Shift Operations: Left or Right
Machine Code
Instructions are combinations of binary 0s and 1s, this is known as machine code: It's the only language the computer can understand. The number of bits used for a single instruction depends on the word length used by the processor.
Instruction Component
A typical instruction is composed of two parts:
Operation Code (opcode): The actual command such as ADD, SUBTRACT. Also the addressing mode, which species whether the operand holds actual data or memory address of where data is held, or registers.
Operand: One or more items of data that are to be used by the instruction (Which can be values, memory addresses or registers).
Addressing Modes
Immediate Addressing — This is when data is specified as a actual value in the operand. Often the digits 00 is used to specify immediate addressing.
Direct Addressing — This species that the value in the operand is an address to a memory location where the actual data is stored. Often the digits 01 are used to specify direct addressing.
High & Low Level Languages
Machine code uses pure binary instructions. Assembly Language uses mnemonic such as ADD, SUB for the instructions. This makes is a bit easier for programs to code. However, both of these are low level languages, so they are much harder overall than coding in high level languages.
Last updated