Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Stevens Institute Of Technology CS 550 Chapter 6 The Little Man Computer Consider this model of the LMC and answer the questions below

Stevens Institute Of Technology CS 550 Chapter 6 The Little Man Computer Consider this model of the LMC and answer the questions below

Computer Science

Stevens Institute Of Technology

CS 550

Chapter 6 The Little Man Computer

Consider this model of the LMC and answer the questions below.

 

1)The LOAD instruction copies data from the

 

    1. in basket to a mailbox.

 

    1. calculator to a mailbox.

 

    1. in basket to the calculator.

 

    1. mailbox to the calculator.

 

  1. The STORE instruction copies data from the

 

    1. in basket to a mailbox.

 

    1. mailbox to the calculator.
 
   
 

 

 

  1. calculator to a mailbox.

 

  1. in basket to the calculator.

 

 

  1. The ADD instruction adds data from

 

    1. the in basket to a mailbox.

 

    1. a mailbox to the calculator.

 

    1. a mailbox to the in basket.

 

    1. one mailbox to another mailbox.

 

 

  1. The SUBTRACT instruction subtracts data in

 

    1. the calculator from a mailbox.

 

    1. the in basket from a mailbox.

 

    1. a mailbox from the calculator.

 

    1. one mailbox from another mailbox.

 

 

  1. The INPUT instruction takes data from the

 

    1. in basket and places it in a mailbox.

 

    1. mailbox and places it in the in basket.

 

    1. mailbox and places it in the calculator.

 

    1. in basket and places it in the calculator.

 

 

  1. The OUTPUT instruction takes data from the

 

    1. out basket and places it in a mailbox.

 

    1. mailbox and places it in the out basket.

 

    1. out basket and places it in the calculator.

 

    1. calculator and places it in the out basket.

 

 

  1. The COFFEE BREAK (HALT) instruction

 

    1. pauses the program.

 

    1. clears all mailboxes.

 

    1. empties the out basket.

 

    1. ignores the address portion of the instruction.

 

 

  1. A LOAD command will leave the original data in the mailbox

 

    1. deleted.

 

    1. corrupted.

 

    1. unchanged.

 

    1. overwritten.

 

 

  1. A LOAD command will leave the original data in the calculator

 

    1. deleted.

 

    1. corrupted.

 

    1. unchanged.

 

    1. overwritten.

 

 

  1. A STORE command will leave the original data in the mailbox

 

  1. deleted.

 

  1. corrupted.

 

  1. unchanged.

 

  1. overwritten.

 

 

  1. A STORE command will leave the original data in the calculator

 

  1. deleted.

 

  1. corrupted.

 

  1. unchanged.

 

  1. overwritten.

 

 

  1. An ADD command will leave the original data in the mailbox

 

  1. deleted.

 

  1. corrupted.

 

  1. unchanged.

 

  1. overwritten.

 

 

  1. An INPUT command will leave the original data in the calculator

 

  1. deleted.

 

  1. corrupted.

 

  1. unchanged.

 

  1. overwritten.

 

 

  1. An OUTPUT command will leave the original data in the calculator

 

  1. deleted.

 

  1. corrupted.

 

  1. unchanged.

 

  1. overwritten.

 

 

  1. Which sequence of commands is needed to enter two numbers into the LMC (using the INPUT command)?

 

  1. INPUT, ADD, INPUT

 

  1. INPUT, LOAD, INPUT

 

  1. INPUT, STORE, INPUT

 

  1. INPUT, ENTER, INPUT

 

 

  1. The BRANCH UNCONDITIONALLY instruction changes the value in the

 

  1. mailbox.

 

  1. calculator.

 

  1. out basket.

 

  1. program counter (also called instruction location counter).

 

 

  1. The BRANCH ON ZERO instruction "jumps" if the value in the

 

  1. mailbox is zero.

 

  1. in basket is zero.

 

  1. calculator is zero.

 

a) instruction location counter is zero.

 

 

  1. The BRANCH ON POSITIVE instruction "jumps" if the value in the

 

  1. mailbox is positive.

 

  1. in basket is positive.

 

  1. calculator is positive.

 

  1. instruction location counter is positive.

 

 

  1. The instruction cycle can be broken into these two parts

 

  1. fetch and decode.

 

  1. fetch and execute.

 

  1. decode and execute.

 

  1. execute and increment.

 

 

  1. The LMC knows which mailbox contains the next task by looking at the

 

  1. calculator.

 

  1. in basket.

 

  1. current mailbox.

 

  1. program counter (instruction location counter).

 

 

 

  1. What is the value in the calculator after the first instruction (505) is completed?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. 6

 

 

  1. What is the value in the program counter (instruction location counter) after the first instruction (505) is completed?

 

  1. 01

 

  1. 02

 

  1. 03

 

  1. 04

 

 

  1. What is the value in the calculator after the fetch but before the execute portion of second instruction (106)?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. 6

 

 

  1. What is the value in the calculator after the second (106) instruction is completed?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. 4

 

 

  1. What is the value in the calculator after the third instruction (507) is completed?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. 6

 

 

  1. What is the value in the calculator when the program is finished, i.e., when the halt instruction has been executed?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. 6

 

 

  1. What is the value in the calculator after the first instruction (602) is completed?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. unknown

 

 

  1. What is the value in the program counter (instruction location counter) after the first instruction (602) is completed?

 

  1. 01

 

  1. 02

 

  1. 03

 

  1. 06

 

 

  1. What is the value in the calculator after the instruction 507 is completed?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. 6

 

 

  1. What instruction is never executed? a) 602

b) 106

 

c) 507

 

d) 902

 

 

  1. What data (DAT) value is never used?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. 6

 

 

  1. What is the value in the program counter (instruction location counter) when the program is finished?

 

  1. 03

 

  1. 04

 

  1. 05

 

  1. 06

 

 

  1. What is the value in the calculator when the program is finished?

 

  1. 1

 

  1. 2

 

  1. 3

 

  1. 6

 

 

  1. In the von Neumann architecture, memory holds
  1. data only.
  2. instructions only.
  3. data and instructions.
  4. neither data and instructions.

 

  1. In the von Neumann architecture, memory is addressed
  1. by location number.
  2. by the value stored.
  3. by contents of the memory location.
  4. None of the above.

 

 

Discussion Questions

 

 

 

    1. Using the LMC program below, add comments to explain what the result (value in the calculator) is after the completion of each instruction. The first one is completed as an example.

 

 

Mailbox Contents Result after completion

 

00

901

Read contents from in basket and store in calculator

01

319

 

02

901

 

03

320

 

04

219

 

05

709

 

06

518

 

07

902

 

08

000

 

09

517

 

10

902

 

11

000

 

17

DAT

 

18

DAT

 

19

DAT

 

20

DAT

 

 

 

 

 

    1. Refer to the LMC program in question (1). Suppose the contents of mailbox 17 = 5; contents of mailbox 18 = 1.

 

 

 

      1. What is the final value in out basket if the first in basket is 56 and second in basket is 89?

 

      1. What is the final value in out basket if the first in basket is 75 and second in basket is 75?

 

      1. What is the final value in out basket if the first in basket is 89 and second in basket is 56?

 

 

 

 

 

    1. Describe what the LMC program in question (1) does. Suppose the contents of mailbox 17 = 5; contents of mailbox 18 = 1.

 

 

 

    1. Refer to the LMC program below and the table of op codes given above.

 

      1. What is the first number placed in the out basket?

 

      1. What is the last number placed in the out basket?

 

 

Mailbox Contents

 

00        517

01        218

02        902

03        705

04        601

05        000

……………..

  1. 100 DAT
  2. 2       DAT

 

 

 

 

    1. Refer to the LMC program in question (4). Change DAT in mailbox 18 to 4.

 

      1. What is the first number placed in the out basket?

 

      1. What is the last number placed in the out basket?

 

 

    1. Describe what the LMC program in question (4) does.

 

 

 

 

    1. Refer to the LMC program below. Write down what the calculator will hold after the instruction is complete in each loop. The first one is completed as an example.

00        517                     1                2                3                4

01        118

02        317

03        219

04        710

05        600

 

……………..

 

 

17

1

DAT

18

1

DAT

 

 

 

 

19

5

DAT

 

 

 

 

 

    1. Refer to the LMC program in question (7). How did the contents of mailboxes 17-19 change for each loop?

 

 

 

 

 

    1. What instruction should be placed in mailbox 02 so the program loops 4 times? Refer to the table of op codes above.

 

 

Mailbox Contents

00        517

01        218

02        ???

03        317

 

04        902

 

05        600

06        000

…………….. 17            10

18        2

 

 

 

Sol: The contents of address 02 should be 706 to loop 4 times.

 

 

    1. Describe what the following LMC program does. Refer to the table of op codes above.

 

 

 

Mailbox Contents

00        901

01        309

02        207

03        902

 

04        708

 

05        602

06        000

07        1

08        000

09        DAT

 

 

 

    1. The contents in memory occasionally have to be moved to another area of memory. When that happens, the mailbox references must be adjusted so that the program continues to function properly. Rewrite the LMC code in problem (10) so that it occupies mailboxes 05 through 14 only; mailboxes 01 through 04 will be used by another program, so they can't be used. Assume that instruction 605 remains in mailbox 00.

 

 

Mailbox Contents

 

 

00

605

01

used by other program

02

used by other program

03

used by other program

04

used by other program

05

???

06

???

07

???

08

???

09

???

10

???

11

???

12

???

13

???

14

???

 

 

 

 

 

 

 

    1. Describe the LMC three-digit instruction format. How does the LMC know what part of the value is an instruction, and what part is an address?

 

 

 

 

 

 

    1. How does the LMC "know" if a particular mailbox contains data or instructions?

 

 

 

 

    1. What happens if the LMC is executing a program and never encounters a "HALT" command?

 

 

 

 

    1. Describe how the LMC is von Neumann architecture.

 

 

 

 

 

 

 

 

Option 1

Low Cost Option
Download this past answer in few clicks

5.83 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

Related Questions