The CPU Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is the control bus?

A

The bidirectional bus used to carry control signals between the CPU and RAM

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

What is the address bus?

A

The unidirectional bus which the CPU uses to send a memory address to RAM. The RAM will then fetch the data stored at that address

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

What is the data bus?

A

The bidirectional bus that carries data around the CPU and to and from the RAM

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

What determines how much RAM is addressable?

A

The width of the address bus

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

What is a register?

A

Fast data storage used to store data temporarily

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

What is the stored program concept?

A

Programs which are currently being executed have their instructions and data stored in the RAM temporarily

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

What is the system clock?

A

Every time it clicks, an instruction is executed (in a single core)

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

What is the PC?

A

The program counter, which stores the address of the next instruction to be executed

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

What is the MAR?

A

(Memory address register) Holds the memory address of what needs to be fetched from RAM

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

What is the MBR?

A

(Memory buffer register) The memory register that temporarily stores data read from/to be written to memory

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

What is the CIR?

A

(Current instruction register) Holds the current instruction

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

What is the SR?

A

(Status register) Holds the bits output by the ALU’s calculation (e.g. overflow errors, carry values)

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

Describe the fetch-decode-execute cycle

A
  1. The memory address in the PC is copied to the MAR
  2. The contents of the MAR are sent to the RAM via the address bus, which returns the instruction stored at that address via the data bus
  3. The address in the PC is incremented by 1
  4. The instruction returned by the RAM is stored in the MBR
  5. The contents of the MBR are copied to the CIR
  6. The contents of the CIR are split into opcode and operand
  7. The control unit executes the instruction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does changing the number of cores affect performance?

A

It means the CPU can execute multiple instructions per clock tick

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

[PPQ] Describe the fetch stage of the fetch-decode-execute cycle

A
  1. The memory address in the PC is copied to the MAR
  2. The contents of the MAR are sent to the RAM via the address bus, which returns the instruction stored at that address via the data bus
  3. The address in the PC is incremented by 1
  4. The instruction returned by the RAM is stored in the MBR
  5. The contents of the MBR are copied to the CIR
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

[PPQ] Why does the instruction have to be copied from the MBR to the CIR?

A

While the instruction is being executed, more information might need to be fetched from memory, and this data is stored in the MBR. The MBR is also not directly wired to the processor components that execute the instruction

17
Q

[PPQ] Why is the Harvard CPU architecture sometimes used instead of the von Neumann architecture?

A

Instructions and data can be accessed simultaneously, which avoids delays waiting for memory fetches. However, Harvard-based CPUs are more expensive to build

18
Q

[PPQ] What is an operand?

A

An operand is a value that will be used by an operation

19
Q

[PPQ] What does the addressing mode indicate?

A

The addressing mode indicates how the value in the operand should be interpreted

20
Q

[PPQ] What are the advantages and disadvantages of high level programming languages?

A

Advantages: Code is easier for humans to understand and maintain, developing programs is faster because one line of HL code can do more than one line of LL code, flow control structures are available (loops, if statements)

Disadvantages: Executes more slowly than LL code, LL code gives direct access to hardware and allows for direct manipulation of memory contents

21
Q

[PPQ] What are the differences between serial and parallel communication?

A

Serial sends one bit at a time while parallel sends multiple bits at the same time

22
Q

[PPQ] Why do computer peripherals only use serial communication?

A

The distance between the PC and the peripherals is too large to use parallel communication, which could result in data skew

23
Q

[PPQ] What is baud rate?

A

Number of signal changes per second

24
Q

[PPQ] Why is the final version of a program translated using a compiler?

A

So that users do not require a compiler to run it

So that the users cannot access the source code

25
Q

[PPQ] Why are JavaScript programs interpreted rather than compiled?

A

The website will be accessed by many different devices, all with different processors. A program run using an interpreter can execute on a computer with any type of processor

26
Q

[PPQ] Why is translation necessary?

A

Processor can only execute machine code instructions

27
Q

[PPQ] What are the differences between a compiler and an interpreter?

A

Compiler analyses program as a whole
Interpreter analyses program on a line-by-line basis
Compiler produces object code/executable file/machine code/bytecode
Interpreter calls subroutines within its own code to carry out commands
Compiler will not translate any of the program if it encounters an error
Interpreter translates/executes program until first error is encountered
Compiled code does not require the compiler to run

28
Q

De Morgan’s law

A

not(A) or not(B) = not(A and B)

not(A) and not(B) = not(A or B)

29
Q

Expansion of brackets

A

(A or B) and C = (A and C) or (B and C)

30
Q

Identity “A or not(A)”

A

0

31
Q

Identity “X + 0”

A

X

32
Q

Redundancy theorem

A

X or (X and Y) = X

33
Q

[PPQ] What is imperative programming?

A

Instructions are executed in a programmer-defined order, and they describe how a computer should solve a problem, as opposed to what (declarative programming)

34
Q

What is bytecode?

A

Bytecode is computer object code that is processed by a program, usually referred to as a virtual machine, rather than by the “real” computer machine, the hardware processor.

35
Q

What are the differences between Von Neumann and Harvard architecture?

A

Von Neumann architecture:
Shared memory space for instructions and data, both stored in the same format
Follows linear FDE cycle, once instruction at a time, registers used for fast access

Harvard: Instructions and data stored in separate memory units, with separate buses, reading/writing and fetching instructions can be done at the same time

36
Q

[PPQ] What is immediate addressing?

A

The operand is the value given

37
Q

[PPQ] What is direct addressing?

A

The number given is the address of the operand. Address to be interpreted as meaning either main memory or register.

38
Q

What is a D-type flip flop?

A

A logic circuit which can store the value of a single bit. It has two inputs, clock and data. The clock signal is generated by the computer and alternates between 0 and 1 at a set frequency. The value of the stored bit is set to the value of the data input with each change
of the clock signal.