Device - Instruction Set - Device Language

1 - About

An instruction set is the basic set of instructions (command) that a microprocessor understands and can execute.

Instruction set is a set of instruction that represents the vocabulary of a programmable device such as:

Same as Language - Machine

The instruction set is part of the computer architecture known as the Instruction Set Architecture (ISA).

The word set refers to the set of predefined opcodes that are valid in each instruction. Each opcode is a member of the “instruction set”.

See x86 instruction set

There is no grammar that defines what is a valid sequence of machine instructions. The CPU reads the instruction bytes, and if it is a valid machine instruction, it will be executed. Otherwise, typically an “invalid instruction” hardware exception will be generated.

The instruction set serves as the boundary between:

  • software
  • and hardware.

The instruction set provides commands to the device.

An instruction set specifies a device’s functionality

  • what operations it supports
  • what storage mechanisms it has & how they are accessed
  • how the programmer/compiler communicates programs

Different computer processors can use almost the same instruction set while still having very different internal design.

An instruction set can be:

  • built into the hardware of the processor,
  • or emulated in software, using an interpreter.

The more instructions (e.g. more features) a CPU has, the more circuits are required to implement it.

3 - Example

An example of an instruction set is the x86 instruction set. See X86_instruction_listings

Instruction Description
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.

4 - Documentation / Reference

computer/device/instruction_set.txt · Last modified: 2018/12/16 12:24 by gerardnico