Flashcards
1.1.1 Structure and function of the processor
-
Question
What does the Arithmetic and Logic Unit (ALU) do?
Answer
It carries out arithmetic operations (such as addition and subtraction), logical operations (such as AND and OR) and comparisons. Results are usually stored in the accumulator.
-
Question
What is the role of the Control Unit (CU)?
Answer
It decodes instructions and sends control signals to coordinate the other parts of the processor, memory and I/O, managing the fetch-decode-execute cycle.
-
Question
What does the Program Counter (PC) hold?
Answer
The address of the next instruction to be fetched.
-
Question
What does the Memory Address Register (MAR) hold?
Answer
The address of the memory location that is about to be read from or written to.
-
Question
What does the Memory Data Register (MDR) hold?
Answer
The data or instruction that has just been read from memory, or that is waiting to be written to memory.
-
Question
What does the Current Instruction Register (CIR) hold?
Answer
The instruction currently being decoded and executed, split into its opcode and operand.
-
Question
Which buses are one-way and which are two-way?
Answer
The address bus is one-way (processor to memory). The data bus and control bus are two-way.
-
Question
What is the effect of adding one line to the address bus?
Answer
It doubles the number of memory locations that can be addressed, because n lines can carry 2n different addresses.
-
Question
Describe the fetch stage of the fetch-decode-execute cycle.
Answer
The address in the PC is copied to the MAR and the PC is incremented. The instruction at that address is sent along the data bus to the MDR, then copied into the CIR.
-
Question
Why does a dual-core processor not always run a program twice as fast as a single core?
Answer
Only tasks that can be split into parts that run in parallel benefit, and the cores must spend time coordinating and sharing data.
-
Question
How does cache improve processor performance?
Answer
Cache is small, fast memory close to the processor that stores frequently used instructions and data, so they can be fetched much more quickly than from main memory.
-
Question
What is pipelining, and what happens to the pipeline after a branch?
Answer
Pipelining overlaps the fetch, decode and execute stages of different instructions. After a branch, the instructions already in the pipeline may be the wrong ones, so the pipeline is flushed and refilled.
-
Question
What is the main difference between Von Neumann and Harvard architecture?
Answer
Von Neumann stores instructions and data in one shared memory with one set of buses. Harvard uses separate memories and buses for instructions and data, so both can be accessed at the same time.
-
Question
What does the Accumulator (ACC) hold?
Answer
The result of the most recent calculation done by the ALU. Values are loaded into it to be worked on, and stored back to memory from it.
-
Question
How are the registers and buses used when the instruction
LDA 40is executed?Answer
The operand 40 is copied into the MAR and sent along the address bus, with a read signal on the control bus. The value stored at address 40 comes back along the data bus into the MDR, then is copied into the ACC.
-
Question
What is clock speed, and how does it affect processor performance?
Answer
The number of clock cycles the processor completes per second, measured in hertz (e.g. 3.5 GHz). Each step of the fetch-decode-execute cycle is timed by the clock, so a higher clock speed executes more instructions per second, but produces more heat.
-
Question
How do contemporary processors combine Von Neumann and Harvard architecture?
Answer
Main memory holds both instructions and data, as in Von Neumann. Inside the processor, the L1 cache is split into separate instruction and data caches, as in Harvard, so an instruction and data can be fetched at the same time.
End of the deck
Keys: Space flips, ← → move between cards.
Tap the card to flip it. Swipe to change card.