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 a spacecraft of the future

  model of a printer

  model of the monitor of a computer

   model of a computer!

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

  Cartal model of computers

  spatial awareness meter

  Von Neumann architecture

  None of the above

 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.

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

  None of the above

  riding through metaphorical hills and valleys and enjoying

  fetching instructions from RAM, decoding and executing

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

  python code

  C code

  gentrified code

  machine 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

  TRUE

  FALSE

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

  None of the above

  It also resets the Program Counter to zero.

  It also resets the Program Counter to contain new instructions

  It also resets the Program Counter to 10

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

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

 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

  None of the above

  takes in three numbers and stores them

  adds two numbers and displays the sum

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

 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 

  determines the bigger of two numbers by using loops

  sorts three numbers from smallest to largest

  finds out if an input number is positive or negative

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

 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 ……..

  nothing - this cannot be done!

  subtraction!

  addition!

  stubborn and persistent hard coding