Preview

04 - Instruction Set, Opcode and Operands

 1. Operations are made up of opcodes and operands. The opcode performs an action on an operand.

  TRUE

  FALSE

 2. Read the following excerpt and fill in the blanks
Assembly language consists of a set of mnemonics that can be used to 
program a CPU. There are a number of mnemonics 
that together make up the complete ___________________ of the CPU. 
They can be grouped according to the kind of processing they cover.

  little man computer

  instruction set

  program set

  assembly set

 3. For example, in the Intel 80186 instruction set the following are __________ mnemonics.
 ADD, SUB, DIV, MUL

  Jump or Misc

  Data transfer

  Logic

  Arithmetic

 4. AND, OR, XOR, NOT are __________ mnemonics.

  Logic

  Arithmetic

  Jump or Misc

  Data transfer

 5. MOV, POP, IN, OUT are ______mnemonics.

  Jump or Misc

  Logic

  Arithmetic

  Data transfer

 6. One of the skills in writing assembly code is to become familiar with the instruction set of the target CPU.

  FALSE

  TRUE

 7. Jump and Miscellaneous mnemonics include :

  JZ (Jump if zero)

  NOP (Do nothing for a bit)

  JMP

  All of the above are valid examples

 8. An 'Opcode' is short for

  operation code

  obfuscated code

  only code

  opbinary code

 9. An Opcode is:

  In the example MOV AL, 12h, the opcode is the MOV instruction

   In machine language it is a binary or hexadecimal value such as 'A6' loaded into the instruction register.

  All of the above are valid examples/explanations of an OPCODE

   A single instruction that can be executed by the CPU.

 10. Operands are ….

  hard coded into the instruction itself

  manipulated by the OPCODE (e.g. in MOV AL, 12h, the register AL and value 12h are operands)

  part of the make up of the CPU registers

  contained inside the Opcode itself in ASCII format

 11. 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 'chef' or 'yum'

  might be 'mangoes' or 'salt'

  might be 'fork' or 'napkin'

  might be 'chop' or 'mix'.

 12. There are two types of opcode: an opcode that tells the circuitry which operation to carry out and an opcode along …

  None of the above

  with some data to be processed

  with some buses attached to them

  with ASCII and binary values

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

  such as a bus

  such as a register

  such as a printer spool

  such as a hard disk

 14. Assembly language is a low-level language which closely reflects how opcodes and operands work. Fill in the blanks in the below sentence
An example of a mnemonic assembly language 
instruction is LDA 50 which _______________

  stores the value of any given register into the CPUs 50th register

  stores the value entered into the LDA register (and in position 50)

  stores the value 50 into the OPCODE or OPERAND

  stores the value 50 into a register of the CPU

 15. Mnemonics are much more difficult for humans to remember and understand than binary machine code instructions.

  TRUE

  FALSE

 16. In the following example, what is the opcode?
Assembly	Mnemonic	Binary	       Hex
====================================================
LOAD 0004	LDA 0004	1010 0100	A4

  "004"

  LDA

  "LOAD 004"

  "LOAD"

 17. In the following example, what is the memory address?
Assembly	Mnemonic	Binary	       Hex
====================================================
LOAD 0004	LDA 0004	1010 0100	A5

  LDA

  "LOAD"

  "LOAD 0004"

  "0004"

 18. In the following example, what is the data value?
Assembly	Mnemonic	Binary	       Hex
====================================================
LOAD 0004	LDA 0004	1010 0100	A6

  "LOAD"

  "LOAD 0004"

  It is the value that is held at the address 0004

  "0004"

 19. A machine instruction is several bytes in main memory that tells the processor to perform one machine operation.

  FALSE

  TRUE

 20. Millions of instructions per second can execute per second on a modern processor

  FALSE

  TRUE