Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Little Man Computer: Instructions Execution, Architecture and Programs

STORE Instruction Execution

Questions:


1.( 4 points) Describe, step by step, what the Little Man does to execute a STORE instruction.


2. (4 points) Describe, step by step, what the Little Man does to execute an INPUT instruction.

3. (4 points) Describe, step by step, what the Little Man does to execute a SUBTRACT instruction.

4. (2 points) If a user wants to enter two numbers, what must the Little Man program do before the user enters the second number? Why?


5. (2 points) Why is the instruction cycle called a “cycle”?

6. (3 points) Even if he runs out of instructions to execute, the Little Man only stops trying to execute instructions under one condition. What is that condition? What happens if the Little Man runs out of instructions and that condition is not met?

7. (2 points) Explain carefully what the Little Man will do when he executes a BR instruction.

8. (2 points) The instruction cycle is divided into two phases. Name each phase. The first phase is the same for every instruction. What is the purpose of the first phase that makes this true? Explain what the Little Man does during the first phase.

9. (6 points) What are the criteria that define a von Neumann architecture? How does the example in this chapter in which we enter and add two numbers illustrate each of the criteria?

10. (3 points) Consider the example in this chapter in which we enter and add two numbers. Suppose we had stored the first input entry in mailbox location 00.
a. Would the program have produced the same result?
b. What would have happened if the program were executed a second time?
c. What characteristic of the computer makes this true?

11. (4 points) Suppose the Little Man Computer had been implemented as a 16-bit binary machine. Assume that the binary LMC provides the same instruction set, with the same opcodes (in binary, of course), and the same instruction format (op code followed by address).
a. How many bits would be required for the op code portion of the instruction?
b. How many mailboxes could the binary machine accommodate?
c. What is the range of 2’s complement data that this machine could handle?

12. (3 points) The original version of the Little Man Computer used op code 7 (i.e., instruction 700) for a COFFEE BREAK instruction instead of op code 0. What is the advantage of using 000 for the COB instruction instead of 700? (Hint: Consider what happens if the programmer forgets to put a COB instruction at the end of a program.)

13. (6 points) Show how you would implement a DO-WHILE statement using Little Man instructions.

14. (6 points) Show how you would implement an IF-ELSE statement using Little Man instructions.

15. (8 points) Write a Little Man program that accepts two numbers as input and outputs those numbers in reverse order.

16. (3 points) Write a Little Man program that accepts two numbers as input, subtracts the first from the second and outputs the result.

17. (12 points) Write a Little Man program that accepts three values as input and produces the largest of the three as output.

18. (12 points) Write a Little Man program to accept an indefinite number of input values. The output value will be the largest of the input values. You should use the input value 0 as a flag to indicate the end of input.

19. (12 points) Write a Little Man program that prints out the odd numbers from 1 to 99. No input is required. 

support
Whatsapp
callback
sales
sales chat
Whatsapp
callback
sales chat
close