Professional Documents
Culture Documents
Apu Carc 03 LMC
Apu Carc 03 LMC
SECTION A
Multiple Choice Questions
1. Which of the following keeps track of the location where the Little Man must look for the
next instruction in Little Man Computer?
a) Hand Counter
b) Calculator
c) Mail Box
d) Input-tray
4. The concept that instructions and data are indistinguishable, except in how they are
used, provides ____________.
a) for more program simplicity and is widely adopted
b) for more program complexity and is not widely adopted
c) for programmers to modify instructions and then execute them
d) for programmers to test program efficiency independent of the contents of the
data
5. In all cases, the first thing the Little Man does is ____________.
a) read the INBOX
b) increment the value in the calculator
c) fetch the value in the calculator
d) fetch the value in the location counter
6. The numbers used to hold the mailbox values in the LMC are what data type and range?
a) integer -999 to +999
b) whole numbers from 000 to 999
c) excess-500, ranges from 000 to 999
d) excess-100, ranges from -999 to 999
7. The numbers used in the mailbox addresses in the LMC are what data type and range?
a) integer -99 to +99
b) whole numbers from 00 to 99
c) excess-50, ranges from 00 to 99
d) excess-100, ranges from -99 to 99
17. The code to store the value in the calculator to the address 56 one uses LMC code _____
a) 456
b) 356
c) 956
d) 856
18. The code to load the value into the calculator from address 33 one uses LMC code _____
a) 433
b) 333
c) 533
d) 833
20. If the value 323, stored at address 89, is being executed, then I know ____________.
a) to STORE the value in the calculator into address 23
b) to STORE the value in the calculator into address 89
c) to STORE the value into the calculator
d) to BRANCH to address 23 and resume execution
21. What instruction code(s) replace (overwrite) the old value in the mailbox?
a) 1, 2, 3, and 5
b) 2, 3, and 5
c) 1,2, and 3
d) just 3
22. What instruction code(s) replace (overwrite) the old value in the calculator?
a) 1, 2, 3, and 5
b) 1, 2, and 5
c) 3 and 5
d) 1,2, and 3
26. Von Neumann defined the functional organization of the computer to be ____________.
a) made up of a control unit, instruction pointer, and instructions stored as data
b) made up of a arithmetic unit, memory, and instructions stored as data
c) made up of a control unit, arithmetic unit and memory
d) made up of a CPU and memory
28. If the value in the calculator is 46, and the instruction being executed is 877, the Little Man
a) jump to address 77 and continue to execute instructions
b) continue to next executable instruction
c) continue to next instruction regardless if it is an instruction or not
d) read the IN BOX
SECTION B
Exercises
29. Write LMC program to produce the sum of three input values.
30. Write a LMC program that able to calculate the perimeter of a rectangle, based on two
input values.
31. Write a LMC program, enter two input value and find out the largest among the two
input number.
32. Write a program to stop at 100, and restoring (Loop) the value each time after checking the
count. The output of the program is 2,4,6,8,10.98 (even numbers from to 100)
33. A complete Little Man Computer (LMC) program is shown below. Carefully trace
through the program find out the task performed by this program and provide suitable
working steps indicating clearly how you arrived at the solution.
00 LDA 09 509
01 OUT 902
02 ADD 10 110
03 STO 12 312
04 SUB 11 211
05 BRP 08 808
06 LDA 12 512
07 BR 01 601
08 HLT 000
09 DAT 02 002
10 DAT 02 002
11 DAT 100 100
34. List and explain five (5) guidelines of Von Neumann architecture.