The whole Digital Electronics formula sheet, to print
185 formulas in 7 topics, each with when to use it. Each is explained in the topic notes.
IAE Academy: Digital Electronics formula sheet (GATE EC, EE, IN)
Number systems and codes
Read the notesVALUE OF A POSITIONAL NUMBER
Here is the number of integer digits and the number of fraction digits . Every digit must be smaller than the base.
RANGE OF AN N-DIGIT UNSIGNED INTEGER; DIGITS NEEDED
An -digit base- integer takes distinct values. In bits, . For example, 256 needs 9 bits because . The formula needs ; the value 0 still takes one digit.
R'S AND (R − 1)'S COMPLEMENTS OF AN N-DIGIT BASE-R NUMBER
is an -digit base- integer (leading 0s count towards ). The 's complement replaces every digit by ; adding 1 to it gives the 's complement. For the 's complement has digits; dropping the extra digit leaves 0. If also has fraction digits, its 's complement is . Examples: the 9's and 10's complements of are and ; the 7's and 8's complements of are and . With these are the 1's and 2's complements.
VALUE OF AN N-BIT 2'S-COMPLEMENT WORD
The MSB has weight . Equivalently, when the MSB is 1, value (unsigned value) . For example, .
RANGES FOR N BITS
For : unsigned is 0 to 255, 2's complement is to , and the other two are to (each has two codes for zero).
NEGATION (COMPLEMENT) RULES
and the results are read as -bit unsigned values, and the carry out of bit is dropped (the arithmetic is modulo ). So in 2's complement, negating gives back; in 1's complement it gives , the second code for zero. In 2's complement, negating gives back (an overflow), because has no -bit code.
SIGNED (2'S-COMPLEMENT) OVERFLOW FLAG
Overflow occurs exactly when the carry into the MSB differs from the carry out of it. This holds for addition and for alike.
OVERFLOW FROM THE SIGN BITS
and are the sign bits of the two words entering the adder, and is the sign bit of the sum. In words: two operands of the same sign produced a sum of the other sign. Adding operands of opposite signs can never overflow. For , use the sign bit of , the word the adder actually receives.
UNSIGNED CARRY AND BORROW
When is computed as , means (no borrow) and means .
BINARY TO GRAY
Equivalently, , where is shifted right by one bit with a 0 entering at the MSB. It takes XOR gates and involves no carries. Example: gives .
GRAY TO BINARY
Work from the MSB down. Each binary bit is the XOR of the Gray bit at that position with the binary bit just found on its left. Equivalently, is the parity of all Gray bits from the MSB down to position .
SINGLE PRECISION: NORMALIZED VALUE
, where is the fraction MSB. The true exponent runs from to .
SINGLE PRECISION: DENORMAL (SUBNORMAL) VALUE
There is no hidden 1, and the exponent is fixed at , not . Denormals fill the gap between 0 and the smallest normalized number in equal steps of .
LARGEST AND SMALLEST POSITIVE SINGLE-PRECISION VALUES
has and all 1s (hex 7F7FFFFF). has , (hex 00800000). has and (hex 00000001). The negative values mirror these with .
SPACING OF NORMALIZED NUMBERS
The gap doubles with each power of 2. Absolute resolution therefore worsens as magnitude grows, while the relative gap between neighbours stays between and . Below the denormals take over, with the fixed gap .
EXPONENT BIAS; DOUBLE PRECISION
is the number of exponent bits: gives 127 and gives 1023. Double precision has 1 sign bit, 11 exponent bits and 52 fraction bits, and its denormals use . A question that defines its own format, with a stated bias or a different significand convention (for example with no hidden bit), overrides these values.
PARITY BIT
To check, XOR all received bits; with even parity, a result of 1 flags an error. An XOR tree with inputs needs two-input XOR gates.
MINIMUM DISTANCE OF A CODE
is the smallest number of bit positions in which any two valid code words differ. To correct up to errors and also detect up to errors (), . Single parity has , so it detects 1 error and corrects none.
CHECK BITS FOR A SINGLE-ERROR-CORRECTING HAMMING CODE
is the number of data bits and the number of check bits, and you take the smallest that satisfies the inequality. needs (the (7,4) code) and needs . needs , not 4, because . In the usual layout the check bits sit at positions 1, 2, 4, 8, … (numbered from 1), and the recomputed checks (the syndrome), read as a binary number, give the position of a single flipped bit, with 0 meaning no error. The Hamming code has ; adding one overall parity bit raises it to 4, so the extended code corrects 1 error and detects 2.
Boolean algebra, logic gates and minimisation
Read the notesBASIC LAWS
Identity, null (dominance), idempotent, complement and involution laws; each left-hand law is the dual of the one beside it.
DISTRIBUTIVE LAWS
The second one (OR over AND) has no counterpart in ordinary algebra; it is the step that turns an SOP into a POS.
ABSORPTION
First row: in an SOP, a product term that contains every literal of another product term is redundant; dually, in a POS, a sum term that contains every literal of another sum term is redundant. Second row (the redundant-literal rule): when a literal stands alone as a term, its complement can be deleted from every other term.
COMBINING (ADJACENCY)
Two terms that are identical except for one variable, true in one and complemented in the other, merge into one and that variable drops out. Every K-map group and every Quine–McCluskey step is this law.
CONSENSUS THEOREM
It applies when exactly one variable appears true in one term and complemented in the other. The consensus term is then the AND of the remaining literals () in an SOP, or the OR of the remaining literals () in a POS, and it is redundant. If two or more variables are opposed there is no consensus term. The redundant term still matters for hazards (last section).
DE MORGAN'S THEOREMS
Break the bar, change the operator. Applied to a whole expression it gives the complement: swap and , swap 0 and 1, and complement every literal.
TRANSPOSITION
Multiplying out gives . , and is the consensus term of and , so both drop. A fast route from POS to SOP.
SHANNON EXPANSION
Holds for any function and any chosen variable; it is the basis of multiplexer realisations and of the substitution shortcuts below.
CANONICAL FORMS
is the set of rows where , written . Example: .
COMPLEMENT IN CANONICAL FORM
Complementing swaps the index set. Keeping the same indices and switching to gives , not .
SIZE OF A TERM
Each variable appears at most once in the term. Use it to count minterms fast. Overlapping terms must be counted once, so list the minterms whenever terms can overlap.
NUMBER OF BOOLEAN FUNCTIONS
Counts every function of variables, including the constants 0 and 1 and functions that ignore some variables. For there are 16, which is why there are 16 possible two-input gates.
DUAL FUNCTION
Swapping and (and 0 and 1) in any expression of gives this same function. Row is the bitwise complement of row .
SELF-DUAL FUNCTION
Rows and must have opposite outputs, so exactly one of each complementary pair is a minterm and a self-dual function has exactly minterms. Every self-dual function is therefore neutral (next block), but a neutral function need not be self-dual. Examples: any single literal, , and the majority function .
OTHER COUNTS
Self-dual: the rows form complementary pairs, each with 2 choices. Symmetric: the output depends only on how many inputs are 1, which takes values.
FUNCTIONS THAT DEPEND ON ALL N VARIABLES
Inclusion–exclusion over the variables a function may ignore. For it gives 2, 10, 218 and 64594.
GROUP SIZE AND LITERALS
Groups must be rectangles (wrap-around allowed) whose sides are 1, 2 or 4 cells long, so a group holds 1, 2, 4, 8 or 16 cells; in a 5-variable map a group may also be the same rectangle on both halves. A variable that changes inside the group drops out; one fixed at 1 appears uncomplemented and one fixed at 0 appears complemented. A 3-cell or L-shaped group is not a single term.
XOR/XNOR IDENTITIES
XOR is commutative and associative. Complementing one input complements the output; complementing both leaves it unchanged.
MORE XOR RELATIONS
AND distributes over XOR, but OR does not. If (the terms never both equal 1) then .
MULTI-INPUT PARITY
Here means two cascaded 2-input XNOR gates, : it gives the 3-input XOR, not its complement. An -variable XOR has minterms and no two of them are adjacent on a K-map (a checkerboard), so its minimal SOP needs all terms of literals each.
Logic families and CMOS logic gates
Read the notesHIGH-LEVEL NOISE MARGIN
Uses worst-case values: the minimum and the minimum .
LOW-LEVEL NOISE MARGIN
Uses worst-case values: the maximum and the maximum . The family's noise margin is the smaller of and .
DC FAN-OUT
All currents are magnitudes. Round each ratio down, then take the smaller. A CMOS input draws almost no DC current, so CMOS fan-out is limited by load capacitance (it slows the gate), not by this formula.
PROPAGATION DELAY
is the time from the 50% point of the input edge to the 50% point of the output's HIGH-to-LOW edge. is the same for the output's LOW-to-HIGH edge. Rise and fall times are measured from 10% to 90%. If a question asks for the worst-case delay, use instead.
AVERAGE STATIC POWER OF A GATE
Assumes the output spends equal time HIGH and LOW (50% duty cycle). and are the supply currents of one gate with its output HIGH and LOW. If a datasheet gives them for a whole package, divide by the number of gates in the package.
POWER-DELAY PRODUCT
The energy per switching event. It is a figure of merit, and lower is better. Units: mW times ns gives pJ.
SWITCHING THRESHOLD OF A CMOS INVERTER
is the input voltage at which . It comes from equating the two saturation currents (square law, ). A stronger NMOS (larger ) pulls down, and a stronger PMOS pushes it up.
CONDITION FOR A SYMMETRIC INVERTER
When this holds and , , and the pull-up and pull-down strengths are equal.
INPUT THRESHOLDS OF A SYMMETRIC INVERTER
Valid only for a symmetric inverter (, , square law). and are the two points where the slope of the VTC is . Note .
DELAY FROM THE FIRST-ORDER RC MODEL
Assumes a step input. and are the effective on-resistances of the pull-down and pull-up paths (a series stack adds its resistances), and is the load capacitance. The factor 0.69 is , the time to reach the 50% point.
ENERGY DRAWN FROM THE SUPPLY PER 0-TO-1 OUTPUT TRANSITION
Assumes a full-swing output. Half of this energy is dissipated in the pull-up at once. The other half is stored on and dissipated in the pull-down at the next 1-to-0 transition.
DYNAMIC POWER OF A NODE THAT TOGGLES EVERY CYCLE
is the rate at which the output completes full LOW-HIGH-LOW cycles. For example, an inverter driven by a clock of frequency has an output that completes one full cycle per clock period. Assumes the output swings fully between the rails each time. The transistors' W/L and on-resistance do not appear, except through their own capacitance included in .
DYNAMIC POWER WITH AN ACTIVITY FACTOR
Convention used here: is the probability that the node makes a 0-to-1 transition in a given clock cycle. A clock node has . A node that changes state on every clock cycle has , because it rises only on every second cycle. For similar gates, multiply by . Some questions instead define as the probability of a transition in either direction per cycle; with that definition . Use the definition the question gives.
FUNCTION OF A STATIC CMOS GATE
In , series NMOS form a product and parallel NMOS form a sum. A single static CMOS stage can only realise an inverting (negative-unate) function: one that can be written with every input appearing only in complemented form. A function such as AND, OR or XOR needs extra inverters.
TRANSISTOR COUNT OF A SINGLE-STAGE STATIC CMOS GATE
Each appearance of an input (a literal) in the form of you build needs one NMOS and one PMOS, so factoring saves transistors: needs 8, but needs 6. Add 2 transistors for every inverter, whether it complements an input or inverts the output.
Combinational circuits: arithmetic circuits, multiplexers, decoders, code converters
Read the notesHALF ADDER
Adds two 1-bit inputs and has no carry-in. A full adder with reduces to this.
FULL ADDER
is 1 when an odd number of the three inputs are 1. is the 3-input majority function. Use the second form of when the adder is built from two half adders.
HALF SUBTRACTOR (COMPUTES A − B)
A borrow occurs only when the minuend and the subtrahend .
FULL SUBTRACTOR (A MINUS B MINUS BORROW-IN)
Computes . The difference has the same expression as the full-adder sum. The borrow is the majority function of , and . The complement goes on the minuend .
RIPPLE-CARRY ADDER DELAY
is a stage's delay from to , and is its delay from to . settles at and at . The formula assumes all , and are applied at and each stage's is ready before its carry arrives. If stage 0 is slower from than from , which is the case in a gate-level full adder, compute arrival times directly (see the worked example).
GENERATE, PROPAGATE, CARRY AND SUM
Defining gives the same carries, but then whenever . The XOR definition lets the sum reuse .
LOOK-AHEAD CARRIES (4-BIT)
Each carry is a two-level SOP of , and . has product terms, and the largest has literals.
CLA DELAY
Measured from the operand inputs: 1 level for , 2 levels (AND then OR) for every carry, and 1 XOR for every sum. This assumes every gate, XOR included, has unit delay and unlimited fan-in. The depth does not grow with , but needs -input gates, so wide adders are built from 4-bit CLA blocks.
GROUP GENERATE AND PROPAGATE (4-BIT BLOCK)
when the block produces a carry by itself, and when it passes its carry-in straight through. A second-level look-ahead unit combines the group and of four blocks with the same equations as the first level, giving , , and without ripple.
ADDER–SUBTRACTOR
Signed or unsigned operands use the same hardware. Only the reading of the flags differs.
SIGNED OVERFLOW (2'S COMPLEMENT)
is the operand actually entering the adder, not itself. Overflow is possible only when both addends have the same sign, and it occurs when the sign of the sum differs from theirs.
NUMBER RANGES (N BITS)
The sum of two n-bit unsigned numbers can need bits, because it can reach .
UNSIGNED SUBTRACTION FLAG
Applies when is computed as on unsigned operands. means a borrow, and the n-bit result is then the 2's complement of .
BCD ADDER CORRECTION
and come from a 4-bit binary adder adding two BCD digits and a carry-in. detects binary sums of 10 to 19. The maximum sum is . A second 4-bit adder adds to ; its own carry-out is ignored, and the decimal carry is .
1-BIT COMPARATOR
Exactly one of the three outputs is 1 for any input.
4-BIT MAGNITUDE COMPARATOR
Unsigned operands, with and as the MSBs. when bit of the two words is equal.
PARITY GENERATOR
makes the total count of 1s in data plus parity even. makes it odd.
PARITY CHECKER
In an even-parity system, flags an error. In an odd-parity system, flags one. The check detects any odd number of bit errors, misses any even number, and cannot locate the bit in error.
BINARY TO GRAY
This is the same as XORing the binary word with a copy of itself shifted right by one place. Needs n − 1 XOR gates, all working in parallel.
GRAY TO BINARY
Each binary bit is the running XOR of the Gray bits from the MSB down. Built as a chain, the delay is up to n − 1 XOR delays.
BCD TO EXCESS-3
Applied to each BCD digit, valid for digits 0 to 9. Excess-3 is self-complementing: complementing every bit of a digit's Excess-3 code gives the Excess-3 code of its 9's complement.
2:1 AND 4:1 MUX
is the MSB of the select code.
GENERAL MUX WITH N SELECT LINES
is the k-th minterm of the select variables and means OR. An enable input E, where present, multiplies the whole expression.
DEMUX WITH N SELECT LINES
is the k-th minterm of the select lines. A 1: DEMUX is the same circuit as an n-to- decoder whose enable input carries the data.
MUX TREE
N and k are powers of 2. Each k:1 MUX cuts the number of candidate signals by at most k − 1. When N is a power of k the division is exact and the MUXes form a full tree: 16:1 from 4:1 needs 4 + 1 = 5, 8:1 from 2:1 needs 7, 64:1 from 4:1 needs 21. Otherwise the last MUX has unused inputs: 32:1 from 4:1 needs 8 + 2 + 1 = 11. The same count holds for a 1:N DEMUX built from 1:k DEMUXes.
DECODER OUTPUTS
is the k-th minterm of the inputs. With , an active-low output is the maxterm .
FUNCTION FROM A DECODER
The decoder must be enabled. means OR, means AND, and is the active-low output line. A NOR gate on the active-high outputs of the 0-minterms also gives . Use the 0-minterm form when has more 1s than 0s, because the gate then needs fewer inputs.
8:3 ENCODER (OCTAL TO BINARY)
Valid only when exactly one input is 1. does not appear, so ' active' and 'no input active' both give 000.
4:2 PRIORITY ENCODER (D3 HIGHEST PRIORITY)
Active-high inputs and outputs. means no input is active, and should then be ignored.
ROM SIZE
n is the number of input variables (address lines) and m the number of output functions (word length). All words count, even if some input combinations never occur.
PLA PROGRAMMABLE CONNECTIONS
For n inputs, k product terms and m outputs. The AND array connects each term to any of the 2n true and complemented literals; the OR array connects each output to any term. Add m if each output has a programmable inverter.
ARRIVAL TIME AND CIRCUIT DELAY
Apply this gate by gate from the inputs to the outputs. T is the delay along the longest path.
Sequential circuits: flip-flops, counters, shift registers, state machines and timing
Read the notesCONDITION TO AVOID RACE-AROUND
= width of the HIGH clock pulse, = flip-flop propagation delay, = clock period. Applies to a level-triggered JK flip-flop in toggle mode ().
SR FLIP-FLOP
The constraint is part of the equation, because is not allowed. holds, sets, resets.
JK FLIP-FLOP
holds, resets, sets, toggles. No input combination is forbidden.
D FLIP-FLOP
The next state is the value of at the active edge, so a D flip-flop delays its input by one clock period.
T FLIP-FLOP
toggles, holds. In toggle mode the output frequency is half the clock frequency, and n toggling stages in cascade divide the clock by .
MINIMUM FLIP-FLOPS FOR N STATES
Applies to a mod-N counter and to an N-state machine with binary state encoding. The unused states must be checked for lock-out.
OUTPUT FREQUENCY OF A MOD-N COUNTER
is the rate at which the whole state repeats. In a binary mod-N counter it is also the frequency of the most significant output. Lower bits can repeat faster: in a mod-6 binary counter (0 to 5), still alternates 0, 1 on every clock, so its frequency is . The output need not have a 50% duty cycle; in a mod-5 binary counter the MSB is HIGH for 1 clock period in 5. A mod-M counter cascaded into a mod-N counter gives a mod- counter with . In a full n-bit binary (mod-) counter, bit ( for the LSB) has frequency and a 50% duty cycle.
MAXIMUM CLOCK FREQUENCY OF AN N-BIT RIPPLE COUNTER
The worst case is a transition in which all n stages change (for example 0111 to 1000 in a 4-bit up counter), which takes . The clock period must be at least this long for the count to settle, and be readable, before the next edge. If a decoder must also read the count, add its delay or strobe time : .
SYNCHRONOUS BINARY COUNTER WITH T FLIP-FLOPS
This is the up counter. Down counter: . Up/down with mode input (1 = up, 0 = down): . With JK flip-flops, use .
555 ASTABLE MULTIVIBRATOR
: an RC charge toward from to , or a discharge toward 0 from to , takes . Duty cycle , which is always above 50% in this basic circuit. Applies to the standard astable connection with the control pin unused.
555 MONOSTABLE PULSE WIDTH
charges from 0 toward , and the output falls when reaches . So . Applies with the control pin unused.
RING COUNTER WITH N FLIP-FLOPS (ONE CIRCULATING 1)
Each output is HIGH for one clock period in every n (duty cycle ). It is not self-starting without extra logic: from 0000, or from a state with two 1s, it never reaches the intended cycle.
JOHNSON COUNTER WITH N FLIP-FLOPS
Each output is a square wave with a 50% duty cycle. It is not self-starting without extra logic. In a 3-bit Johnson counter, for example, the unused states 010 and 101 switch back and forth between each other forever.
MINIMUM STATES TO DETECT ONE BIT PATTERN OF LENGTH L
Valid for both overlapping and non-overlapping detection. The states record how many pattern bits have been matched (0 to ), and a Moore machine needs one extra state whose output is 1. Minimum flip-flops = .
MAXIMUM CLOCK FREQUENCY (ZERO SKEW)
Follows from the setup constraint . Use the maximum clock-to-Q delay and the longest (critical) combinational path between any two flip-flops. Applies to synchronous counters, registers and FSMs.
HOLD CONSTRAINT (ZERO SKEW)
Uses the minimum (contamination) delays. The clock period does not appear, so slowing the clock cannot fix a hold violation. It is fixed by adding delay to the short path, or by using flip-flops with a shorter hold time or a longer minimum clock-to-Q delay.
SETUP CONSTRAINT WITH CLOCK SKEW
Positive skew gives the data extra time and relaxes setup; negative skew tightens it.
HOLD CONSTRAINT WITH CLOCK SKEW
Positive skew makes hold harder to meet; negative skew makes it easier. Skew therefore trades setup margin against hold margin.
Sample-and-hold, ADCs and DACs
Read the notesDECIMAL VALUE OF A CODE
Straight binary. The MSB has weight and the LSB has weight 1.
STEP SIZE (RESOLUTION IN VOLTS)
Convention used in these notes: is the full-scale range, i.e. the reference span. For a bipolar range to , .
IDEAL DAC OUTPUT
Ideal (zero offset, linear) straight-binary DAC. Magnitude only. An inverting op-amp output stage adds a minus sign.
FULL-SCALE (ALL-ONES) OUTPUT
The largest output the converter actually produces, one LSB below .
PERCENTAGE RESOLUTION
The step as a fraction of the full-scale (all-ones) output. Some problems use instead, meaning the step as a fraction of . Check which one the question defines.
MINIMUM NUMBER OF BITS FOR A REQUIRED RESOLUTION
From , where is the largest step allowed. If the question instead fixes the full-scale (all-ones) output , the condition is .
IDEAL ADC OUTPUT CODE (TRUNCATING)
For a converter whose code changes at integer multiples of , e.g. an SAR that keeps a bit when . Inputs at or above give the all-ones code . A rounding converter has its thresholds shifted down by , so , clamped to .
BIPOLAR DAC OUTPUT (RANGE −V_R TO +V_R)
is the unsigned value of an offset-binary code, and is the signed value of a 2's-complement code. For the same output, . The range is (offset binary , 2's complement ) to (offset binary , 2's complement ).
ACQUISITION TIME (RC CHARGING)
is the allowed error as a fraction of the step, and is the source resistance. Assumes single-pole RC settling with no slew-rate limit.
ACQUISITION TIME TO WITHIN ±1/2 LSB
Full-scale step in an -bit system. Setting , i.e. half an LSB of full scale, in the formula above gives this. Same assumptions: single-pole RC settling, no slew-rate limit.
HOLD-MODE DROOP
is the total leakage current at the hold capacitor. To keep droop over a conversion time within LSB, choose .
APERTURE-JITTER LIMIT ON INPUT FREQUENCY
An input has maximum slope , and the error (slope ) must stay within LSB. The right-hand form is for a full-scale sine, .
INPUT-FREQUENCY LIMIT WITH NO S/H
With no S/H, a full-scale sine (peak-to-peak ) must change by less than LSB during the whole conversion time . The derivation is the same as above, with in place of . A criterion of 1 LSB instead of LSB doubles this limit, so use the criterion the question states.
SAMPLING THEOREM
For a signal band-limited to . is the Nyquist rate. Sampling at exactly that rate can fail for a component at , whose samples may all fall on its zeros. An anti-aliasing low-pass filter before the S/H enforces the band limit.
APPARENT (ALIAS) FREQUENCY AFTER SAMPLING
A sinusoid at sampled at gives the same samples as one at , which lies between 0 and . If , then and there is no aliasing.
PER-CHANNEL SAMPLE RATE OF A MULTIPLEXED ADC
For channels scanned in equal turns by one ADC running at conversions per second.
INPUT-REFERRED LSB WITH PGA GAIN G
Valid while (peak input) stays within the ADC range. Beyond that, the ADC saturates.
WEIGHTED-RESISTOR DAC OUTPUT
MSB resistor , LSB resistor . Bit 1 connects its resistor to and bit 0 to ground. Ideal op-amp. With this reduces to .
R-2R LADDER DAC OUTPUT (CURRENT MODE, INVERTING)
Legs switched between virtual ground (bit 1) and ground (bit 0). Ideal op-amp. With : , and the step is .
R-2R LEG CURRENT FOR BIT K
MSB (): . LSB (): . The current drawn from the reference, , is the same for every code.
R-2R LADDER, VOLTAGE MODE (OPEN CIRCUIT)
Each leg is switched between (bit 1) and ground (bit 0), and the LSB end is terminated in to ground. The output is the open-circuit voltage at the MSB node, where the Thevenin resistance is for every code.
FLASH ADC COMPARATORS AND LADDER RESISTORS
With thresholds at integer multiples of the ladder uses equal resistors. A rounding ladder uses end resistors of and , which puts the thresholds at .
COUNTER-TYPE ADC CONVERSION TIME
The counter restarts from zero for every conversion. Some texts count one more clock for the reset and write . Use the convention the question gives.
COUNTER-TYPE ADC: COUNT FOR A GIVEN INPUT
The counter is reset to zero, adds one count per clock, and stops at the first code whose DAC output exceeds . Valid for . If the circuit stops when , the count is instead. Use the stop rule the question gives.
SAR ADC CONVERSION TIME
One clock per bit. Some descriptions add one clock to load or reset, giving . Use the convention the question gives.
SINGLE-SLOPE ADC COUNT
Ideal integrator, ramp starting at 0 V, . Unlike the dual-slope result, the count depends on , and .
DUAL-SLOPE ADC RESULT
Independent of , and the clock frequency, provided they stay constant during one conversion. Requires .
PEAK INTEGRATOR OUTPUT (END OF PHASE 1)
Integrator starting from 0 V. Choose so that a full-scale input does not saturate the op-amp.
DUAL-SLOPE CONVERSION TIME
The worst case is at . Any auto-zero phase adds to this.
DUAL-SLOPE NORMAL-MODE REJECTION
ms rejects 50 Hz and all its harmonics. ms rejects both the 50 Hz and the 60 Hz families.
OVERSAMPLING RATIO
is the signal bandwidth and the actual sampling rate.
SQNR WITH PLAIN OVERSAMPLING
Full-scale sine, white quantisation noise and an ideal digital filter, with no noise shaping. Each doubling of OSR adds 3 dB, or half a bit.
SQNR OF A FIRST-ORDER SIGMA-DELTA ADC
Linearised model, full-scale sine, . is the number of quantiser bits ( for a 1-bit loop). Each doubling of OSR adds 9 dB (1.5 bits). An -th order loop gives about dB per doubling.
QUANTISATION ERROR BOUNDS
For inputs that do not overload the converter. The usual LSB figure applies to a rounding converter.
QUANTISATION NOISE POWER AND RMS VALUE
Error uniformly distributed over one step. For a rounding quantiser the mean is zero. For a truncating one the mean is , and the variance is the same .
SQNR FOR ANY SIGNAL (UNIFORM QUANTISATION NOISE)
is the mean-square signal power, e.g. for a sine of amplitude , or for a full-scale triangle wave. Assumes no overload. The sine and uniform-signal results below are special cases.
SQNR FOR A FULL-SCALE SINE
The sine has peak-to-peak amplitude exactly (amplitude , power ), and quantisation noise is uniform. Each extra bit adds about 6 dB.
SQNR FOR A SINE BELOW FULL SCALE
For amplitude . A signal 6 dB below full scale loses about one bit of SQNR.
SQNR FOR A FULL-SCALE UNIFORMLY DISTRIBUTED SIGNAL
For a signal spread evenly over the full range, such as a full-scale triangle or sawtooth wave with power .
DYNAMIC RANGE
The ratio of full scale to one LSB. Some sources use , or full-scale signal to rms noise. The difference is negligible for large .
EFFECTIVE NUMBER OF BITS
SINAD is the measured signal-to-(noise + distortion) ratio in dB for a full-scale sine. ENOB is the of an ideal converter with the same SINAD.
DIFFERENTIAL NON-LINEARITY
is the actual step size for a DAC () or the actual code width for an ADC. An ideal converter has DNL = 0 at every code.
INTEGRAL NON-LINEARITY (END-POINT)
The deviation from the straight line through the end points, after offset and gain errors are removed. Here is the end-point LSB, , used in both DNL and INL, and . The running-sum form holds for this end-point definition. A best-fit reference line gives different, typically smaller, figures.
Memories, computer organisation, microprocessors and embedded systems
Read the notesROM 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.