ENGG1000 Chap.4 Computer Architecture, Memory and Logic
Computer Architecture, Memory and Logic
The stored-program cycle
Instructions and data occupy addressable memory. The processor fetches an instruction, the control unit decodes it, the arithmetic and logic unit performs the requested transformation, and registers or memory receive the result.
Separating direction from calculation makes component roles easier to test.
Why memory is layered
Registers, cache, main memory and auxiliary storage trade speed against capacity and cost. Cache exploits temporal and spatial locality to keep frequently needed values close to the processor.
A small miss rate can still dominate average time because the slow path is much longer.
Trace control and data as separate paths
For an instruction trace, begin with the program counter and follow the instruction into decoding. Then follow operand addresses through cache and memory into registers, identify the arithmetic or logical transformation, and state where the result is stored.
Control signals decide which transfers occur; data paths carry the bit patterns being transformed. Naming both paths avoids treating the processor as an unexplained box and reveals where a dependency or memory delay can stall progress.
Interpret bits through their operation
A bit pattern has no single human meaning by itself.
The same sequence may be read as an unsigned value, a signed value, part of an instruction or an address, depending on its type and the operation applied. Logic gates act on binary states without recognising that interpretation.
When converting or tracing data, record the representation, word width and sign convention before assigning a decimal meaning or predicting overflow.
Quantify the memory trade-off
Average access time combines the frequent fast path with the rarer slow path.
Multiply hit time by its probability and add miss service time weighted by miss probability, taking care whether the stated penalty already includes the initial lookup. This calculation explains why a seemingly small miss rate matters when main memory is far slower than cache.
Capacity, latency, price and persistence are separate axes, so no memory technology is simply best.
Evaluate performance claims at the bottleneck
Clock rate counts cycles per second but does not state how many cycles a task needs. More cores provide potential throughput only when work can run concurrently, while serial dependencies and communication limit the gain.
A faster arithmetic unit cannot eliminate a memory stall. A defensible comparison identifies the workload, traces its limiting resource, and distinguishes latency for one task from throughput across many tasks.
What this chapter covers
- 01
Stored-program architecture
- 02
Fetch-decode-execute cycle
- 03
Control-unit signals
- 04
ALU operations
- 05
Registers and cache
- 06
Main and auxiliary memory
- 07
Boolean gates and expressions
Worked example · free
Compute average memory access time
- 2Identify hit and miss paths.
- 2Weight each path by probability.
- 2Check the range.
Key terms
- Stored Program
- An architecture in which instructions and data are held in memory.
- Control Unit
- The processor component coordinating operations and data movement.
- Arithmetic Logic Unit
- The component performing arithmetic, comparisons and bit operations.
- Register
- Very fast processor storage for active values.
- Cache
- Fast memory retaining recently or nearby used data.
- Boolean Logic
- Binary algebra implemented by switching gates.
Computer Architecture, Memory and Logic FAQ
Does the ALU load data from memory?
The ALU transforms operands through arithmetic, comparison and bitwise operations. The control unit directs memory reads and writes and routes values into registers, after which the ALU can operate on them. Loading is therefore a data-movement operation, not the ALU's defining role.
Why does cache improve performance?
Programs often reuse recent data and access nearby addresses. Cache keeps a small working set close to the processor, so many requests avoid slower main memory. Its benefit depends on locality and the size of the miss penalty.
How do I check a Boolean expression?
Construct a truth table covering every input combination or evaluate the gate sequence one stage at a time. Keep intermediate outputs labelled. This prevents precedence assumptions from changing the logic when several NOT, AND and OR operations appear together.
Exam move
Redraw the datapath with memory, control unit, ALU and registers, then narrate one instruction through fetch, decode, execute and store. Build a separate memory ladder ordered by latency and capacity. For logic, convert expressions into gate sequences and truth tables rather than relying on verbal intuition about the result.
Annotate the instruction trace twice, once with control decisions and once with data locations, so a missing transfer becomes visible. Create short average-access-time drills in which the miss penalty is stated in different ways and explain which terms are already included. When evaluating a performance claim, write workload, latency, throughput and bottleneck as four separate headings.
For binary questions, state width and interpretation before converting, then verify the result through the inverse conversion or a truth table.