Preview

01 - Machine code and assembly language operations

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

  problem

  modal

  binary

  assembly

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

  modal code

  sequential code

  CPU code

  object code

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

  control unit

  instruction register

  cache

  RAM

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

  Python

  Octal

  Hexadecimal

  Colal

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

  cycles

  mneumonics

  cache words

  pneumonials

 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:

  B8 MOV AX 01 01 01

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

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

  11 1001 10101

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

  searchable

  portable

  executable

  runnable

 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.

  labels

  ASCII codes

  LOAD commands

  hexadecimal nibbles

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

  more meaningful than hex or binary values

  less meaningful than binary or hex values

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

  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

  opcode / label

  operand / register value

  operand / opcode

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

  TRUE

  FALSE

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

  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

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

 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

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

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

  loads 34 into the accumulator and deletes it from storage

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