Preview

01 - Machine code and assembly language operations

 1. Low level languages are machine orientated while High level languages are said to be ______________ orientated.

  modal

  assembly

  binary

  problem

 2. Every CPU has to have its processing instructions in machine code (an alternative term for machine code is ____________)

  sequential code

  modal code

  object code

  CPU code

 3. Machine code is loaded into the ______________ of the CPU before being executed (e.g. Fetch Decode Execute cycle)

  cache

  control unit

  RAM

  instruction register

 4. __________ is popular short hand for Binary (each number is still ultimately a string of 1s and 0s)

  Python

  Colal

  Octal

  Hexadecimal

 5. Early chip designers knew that writing in raw 'machine code' was too complex, so more people-friendly ____________came into being.

  cycles

  mneumonics

  pneumonials

  cache words

 6. Providing more user-friendly commands means that instead of a coder having to remember that B8 will load 1 into a register AX, they can write the command:

  11 1001 10101

  MOV AX, 0001 (which loads 1 into the AX register)

  B8 MOV AX 01 01 01

  move 001 into the ax regsister (write in plain english)

 7. Low level langauges are not _________ and usually specific to a particular CPU.

  searchable

  runnable

  executable

  portable

 8. High level languages have a one to one correspondence with the architecture's machine code instructions.

  FALSE

  TRUE

 9. Low level languages typically use _____ for addresses.

  hexadecimal nibbles

  LOAD commands

  labels

  ASCII codes

 10. Mneumonics are used in assembly language because they are ____________________.

  more complicated (from a programmer's point of view) than machine code

  more meaningful than hex or binary values

  less meaningful than binary or hex values

  more complicated than high level language code

 11. For the following instruction, 'ADD' is the instruction name (___________) and 45 is the data or address (the _____________).
ADD #45

  opcode / operand

  operand / register value

  opcode / label

  operand / opcode

 12. In assembly language, generally speaking, when you see a # it is referring to an address rather than a number.

  FALSE

  TRUE

 13. Select the description that best explains what this assembly language instruction does.
LDA #12

  Loads and then adds the number 12 to itself (giving an output of 24)

  loads a data value into the address 12 of the accumulator

  Adds the value '12' to the value held in the accumulator

  loads the number 12 into the accumulator

 14. Select the description that best explains what this assembly language instruction does.
JNZ 6

  if the accumuator <> 0 then goto line 6

  if the accumulator's value is equal to 6, then jump to the end of the program

  if the accumulator is not empty then load it with the value 6

  None of the listed options are correct

 15. Select the description that best explains what this assembly language instruction does.
STO 34

  stores 3 and 4 (seperately) in registers and then loads the result into the accumulator

  adds 34 to whatever is in the accumulator and stores the result in the last register

  saves the accumulator result (whatever it is) to the memory address 34

  loads 34 into the accumulator and deletes it from storage