LMC_Flashcards

1
Q

What does LMC stand for?

A

Little Man Computer

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

What is the purpose of the LMC?

A

To demonstrate basic computer architecture and machine language concepts.

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

What is the maximum number of mailboxes in LMC?

A

100 mailboxes, with addresses ranging from 00 to 99.

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

What is stored in an LMC mailbox?

A

A 3-digit decimal number representing data or instructions.

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

What is the role of the calculator in the LMC?

A

To perform operations with values up to 3 digits.

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

What does the location counter in the LMC do?

A

It holds the address of the next instruction to execute.

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

What do the ‘IN’ and ‘OUT’ trays in LMC represent?

A

Input and output interfaces for user interaction.

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

How is assembly language related to machine language?

A

Each assembly language instruction corresponds directly to a machine language instruction.

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

What is a mnemonic in assembly language?

A

A short character sequence representing an instruction (e.g., ADD, SUB).

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

What does the opcode ‘1xx’ represent in LMC?

A

ADD - Adds the value from a specified mailbox to the calculator.

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

What does the opcode ‘2xx’ represent in LMC?

A

SUB - Subtracts the value from a specified mailbox from the calculator.

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

What does ‘3xx’ represent in LMC instructions?

A

STA - Stores the value in the calculator to a specified mailbox.

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

What is the opcode ‘5xx’ used for in LMC?

A

LDA - Loads a value from a specified mailbox into the calculator.

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

What is the purpose of opcode ‘901’?

A

INP - Takes user input and loads it into the calculator.

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

What does ‘902’ do in LMC?

A

OUT - Outputs the current value in the calculator.

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

What does the LMC instruction ‘000’ represent?

A

COB or HALT - Stops the program execution.

17
Q

What is the purpose of the ‘DAT’ directive in LMC assembly language?

A

To declare variables and store initial data values in mailboxes.

18
Q

What is an LMC program’s ‘fetch-execute cycle’?

A

The cycle where the LMC retrieves and executes each instruction in sequence.

19
Q

What is the ‘Von Neumann architecture’?

A

A computer architecture with stored programs and memory addressed by location number.

20
Q

What is the function of the BRA instruction?

A

Branches unconditionally to a specified mailbox address.

21
Q

What is the function of the BRZ instruction?

A

Branches if the value in the calculator is zero.

22
Q

What does BRP do in LMC?

A

Branches if the value in the calculator is positive.

23
Q

Describe a simple program in LMC to add two numbers.

A

Input two numbers, store them, add them, output the result, and halt.

24
Q

What would the instruction ‘LDA 10’ do?

A

Load the value in mailbox 10 into the calculator.

25
Q

Explain the purpose of labels in assembly language.

A

Labels are names given to memory addresses to make code easier to read and manage.

26
Q

What is a conditional branch?

A

An instruction that changes the sequence based on conditions (e.g., BRZ, BRP).

27
Q

What does the STA command do?

A

Stores the calculator’s current value in a specified mailbox.

28
Q

Describe the ‘INP’ command in LMC.

A

It allows the user to input a number into the calculator.

29
Q

Explain what happens during the ‘execute’ phase of the fetch-execute cycle.

A

The LMC performs the operation specified by the instruction it just fetched.

30
Q

What is the main purpose of assembly language in programming?

A

To provide low-level control over hardware operations, often used in device drivers.

31
Q

What does the mnemonic ‘OUT’ represent in an LMC program?

A

Outputs the current value in the calculator to the output tray.

32
Q

What is the purpose of ‘night shift’ in LMC context?

A

Loading a program and initial data into LMC memory for the Little Man to execute.

33
Q

How does the LMC handle program control?

A

Through instructions like BRA, BRZ, and BRP that alter the instruction sequence based on conditions.