COA Basics Formula Sheet and Revision Notes: CPU, Memory and Performance

Revise Computer Organization and Architecture through compact formulas, unit cues and checked examples covering CPU time, memory maps, instruction formats, two's complement and bus timing.

KnowledgeGate Team

Exam prep & CS education

Updated 23 Nov 20266 min read
COA Basics Formula Sheet and Revision Notes: CPU, Memory and Performance

COA numericals become simpler when you identify what is being counted: instructions, cycles, bytes, addresses or transfers. CPU-time, memory, instruction-format, signed-arithmetic and bus calculations make each rule concrete. Use GATE and PSU exam preparation for broader practice, and compare any exam-facing topic checklist with the current official syllabus.

1. COA basics revision map: architecture, organisation and the instruction path

Computer architecture is the programmer-visible contract: instruction set, registers, data types and addressing behaviour. Computer organisation is how datapaths, control signals, buses and memory realise it. Cue: architecture says what the machine exposes; organisation says how the machine builds it. Computer Architecture Basics: CPU Timing, Cache and I/O owns the broad tour; this sheet narrows to formula lookup and short verification calculations.

A program enters memory. The CPU fetches through address and data paths; control decodes, registers supply operands, and the ALU operates. The result returns to a register, memory or output. PC, MAR, MDR and IR carry the address, word and instruction through a fetch.

Object

Identify

Rule

Unit

CPU

Instructions, cycles

IC x CPI / rate

seconds

Memory

Locations, unit

locations x unit

bits or bytes

Instruction fields

Choices

ceil(log2 choices)

bits

Signed range

Width n

-2^(n-1) to 2^(n-1)-1

values

Bus

Width, rate, latency

size / bandwidth

seconds

Flynn class

Instruction, data streams

Count streams

class

2. CPU performance formula sheet: instructions, CPI, clock rate and speedup

Formula

When to use it

clock cycle time = 1 / clock rate

Frequency to cycle time

CPU cycles = instruction count x average CPI

Workload and CPI known

CPU time = instruction count x CPI / clock rate

Find execution time

average CPI = sum(fraction_i x CPI_i)

Unequal class costs

performance = 1 / execution time

Compare one workload

speedup = old time / new time

Measure improvement

A program executes 1.2 x 10^9 instructions: 60% at CPI 1, 30% at CPI 2 and 10% at CPI 3.

  1. Average CPI = 0.60(1) + 0.30(2) + 0.10(3) = 1.50.

  2. Total cycles = 1.2 x 10^9 x 1.50 = 1.8 x 10^9.

  3. At 3.0 GHz, cycle time = 1 / (3 x 10^9) = 0.3333 ns.

  4. CPU time = (1.8 x 10^9) / (3 x 10^9) = 0.60 s.

Another implementation takes 0.48 s for the same workload. Speedup is 0.60 / 0.48 = 1.25, so performance rises 25%. Time falls by (0.60 - 0.48) / 0.60 = 20%. Speedup divides by new time; reduction divides by old time.

Flow diagram from instruction mix through average CPI and total cycles to CPU time, with a speedup comparison from 0.60 s to 0.48 s.

3. Memory capacity and address lines: count locations before bytes

Use 2^n for the locations provided by n address lines. Then use capacity = locations x bits per location after identifying whether an address selects a byte or word. In reverse, address bits = ceil(log2 locations). When chip width already matches, number of chips = required capacity / one-chip capacity. The same address width gives different capacities on byte-addressable and word-addressable machines.

A byte-addressable memory with 16 address lines and a 32-bit data word has 2^16 = 65,536 byte addresses, or 65,536 B = 64 KiB. One word occupies four consecutive bytes, giving 65,536 / 4 = 16,384 words. Addresses run from 0x0000 through 0xFFFF. Here, MAR is 16 bits, while the data path and MDR are 32 bits.

Build the same 64 KiB from 8K x 8 chips. One stores 8,192 x 8 bits = 8 KiB, so 64 / 8 = 8 chips are needed. Each takes 13 low-order address bits because 2^13 = 8,192. Three high-order bits select one chip through a 3-to-8 decoder.

Correct 64 KiB memory map: A15..A13 decoder selects one chip; A12..A0 is a separate shared offset bus.

4. Instruction fields and register transfer: spend every bit and trace every fetch

Use bits required for N choices = ceil(log2 N) for opcode counts, register names and addressing-mode choices. In a declared 32-bit instruction with 64 opcodes, two register fields chosen from 16 registers and one signed immediate, the opcode needs log2 64 = 6 bits. Each register field needs log2 16 = 4 bits. The immediate receives 32 - 6 - 4 - 4 = 18 bits. As an 18-bit two's-complement number, its range is -2^17 to 2^17 - 1, which is -131,072 to 131,071.

Now trace a separate fixed-width fetch on a byte-addressable machine with four-byte instructions. Begin with PC = 0x0120 and M[0x0120..0x0123] = 0x8C240014.

  • At T0, MAR <- PC, so MAR = 0x0120.

  • At T1, MDR <- M[MAR..MAR+3] and PC <- PC + 4, so MDR = 0x8C240014 and PC = 0x0124.

  • At T2, IR <- MDR, so IR = 0x8C240014. Decoding follows.

The earlier CPU Organization Basics: Registers and a Worked Trace post owns the register-datapath walkthrough; this sheet limits the trace to fixed-width fetch and bit accounting.

5. Signed binary revision rules: ranges, two's complement and overflow

An unsigned n-bit integer spans 0 to 2^n - 1. An n-bit two's-complement integer spans -2^(n-1) to 2^(n-1) - 1. To negate a fixed-width value, invert every bit and add 1. To sign-extend it, copy the sign bit into every new high position.

Write +13 in eight bits as 00001101. Invert every bit to get 11110010, then add 1:

-13 = 11110011

Sign-extension to 16 bits gives 11111111 11110011, which still represents -13.

For an overflow example, add 100 + 60 in eight bits:

  • 100 = 01100100

  • 60 = 00111100

  • Eight-bit sum = 10100000

Read as unsigned, 10100000 is 160. Read as two's complement, it is 160 - 256 = -96. Two positive operands produced a negative sign bit, and the mathematical result 160 is outside -128..127, so signed overflow occurred.

Keep the tests separate. Carry-out alone decides unsigned overflow. Signed overflow occurs when same-sign operands produce a result with the opposite sign.

6. Bus bandwidth and transfer time: keep rate, width and latency separate

Use bytes per transfer = bus width in bits / 8. Use peak bandwidth = bytes per transfer x transfers per cycle x clock frequency at the declared sustained rate. Without startup cost, transfer time = data size / sustained bandwidth. With setup delay, total time = fixed latency + transfer time.

A 32-bit bus at 100 MHz, completing one transfer per cycle, moves 32 / 8 = 4 bytes per transfer. Its peak bandwidth is 4 x 1 x 100 x 10^6 = 400 x 10^6 B/s = 400 MB/s, using decimal MB/s.

A 64 KiB = 65,536 B block needs 65,536 / 4 = 16,384 transfers and, at one per cycle, 16,384 cycles. Time is 16,384 / (100 x 10^6) = 163.84 microseconds, matching 65,536 / (400 x 10^6). Add 20 microseconds setup and total time is 20 + 163.84 = 183.84 microseconds. Bandwidth is bulk rate; latency is waiting before or around transfer.

7. COA definition traps: six quick checks

Wrong move

Correction

Higher clock is always faster.

Compare CPU time.

16 address lines mean 16 bytes.

Count 2^16 units.

A 32-bit word forces 32-bit instructions.

Sizes are independent.

Carry-out proves signed overflow.

Use the sign rule.

400 MB/s means no delay.

Add setup latency.

Architecture equals organisation.

Contract differs from implementation.

Flynn's labels classify stream counts, not performance:

Class

Retrieval definition

SISD

One instruction stream, one data stream

SIMD

One instruction stream, multiple data items

MISD

Multiple instruction streams, one data stream

MIMD

Multiple instruction streams, multiple data streams

Use the CPU Organization Basics MCQs: 12 Solved Questions after deriving each answer here; the worked checks show which unit, sign rule or count controls the result.

8. The short COA revision loop and next step

Run a ten-minute closed-book loop. In minutes 0 to 2, rewrite CPU time and speedup. From 2 to 4, recover the 16-bit address and 64 KiB map. From 4 to 6, spend all 32 instruction bits. From 6 to 8, rebuild -13 and diagnose 100 + 60. From 8 to 10, reproduce the 183.84 microseconds bus total. Attach the correct unit to every answer.

Then redraw both diagrams and recompute each value without looking. GATE Guidance by Sanchit Sir provides a broader structured route through COA and GATE CS.