GATE Computer Organization formula sheet
46 formulas in 5 topics, each with when to use it. Each is explained in the topic notes.
Print the whole sheetBITS NEEDED TO ENCODE N DISTINCT ITEMS
Smallest with . Applies to an opcode field ( instructions), a register field ( registers) or an address field ( addressable locations).
EXPANDING OPCODES: W-BIT INSTRUCTIONS, A-BIT ADDRESS FIELDS
, , are the numbers of two-, one- and zero-address instructions. The two-address format has a -bit opcode; each unused two-address code gives one-address codes, and each unused one-address code gives zero-address codes. Assumes every instruction is exactly bits, every address field is bits, and .
FULL ADDER EQUATIONS
One bit-slice of any adder. Both outputs need all three inputs to be stable.
SUBTRACTION AND OVERFLOW (2'S COMPLEMENT)
An adder/subtractor passes each through an XOR gate with a mode line and sets : adds and subtracts. signals signed (2's complement) overflow. For unsigned numbers, after an addition means the result does not fit in bits. After a subtraction done as , means (no borrow).
HIT RATIO
The fraction of memory references satisfied directly by the cache. Miss ratio .
AVERAGE ACCESS TIME, HIERARCHICAL (SERIAL) ACCESS
Use this when main memory is accessed only after the cache lookup has missed, so a miss costs . is the time to get the needed data from main memory. If the question says a whole block is transferred into the cache on a miss and gives the block-transfer time, use that time as the miss cost in place of a single-word .
TOTAL INTERRUPT-SERVICING OVERHEAD FOR N INTERRUPTS
= number of interrupts serviced in the period analysed; = context-save time; = the ISR's own execution time, excluding save and restore; = context-restore time. Divide by the total elapsed time to get the fraction of CPU time spent.
FRACTION OF CPU TIME SPENT ON ONE DEVICE'S INTERRUPTS
= total CPU time per interrupt (save + service + restore); = average time between interrupts; = interrupts per second. If there is one interrupt per word, is the device's word rate. This holds only while . Otherwise the CPU cannot keep up and data is lost.
PIPELINE CLOCK PERIOD
is the delay of stage and is the inter-stage register (latch) delay, taken as 0 only if the question says so. The slowest stage sets the clock for every stage.
TOTAL TIME FOR N INSTRUCTIONS, K STAGES (NO STALLS)
The first instruction needs cycles to pass through all the stages (pipeline fill). After that, one instruction completes every cycle. Valid for an ideal pipeline with no stalls.