GATE CSE Computer Organization and Architecture formula sheet
Key formulas and rules for GATE CSE Computer Organization and Architecture: instruction formats and addressing modes, ALU and IEEE 754 arithmetic, control unit design, cache and memory hierarchy, I/O and DMA, and instruction pipelining.
52 formulas · updated 2026-11-14 · reviewed 2026-11-14 · Spotted an error? Tell us
Instruction set and addressing modes
Opcode bits
Similarly, a register field needs bits for R registers.
Address bits
For byte-addressable memory the unit is 1 byte; for word-addressable memory it is one word.
Expanding opcode
o = opcode bits of the 2-address format, = 2-address instructions used, a = bits of the freed address field; = max 1-address instructions.
Immediate and direct
Immediate needs no memory access for the operand; direct needs one.
Indirect
Two memory accesses to get the operand (one for the address, one for the data).
Register and register indirect
Register indirect needs one memory access for the operand.
Indexed / base-register
Indexed suits array access; base-register suits relocation.
PC-relative
PC normally already points to the next instruction when EA is formed; a common GATE trap. Used for branches, gives position-independent code.
Auto-increment / decrement
d = operand size in addressable units; post-increment and pre-decrement are the usual forms (stack operations).
ALU and number representation
Two's complement range
n-bit signed integer. Sign-magnitude and one's complement range is to (two zeros).
Overflow detection
Carry into and out of the sign bit differ. Equivalently: adding two numbers of the same sign gives a result of the opposite sign.
Carry lookahead
Expanding gives every carry as a two-level AND–OR of G, P and : 2 gate delays after G, P (3 including G, P generation; sum adds an XOR level). Ripple-carry delay grows linearly with n.
Ripple-carry adder delay
Each full adder waits for the previous carry; the last sum bit is ready after the carry reaches it.
Booth's recoding
Followed by an arithmetic right shift each step. Number of additions/subtractions = number of 01 and 10 transitions.
IEEE 754 single (normalised)
1 sign, 8 exponent, 23 mantissa bits; bias 127.
IEEE 754 double (normalised)
1 sign, 11 exponent, 52 mantissa bits; bias 1023.
Exponent bias
k = exponent field width. Stored exponent E = actual exponent + bias.
IEEE 754 special values
Denormals (single) use exponent , not . For double use 2047 and .
Single-precision limits
Smallest positive denormal is .
Control unit design
Horizontal microcode
One bit per signal: fastest decoding, widest control word, high parallelism.
Vertical microcode
Signals encoded in groups of mutually exclusive signals; the +1 allows a no-operation code in each group (drop it if the question says otherwise). Narrower but needs decoders.
Microinstruction format
F = number of branch conditions/flags to select from, N = number of microinstructions in control memory (next-address field).
Control memory size
N microinstructions of width W bits.
Hardwired vs microprogrammed
RISC designs typically use hardwired control; CISC traditionally microprogrammed.
Memory hierarchy and cache
AMAT (hierarchical access)
Memory is accessed only after a cache miss. Equivalent to .
AMAT (simultaneous access)
Cache and memory accessed in parallel. Read the question to know which model applies.
Two-level cache
here is the local miss rate of L2 (misses / L1 misses). Global L2 miss rate = .
Miss penalty with block transfer
When a block of several words must be fetched over a narrower bus.
CPI with memory stalls
Penalty in cycles; count instruction fetches plus data accesses.
Direct-mapped address split
A = address bits, L = cache lines, B = block size in addressable units. Block j goes to line .
Set-associative address split
k-way set associative; block j goes to set . Needs k comparators of tag width.
Fully associative
No index field; needs L comparators (one per line).
Tag directory size
Include only the extra bits the question states (dirty only for write-back).
Write policies
Write-allocate usually pairs with write-back, no-write-allocate with write-through.
Memory chips needed
Extra high-order address bits drive a decoder that selects the chip row.
Three Cs of misses
Fully associative cache has no conflict misses; compulsory misses occur even with infinite cache.
I/O interface: interrupts and DMA
Word transfer time
Time between successive words from the device.
Polling / interrupt overhead
Events = polls (polling) or interrupts (interrupt-driven I/O).
DMA burst mode
x = time for the device to prepare a block, y = time to transfer the block on the bus. CPU is off the bus for the whole burst.
DMA cycle stealing
DMA takes the bus for one word at a time; interleaves with CPU.
Interrupt priority
Vectored interrupts give the ISR address directly; DMA requests are honoured at bus-cycle boundaries, interrupts at instruction boundaries.
Instruction pipelining and hazards
Pipeline clock
The slowest stage sets the clock; add the buffer/latch delay if given.
Time for n instructions
k stages, no stalls. First instruction takes k cycles, each later one adds 1.
Speedup
= time per instruction without pipelining. Equals k only when stages are balanced and latch delay is zero.
Efficiency and throughput
Efficiency formula assumes (balanced stages).
Pipeline CPI with stalls
Ideal pipelined CPI is 1.
Speedup with stalls
With balanced stages and at clock : .
Branch penalty
Drop if every branch stalls (no prediction). Penalty = stages until the branch is resolved.
Data hazard types
In a simple in-order pipeline only RAW causes stalls; WAR/WAW matter with out-of-order or multi-cycle stages; removed by register renaming.
Forwarding in 5-stage pipeline
Classic IF-ID-EX-MEM-WB. Without forwarding (write in first half, read in second half of a cycle) a back-to-back RAW needs 2 stalls.
CPU time
MIPS = .
Amdahl's law
f = fraction of time that is enhanced, s = speedup of that part. Max speedup .