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.

  program set

  little man computer

  instruction set

  assembly set

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

  Jump or Misc

  Logic

  Arithmetic

  Data transfer

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

  Logic

  Data transfer

  Arithmetic

  Jump or Misc

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

  Logic

  Data transfer

  Jump or Misc

  Arithmetic

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

  TRUE

  FALSE

 7. Jump and Miscellaneous mnemonics include :

  NOP (Do nothing for a bit)

  JMP

  JZ (Jump if zero)

  All of the above are valid examples

 8. An 'Opcode' is short for

  obfuscated code

  only code

  opbinary code

  operation code

 9. An Opcode is:

   A single instruction that can be executed by the CPU.

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

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

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

 10. Operands are ….

  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

  hard coded into the instruction itself

  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 'fork' or 'napkin'

  might be 'chop' or 'mix'.

  might be 'mangoes' or 'salt'

  might be 'chef' or 'yum'

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

  with some buses attached to them

  with some data to be processed

  with ASCII and binary values

  None of the above

 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 register

  such as a bus

  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 50 into a register of the CPU

  stores the value 50 into the OPCODE or OPERAND

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

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

 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"

  "LOAD"

  "LOAD 004"

  LDA

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

  "LOAD"

  "LOAD 0004"

  LDA

  "0004"

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

  It is the value that is held at the address 0004

  "0004"

  "LOAD"

  "LOAD 0004"

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

  TRUE

  FALSE

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

  FALSE

  TRUE