Processors & memory formulas
Memories, computer organisation, microprocessors and embedded systems. 38 formulas for GATE EC, EE, IN Digital Electronics, each with when to use it. Each is explained in the topic notes.
IAE Academy: Memories, computer organisation, microprocessors and embedded systems formulas (GATE EC, EE, IN)
All 38 Processors & memory formulas
ROM AS A COMBINATIONAL CIRCUIT
A ROM with n address inputs and m data outputs stores a complete truth table, so it implements any m Boolean functions of the same n variables: each address is one input combination and each word holds the m outputs for it. Example: a squarer for a 4-bit unsigned input (largest output , which needs 8 bits) needs a ROM, 128 bits.
DRAM DISTRIBUTED-REFRESH INTERVAL
R = number of rows (one refresh operation per row); = period within which every row must be refreshed. Spread evenly, one row is refreshed every .
DRAM REFRESH OVERHEAD
= duration of one row-refresh cycle. The same fraction applies to burst refresh (all rows back to back) and to distributed refresh.
CHIP CAPACITY
n = number of address lines, m = number of data lines (word size). Divide by 8 for bytes.
ADDRESS LINES FOR W WORDS
Address lines depend only on the number of words; data lines depend only on the word size.
NUMBER OF CHIPS
Target memory (words bits) built from chips: banks, each chips wide. If either ratio is not a whole number, round it up.
BANK-SELECT DECODER
For a contiguous block with a power of 2: the k decoder inputs are the address lines immediately above the chip's own lines, and each decoder output drives the of one bank.
ADDRESS RANGE OF A BLOCK
Size in addressable units: 1K = 400H, 2K = 800H, 4K = 1000H, 8K = 2000H, 16K = 4000H, 32K = 8000H.
IMAGES UNDER PARTIAL DECODING
u = number of address lines that are neither chip lines nor used in the select logic.
OPCODE FIELD WIDTH
distinct operations coded in one fixed-width opcode field.
INSTRUCTION LENGTH
p opcode bits, r register fields for registers, and a bits of address, displacement or immediate fields (a memory-address field for addressable units needs a bits).
EXPANDING OPCODE
Fixed-length instructions in two classes. The class with more operands has a p-bit opcode and instructions, using of the patterns; each unused pattern is extended by the f bits of the operand field that the class with fewer operands does not need, giving at most instructions in that class.
PC-RELATIVE BRANCH TARGET
= address of the instruction after the branch (the PC has already advanced during fetch), unless a question states that the offset is added to the branch's own address; d = q-bit 2's-complement offset in bytes. If the offset counts words or instructions, multiply d by their size first.
2'S-COMPLEMENT SUBTRACTION IN THE ADDER
= bitwise complement of B; the +1 enters as the adder's carry-in. The adder's carry-out is then 1 when (unsigned), that is, it is the complement of the borrow; some processors, the 8085 among them, store the borrow in the carry flag instead.
SIGNED OVERFLOW FLAG
n-bit addition: = carry into the MSB (bit n−1), = carry out of the MSB. Equivalently, an addition overflows when both operands have the same sign and the result has the opposite sign, and adding operands of opposite sign never overflows; a subtraction overflows when A and B have opposite signs and the result's sign differs from A's.
RANGE OF N-BIT 2'S-COMPLEMENT NUMBERS
An 8-bit signed value runs from −128 to +127.
HORIZONTAL MICROINSTRUCTION WIDTH
control signals (one bit each); c = condition-select bits ; a = next-address bits .
VERTICAL (ENCODED) FIELD WIDTH
A group of k mutually exclusive signals; the extra code means none of them is active. If a question states that one signal of the group is always active, use .
CONTROL-MEMORY SIZE
In bits.
PROCESSOR EXECUTION TIME
IC = instructions executed, CPI = average clock cycles per instruction. Speed comparisons use the ratio of execution times. MIPS rating .
PIPELINE CLOCK PERIOD
= delay of stage i, = inter-stage register delay.
TIME FOR N INSTRUCTIONS ON A K-STAGE PIPELINE
k cycles for the first instruction to pass through, then one completion per cycle; no stalls.
SPEED-UP OVER THE NON-PIPELINED PROCESSOR
= non-pipelined time per instruction; unless stated, the sum of the stage delays without latch delay. As , .
IDEAL SPEED-UP (BALANCED STAGES)
Holds when : equal stage delays, no latch overhead, no stalls. With taken as the sum of the stage delays, the speed-up of a k-stage pipeline never exceeds k.
EFFICIENCY AND THROUGHPUT
Efficiency is defined here as S/k. For balanced stages with no latch delay and no stalls it equals , the fraction of stage slots doing useful work; some questions define efficiency directly as that fraction, so check which is meant. Throughput is in instructions per unit time.
CPI WITH STALLS
Sum each hazard's frequency times its stall cycles. For branches the term is , with p = fraction of branches that pay the penalty (taken, or mispredicted) and b = penalty in cycles.
TIME FOR N INSTRUCTIONS WITH STALLS
= total stall (bubble) cycles in the run, for an in-order pipeline in which each stall cycle delays every later instruction by one cycle.
SPEED-UP WITH STALLS (LONG PROGRAMS)
The first form is general; the second assumes .
BRANCH PENALTY (STALL UNTIL RESOLVED)
s = number of the stage (IF = 1) at the end of which both the branch outcome and the target are known: resolved in ID gives 1 bubble, in EX 2, in MEM 3.
8085 CLOCK AND T-STATE
A 6 MHz crystal gives a 3 MHz clock and a T-state of 333.3 ns. Execution time = total T-states × T.
8085 DELAY LOOP, 8-BIT COUNTER
MVI C, N (7); LOOP: DCR C (4); JNZ LOOP (10 when taken, 7 on the final pass). N = 1 to 255; loading 00H gives 256 passes (use N = 256), because DCR takes 00H to FFH.
8085 DELAY LOOP, 16-BIT COUNTER
LXI B, N (10); LOOP: DCX B (6); MOV A, C (4); ORA B (4); JNZ LOOP (10/7). The MOV and ORA are needed because DCX sets no flags. N = 1 to 65535; loading 0000H gives 65536 passes (use N = 65536).
RST VECTOR ADDRESS
RST n (n = 0 to 7) gives 0000H, 0008H, ..., 0038H. The hardware interrupts follow the same rule with fractional n: TRAP (4.5) → 0024H, RST 5.5 → 002CH, RST 6.5 → 0034H, RST 7.5 → 003CH.
8051 MACHINE CYCLE AND TIMER DELAY (MODE 1)
Classic 8051: one machine cycle = 12 oscillator periods. In mode 1 the 16-bit timer counts up from and sets its overflow flag TF on FFFFH → 0000H; this delay ignores the instructions that load and start the timer. At 12 MHz, a 1 ms delay needs 1000 counts, so load 65536 − 1000 = 64536 = FC18H.
SAMPLING REQUIREMENT AND MULTIPLEXED ADC RATE
= highest frequency in the filtered signal, = sampling rate per channel, channels sharing one ADC. The converter must also satisfy (sample-and-hold acquisition time plus conversion time).
ADC RESOLUTION (STEP SIZE) AND QUANTISATION ERROR
Convention used here: is the full input range, divided into steps; the error bound is for a rounding converter. If a question defines as the voltage of the all-ones code (common for DACs), use .
SIGNAL-TO-QUANTISATION-NOISE RATIO
Full-scale sinusoidal input (peak-to-peak equal to the full range , with ), quantisation noise uniformly distributed with power . Each extra bit adds about 6 dB.
ADC CONVERSION EFFORT
Successive approximation: one clock per bit (some devices add a cycle; follow the question). Flash: one comparator per threshold, the fastest type. A counting (ramp) ADC needs up to clocks.
Where this was asked: 2018 (2), 2020 (2), 2023 (1), 2024 (1), 2025 (1), 2026 (2). See the 9 previous-year questions on Processors & memory. This shows what was asked, not what will be asked.