Where does a till keep its prices and the instructions for adding them?
You buy a sandwich and a drink at a shop in Leeds. The till needs the two prices and an instruction to add them. Where does it keep the numbers, and where does it keep the instruction?
You use an embedded computer in a washing machine: it’s built in to control the wash. An instruction might tell it to compare temperatures. The sensor reading is data. A desktop is a non-embedded computer with many uses. When it adds two prices, add is the instruction and the prices are data.
At address twenty in RAM, you see an add instruction. The next two addresses hold four pounds and three pounds. In Von Neumann architecture, instructions and data share main memory. RAM is volatile: it loses its contents without power. ROM is read-only and non-volatile, so it can keep start-up instructions without power.
A program doubles a price. You’ve got an instruction to double and a price for it to work on. In a Von Neumann computer, how are they stored in main memory? Pick one answer.
A bus is a set of wires that carries signals. To read main memory, the CPU sends an address on the address bus and a read signal on the control bus. Follow the return path: the data bus carries the requested bits, which can represent data or an instruction, back to the CPU.
Trace the data bus from main memory into the CPU for this read. A labels the registers, which hold values temporarily. B labels the arithmetic logic unit, or ALU, which performs calculations and logic operations. C labels the control unit, which directs operations. D labels the clock, which provides regular timing pulses.
Follow one fetch-execute cycle. The CPU fetches the instruction from address twenty. The control unit decodes it: add the values at twenty-one and twenty-two. To execute it, the CPU reads both prices into registers. The control unit signals the ALU to add four and three. A register holds the seven-pound result.
Now the till adds six pounds and two pounds. Use the labels from the CPU diagram. Which label shows the part that calculates eight pounds, and which shows the part that holds it temporarily? Pick the letters in that order.
A higher clock speed gives you more cycles per second. Clock speed alone can’t tell you which CPU will finish first. More cores can run more work at once if the software allows it. A larger cache, fast volatile memory in the CPU, can hold more instructions and data, reducing waits for RAM.
An exam might ask you to identify the CPU component that performs each function. If it holds a value temporarily, label it registers. If it performs a calculation, label it ALU. If it directs operations, label it control unit. If it supplies regular timing pulses, label it clock.