machine code/fetch execute cycle Flashcards

1
Q

What voltages are typically used for binary values?

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

What is a machine code instruction?

A

A binary code that a machine can interpret and execute

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

What is assembly language?

A

A mnemonic form of machine code (easier for people to read but still a one to one relationship)

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

What are compiled high-level language programs?

A

Programs translated into machine code before they can be executed on a digital computer

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

What is an executable file (.exe) written in?

A

machine code

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

What parts does a machine code instruction consist of?

A

the op-code (operation code) and operand

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

What is the op-code?

A

The part of a machine code instruction that includes the basic machine operation
(eg ADD)

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

What is the operand?

A

The part of a machine code instruction that represents one item of data or its address to be operated upon

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

What does the instruction LOAD #3 mean?

A

place the value 3 into accumulator

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

What does the instruction STORE 13 mean?

A

put what is in the accumulator into the memory loacation with address 13

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

What does the instruction ADD 13 mean?

A

Add up the contents of the accumulator and the contents of memory location 13 (the result goes in the accumulator)

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

Which register do ADD, LOAD and STORE use?

A

The accumulator

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

How are data and addresses represented in assembly code?

A

In decimal or hexadecimal

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

What is a memory dump?

A

A copy of the main memory contents - viewed by programmers to see where an error has occurred

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

What is the instruction set?

A

The set of bit patterns or binary codes for the machine operations that a processor has been designed to perform
i.e. every possible operation that can be carried out by a particular processor

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

If there are 4 bits allocated to the op-code then how large will the instruction set be?

A

2^4 = 16 so there are 16 possible operations in the instruction set

17
Q

How can an op-code be divided up?

A

Into the basic instruction and which addressing mode will be used

18
Q

What is an addressing mode?

A

Specifies in the op-code part, shows how the operand part should be interpreted

19
Q

What are the three addressing modes?

A
-register transfer involving main memory
=main memory address will be specified
-operand to register transfer
=A value not address will be specified
-operand part not used
20
Q

Give an example of an instruction where the operand part is not used

A

HALT

just stops the program executing, does not need any data or addresses

21
Q

What is the name for fetching, decoding and executing an instruction repeatedly in a stored program computer?

A

fetch-execute cycle

22
Q

Which registers are always involved in the fetch execute cycle?

A
  • program counter
  • memory address register
  • memory buffer register
  • current instruction register
23
Q

What is an alternative name for the memory buffer register?

A

memory data register

24
Q

What are the four steps in the fetch phase of the fetch execute cycle?

A
  • The address of the next instruction to be executed goes from the program counter to the memory address register
  • The instruction held in the address is given to the memory buffer register
  • The program counter is incremented by one
  • The contents of the memory buffer register is copied to the current instruction register
25
What are the two steps in the execute phase of the fetch execute cycle?
- Instruction i the current instruction register is decoded | - Instruction is executed
26
What is register transfer notation?
used to show how things are passed between different registers in a processor
27
How would the contents of program counter be written in register transfer notation?
[PC] | contents of = square brackets
28
How is assigned to represented in register transfer notation?
<---- | the same way as in pseudocode
29
What does x;y mean in register transfer notation?
instruction x and instruction y should be executed at the same time
30
What does SP stand for?
stack pointer register
31
What does PC stand for?
program counter register
32
What does SR stand for?
status register
33
What does ACC stand for?
accumulator
34
What does CIR stand for?
current instruction register
35
What does MAR stand for?
memory address register
36
What does MBR stand for?
memory buffer register
37
Give a basic description of the steps taken in the fetch execute cycle
- Memory address register takes the value of the program counter (ie. the address of the next instruction to be executed) - control circuit sends down the control bus whether read or write from that address is needed - Data from the memory address goes up the data bus to the memory buffer register - Instructions go to the current instruction register - program counter is incremented - Instructions are decoded and executed - Data goes to accumulator/general purpose registers (the top free register)