CHAPTER 6: The Little Man Computer Flashcards

1
Q

The LOAD instruction copies data from the

a) in basket to a mailbox.
b) calculator to a mailbox.
c) in basket to the calculator.
d) mailbox to the calculator.

A

d) mailbox to the calculator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The STORE instruction copies data from the

a) in basket to a mailbox.
b) mailbox to the calculator.
c) calculator to a mailbox.
d) in basket to the calculator.

A

c) calculator to a mailbox.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The ADD instruction adds data from

a) the in basket to a mailbox.
b) a mailbox to the calculator.
c) a mailbox to the in basket.
d) one mailbox to another mailbox.

A

b) a mailbox to the calculator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The SUBTRACT instruction subtracts data in

a) the calculator from a mailbox.
b) the in basket from a mailbox.
c) a mailbox from the calculator.
d) one mailbox from another mailbox.

A

c) a mailbox from the calculator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The INPUT instruction takes data from the

a) in basket and places it in a mailbox.
b) mailbox and places it in the in basket.
c) mailbox and places it in the calculator.
d) in basket and places it in the calculator.

A

d) in basket and places it in the calculator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The OUTPUT instruction takes data from the

a) out basket and places it in a mailbox.
b) mailbox and places it in the out basket.
c) out basket and places it in the calculator.
d) calculator and places it in the out basket.

A

d) calculator and places it in the out basket.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The COFFEE BREAK (HALT) instruction

a) pauses the program.
b) clears all mailboxes.
c) empties the out basket.
d) ignores the address portion of the instruction.

A

a) pauses the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A LOAD command will leave the original data in the mailbox

a) deleted.
b) corrupted.
c) unchanged.
d) overwritten.

A

c) unchanged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A LOAD command will leave the original data in the calculator

a) deleted.
b) corrupted.
c) unchanged.
d) overwritten.

A

d) overwritten.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A STORE command will leave the original data in the mailbox

a) deleted.
b) corrupted.
c) unchanged.
d) overwritten.

A

d) overwritten.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A STORE command will leave the original data in the calculator

a) deleted.
b) corrupted.
c) unchanged.
d) overwritten.

A

c) unchanged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

An ADD command will leave the original data in the mailbox

a) deleted.
b) corrupted.
c) unchanged.
d) overwritten.

A

c) unchanged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

An INPUT command will leave the original data in the calculator

a) deleted.
b) corrupted.
c) unchanged.
d) overwritten.

A

d) overwritten.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

An OUTPUT command will leave the original data in the calculator

a) deleted.
b) corrupted.
c) unchanged.
d) overwritten.

A

c) unchanged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

a) INPUT, ADD, INPUT
b) INPUT, LOAD, INPUT
c) INPUT, STORE, INPUT
d) INPUT, ENTER, INPUT

A

c) INPUT, STORE, INPUT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

The BRANCH UNCONDITIONALLY instruction changes the value in the

a) mailbox.
b) calculator.
c) out basket.
d) program counter (also called instruction location counter).

A

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

17
Q

The BRANCH ON ZERO instruction “jumps” if the value in the

a) mailbox is zero.
b) in basket is zero.
c) calculator is zero.
a) instruction location counter is zero.

A

c) calculator is zero.

18
Q

The BRANCH ON POSITIVE instruction “jumps” if the value in the

a) mailbox is positive.
b) in basket is positive.
c) calculator is positive.
d) instruction location counter is positive.

A

c) calculator is positive.

19
Q

The instruction cycle can be broken into these two parts

a) fetch and decode.
b) fetch and execute.
c) decode and execute.
d) execute and increment.

A

b) fetch and execute.

20
Q

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

a) calculator.
b) in basket.
c) current mailbox.
d) program counter (instruction location counter).

A

d) program counter (instruction location counter).

21
Q

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

a) 1
b) 2
c) 3
d) 6

A

a) 1

22
Q

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

a) 01
b) 02
c) 03
d) 04

A

a) 01

23
Q

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

a) 1
b) 2
c) 3
d) 6

A

a) 1

24
Q

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

a) 1
b) 2
c) 3
d) 4

A

d) 4

25
Q

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

a) 1
b) 2
c) 3
d) 6

A

d) 6

26
Q

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

a) 1
b) 2
c) 3
d) 6

A

d) 6

27
Q

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

a) 1
b) 2
c) 3
d) unknown

A

d) unknown

28
Q

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

a) 01
b) 02
c) 03
d) 06

A

b) 02

29
Q

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

a) 1
b) 2
c) 3
d) 6

A

c) 3

30
Q

What instruction is never executed?

a) 602
b) 106
c) 507
d) 902

A

b) 106

31
Q

What data (DAT) value is never used?

a) 1
b) 2
c) 3
d) 6

A

d) 6

32
Q

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

a) 03
b) 04
c) 05
d) 06

A

d) 06

33
Q

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

a) 1
b) 2
c) 3
d) 6

A

b) 2

34
Q

In the von Neumann architecture, memory holds

a) data only.
b) instructions only.
c) data and instructions.
d) neither data and instructions.

A

c) data and instructions.

35
Q

In the von Neumann architecture, memory is addressed

a) by location number.
b) by the value stored.
c) by contents of the memory location.
d) None of the above.

A

a) by location number.