Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Includes 'real teacher' use videos.

Join 30000+ teachers and students using TTIO.

Instruction Set

An instruction set is a group of commands for a CPU in machine language. The term can refer to all possible instructions for a CPU or a subset of instructions to enhance its performance in certain situations.

Opcode

The opcode tells the processor the job that needs to be done. A simple operation might be 'add' or 'subtract'. If we use the analogy of a recipe, the opcode might be 'chop' or 'mix'. Each opcode instruction is very limited in what it can tell the processor to do. A CPU's instruction set contains the opcodes that it will accept.

There are two types of opcode:

  • an opcode that tells the circuitry which operation to carry out
  • an opcode along with some data to be processed

Operand

The operand specifies the data that needs to be acted on. The operand can also refer to a place in memory, such as a register.

If we use the analogy of a recipe, an ingredient (eg an onion) is the thing being acted upon by the opcode. So the opcode 'chop' could act on the operand 'onion'. If the operand refers to a place in memory, this could be seen as the 'chopping board'. The operand (data) 'onion' could be in the memory location 'chopping board'. The instruction could be to chop the onion on the chopping board.

Additional Reading

https://en.wikipedia.org/wiki/Opcode#:~:text=In%20computing%2C%20an%20opcode%20(abbreviated,the%20operation%20to%20be%20performed.

www.teachyourselfpython.com