Lecture 2 Flashcards

1
Q

What does the PC contain?

A

The address of the next instruction to be executed in main memory.

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

What does the IR contain?

A

The instruction currently being processed.

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

What does the MAR contain?

A

The address of the data in memory to be retrieved or written.

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

What does the MBR contain?

A

The data word.

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

What do the I/O AR and I/O BR contain?

A

Address and data word to be retrieved or written to I/O space.

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

What are registers in the CPU? (6)

A

PC (program counter), IR (instruction register), MAR, MBR, I/O AR and I/O BR.

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

What is an I/O module?

A

Consists of at least one buffer which provides space for data words or instructions. Each buffer location has unique address.

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

Describe Instruction Cycle (4 phases, two main).

A

Start, fetch next instruction, decide and execute instruction, halt.

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

Describe fetch cycle (3 parts).

A

Processor fetches instruction from memory location located in PC.
PC is incremented.
Fetched instruction loaded into IR.

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

Describe execute cycle, 4 instruction types.

A

Processor to memory (cpu to memory).
Processor to i/o (cpu to i/o module).
Data processing (arithmetic or logical operation on data).
Control (alteration of sequence of operations ie Jump).

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

How many bits is an instruction or data word?

A

16 bits long or 4 hex digits.

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

What is an op code? Where is it?

A

The left most hex digit is the op code. The address is the three right most hex digits.

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

Which computer functions are interrupts vital for? (3)

A

i/o management, error handling and multi-tasking.

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

What are the four classes of program interrupts?

A

Program (generated by instruction execution - division by zero etc).
Timer (generated by internal timer).
I/O
Hardware Failure.

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

What does ISR stand for?

A

Interrupt service routine. Also interrupt handler.

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

How many interrupt sources typically?

A

20+. Can be enabled or disabled.

17
Q

What are steps of interrupt handler?

A
Suspend program.
Save context.
Set PC to start address of interrupt handler routine.
Process interrupt.
Restore context.
18
Q

What are instructions. What are programs?

A

Instructions are binary bit patterns (machine code). A program is a sequence of instructions.

19
Q

What is assembly language?

A

Assembler converts it to binary for cpu, easier for humans. Addresses and operands represented as numbers or symbols. Mnemonics represent op codes.

20
Q

Write a = a + b as assembly language.

A

ADD A, B

21
Q

How many op codes in 4 bits/hex?

A

16

22
Q

How many operand references and how many bits each? How many addresses can each reference?

A

2 operand references of 6 bit width. Each address 64 memory locations.

23
Q

What are the main types of instructions a cpu can perform?

A

Data transfer (between cpu & memory).
Arithmetic.
Logical.
Conversion. (date from decimal to binary).
Input / Output. (Transfer data between cpu register & I/O device).
System control (read/modify control register).
Transfer of control (?).

24
Q

Difference between more address fields and fewer address fields?

A
More= more complex instructions, fewer instructions, requires more internal registers.
Fewer= reduce complexity, more instructions, fetched and decided quicker,
25
Q

In the context of interrupts what is an IC?

A

An interrupt controller/Interrupt Unit.

Receives interrupt requests from internal and external sources.

26
Q

How is an interrupt source connected to an IC?

A

A physical wire.

27
Q

How do you deal with simultaneous multiple interrupt events?

A
Disable interrupts (ignore, keep pending, in sequence).
Define priorities (higher given precedence).
28
Q

What is the AC?

A

The Accumulator. A data register.