Preview

01 - Machine code and assembly language operations

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

  binary

  assembly

  problem

  modal

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

  CPU code

  object code

  modal code

  sequential 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)

  Colal

  Hexadecimal

  Octal

  Python

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

  cache words

  cycles

  mneumonics

  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:

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

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

  B8 MOV AX 01 01 01

  11 1001 10101

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

  executable

  runnable

  portable

  searchable

 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.

  ASCII codes

  LOAD commands

  labels

  hexadecimal nibbles

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

  more complicated than high level language code

  more meaningful than hex or binary values

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

  less meaningful than binary or hex values

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

  operand / register value

  operand / opcode

  opcode / operand

  opcode / label

 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 a data value into the address 12 of the accumulator

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

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

  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 is not empty then load it with the value 6

  None of the listed options are correct

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

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

  loads 34 into the accumulator and deletes it from storage

  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