CPU Flashcards

1
Q

explain which registers and buses are used, and the values they atore/carry, wehn line LDA redlight is executed (after it has been fetched and decoded). you should assume the address redlight refers to memory location 11.

A
  • The value 11 is stored in the MAR.
  • 11 is sent down the address bus.
  • A read signal is sent down the control bus.
  • 0 is sent (back from memory) down the data bus.
  • 0 is stored in the MDR…
  • … and then compied to the ACC
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Disscuse the differences between assembly code and high-level languages. You should refer too.

  • the Adv and Dis of writing programs.
  • when each approach might be used.
  • why the coffe machine was programmed in assembly code.
A

AO1:
Assembly code uses mnemonics to represent machine code instructions / opcodes.
High level languages use more natural/mathematical notation.
Assembly code consists of cimple instructuions as such many more lines of assembly code are required to preform the same task as a few lines of a highlevel language.
high level code is not architecture specific.

AO2:
Assembly code allows the programmer to choose the exact instruction so they can write code that is highly efficient .
It also allows them to have direct control of how memory is used via addressing modes.
Direct control of hardware.
High level language compilers have optimisers that can also try and do this (can possible outpreform human made code.)

High level code is easier to read and understand than assembly code.
High level code can be compiled for diferent architechtures.

AO3:

Assembly language is best suited to situations such as :

  • compilers or interpreters don’t exist for the target CPU ( embedded systems)
  • highest possible performance is critical
  • memory is very limited.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly