Preview

04 - Little Man Computer

 1. The Little Man Computer is a very simple yet powerful ….
This is a great introductory video to LMC - have a watch if you are able.

  model of the monitor of a computer

   model of a computer!

  model of a spacecraft of the future

  model of a printer

 2. Read the excerpt on LMC and fill in the blanks
LMC is a simulator which has many of the basic features of a 
modern computer that uses the __________________________ (a central 
processing unit consisting of an arithmetic logic unit and
registers, a control unit containing an instruction register 
and program counter, input and output mechanisms and RAM to 
store both data and instructions).

  None of the above

  spatial awareness meter

  Von Neumann architecture

  Cartal model of computers

 3. The LMC is based on the idea of a 'Little Man' acting like the control unit of a CPU, _________________ them as well as managing the input and output mechanisms.

  None of the above

  catching 1s and 0s as they pass through the computery ether and making

  fetching instructions from RAM, decoding and executing

  riding through metaphorical hills and valleys and enjoying

 4. The 100 memory addresses in the computer memory are numbered 0 to 99 and can each contain a________________ instruction or data.

  gentrified code

  C code

  machine code

  python code

 5. Each assembly language instruction is made up of a 3 letter mnemonic usually followed by the memory address of the data the CPU is to act on

  FALSE

  TRUE

 6. Pressing the Assemble Program button translates the assembly language instructions into 'machine code' and loads them into RAM …

  It also resets the Program Counter to 10

  None of the above

  It also resets the Program Counter to zero.

  It also resets the Program Counter to contain new instructions

 7. Look carefully at the following LMC program. What does it do?
INP
STA first
INP
ADD first
OUT
INP
SUB first
OUT
HLT
first DAT 0 INP
1 STA 9
2 INP
3 ADD 9
4 OUT
5 INP
6 SUB 9
7 OUT
8 HLT
9 DAT 0

  Input five numbers, add them all together, subtract 9 from the result and output the final total

  Input two numbers and add them together - output the result

  Input three numbers. Add the first two numbers and output the answer, then subtract the first number from the third and output the answer

  Input two numbers. Add the first two numbers and subtract the first from the second

 8. What does this LMC program do?
INP 
STA A 
INP 
STA B 
LDA A 
ADD B 
OUT 
HLT
A    DAT
b    DAT 
lmc_q1.gif

  takes in three numbers and stores them

  take in two numbers and stores them, displaying the first number

  None of the above

  adds two numbers and displays the sum

 9. This LMC program doesn't add or subtract. What does it do?
INP 
STA A 
INP 
STA B 
LDA A 
SUB B 
BRP isPositive
LDA B
OUT
HLT 
isPositive
LDA A 
HLT
A    DAT
B    DAT 

  finds out if an input number is positive or negative

  loads two letters 'A' and 'B' and determines which one comes first

  sorts three numbers from smallest to largest

  determines the bigger of two numbers by using loops

 10. The LMC can add or subtract numbers, but it can neither multiply nor divide. The multiplication can be carried out with the aid of ……..

  addition!

  nothing - this cannot be done!

  subtraction!

  stubborn and persistent hard coding