Top Banner Ad
BEC302 · 2023-2422 Questions

DIGITAL SYSTEM DESIGN — 2023-24

Section A

2 Marks Each · 7 questions
Q1a2MUnit 1 — Binary arithmetic
Core Concept

What is the purpose of binary arithmetic in digital logic design?

Binary arithmetic uses only zero and one and follows place values that are powers of two. It lets digital circuits perform addition, subtraction, multiplication and division with simple switching devices. Logic gates implement carries and borrows, so arithmetic and Boolean logic share the same hardware.

Key Points

  • Uses powers of two
  • Gates implement arithmetic
  • Basis of digital processors
Q1b2MUnit 1 — signed magnitude representation
Core Concept

Explain the concept of signed magnitude representation.

Signed magnitude representation reserves the most significant bit for the sign and uses the remaining bits for the magnitude. A zero sign bit means positive and a one sign bit means negative. It is simple to read but has two representations of zero and needs special circuits for subtraction.

Key Points

  • Sign bit plus magnitude
  • Two zeros are possible
  • Simple but awkward arithmetic
Q1c2MUnit 2 — multiplexers
Survival ModePredicted

Explain the operation of a multiplexer.

A multiplexer is a combinational circuit that connects one of several data inputs to a single output. Select lines choose which input appears at the output. An N input multiplexer needs log base two of N select lines and is used for data routing and for implementing Boolean functions.

Key Points

  • Selects one of many inputs
  • Uses select lines
  • Useful for logic implementation
Q1d2MUnit 2 — half and full adders
Core Concept

How does a full adder differ from a half adder?

A half adder adds two bits and gives sum and carry, but it cannot accept a carry from an earlier stage. A full adder adds three bits: two operands plus a carry in, and produces sum and carry out. Full adders are cascaded to add multi bit binary numbers.

Key Points

  • Half adder has two inputs
  • Full adder has three inputs
  • Cascading gives multi bit addition
Q1e2MUnit 3 — Building blocks like S-R
Core Concept

What are the basic building blocks of sequential logic circuits?

The basic building blocks of sequential logic are latches and flip flops, which store one bit. Gates combine their stored states with inputs to form the next state. Clocks coordinate changes, while multiplexers, decoders and registers organise and move the stored information.

Key Points

  • Latches and flip flops store bits
  • Gates compute next state
  • Clocks coordinate updates
Q1f2MUnit 4 — fan-out
Core Concept

What is fan-out in logic families?

Fan out is the number of standard input loads that one logic gate output can drive while keeping its output voltages within valid logic levels. It is limited by output current and input current. Exceeding it causes slow edges, level violations and unreliable operation in the driven gates.

Key Points

  • Number of loads driven
  • Limited by currents
  • Exceeding it causes errors
Q1g2MUnit 5 — Specifications of DACs
Predicted

What are the key specifications of a DAC?

Key digital to analogue converter specifications include resolution, the smallest voltage change for one least significant bit; accuracy, closeness to the ideal output; linearity, deviation from a straight transfer curve; settling time; monotonicity; and full scale output. These determine precision and speed.

Key Points

  • Resolution and accuracy
  • Linearity and settling time
  • Full scale output matters

Section B

7 Marks Each · 5 questions
Q2a7MUnit 1 — Number Systems
Survival Mode

Convert the following:

  1. Hexadecimal equivalent of the decimal number 256.
  2. Decimal equivalent of (123)9(123)_9.
  3. 378.9310378.93_{10} to octal.
  4. Convert A3BHA3BH and 2F3H2F3H into binary.

Answer: (1) 256=1×162256 = 1\times 16^{2}, so 25610=10016256_{10} = 100_{16}. (2) (123)9=1×81+2×9+3=10210(123)_{9} = 1\times 81 + 2\times 9 + 3 = 102_{10}. (3) Integer part: 378=5×64+7×8+2=5728378 = 5\times 64 + 7\times 8 + 2 = 572_{8}. Fraction: 0.93×8=7.44→7;0.44×8=3.52→3;0.52×8=4.16→4;0.16×8=1.28→10.93\times 8=7.44 \rightarrow 7; 0.44\times 8=3.52 \rightarrow 3; 0.52\times 8=4.16 \rightarrow 4; 0.16\times 8=1.28 \rightarrow 1, so 378.93≈572.73418378.93 \approx 572.7341_{8}. (4) A3BH=1010001110112A3B_{H} = 1010 0011 1011_{2} and 2F3H=00101111001122F3_{H} = 0010 1111 0011_{2}.

Converting between number bases. Positional number systems differ only in their radix, which is the number of distinct digit symbols and the multiplier of each place. Decimal uses powers of ten, binary uses powers of two, octal uses powers of eight and hexadecimal uses powers of sixteen with symbols ten through fifteen written as A through F. To convert an integer from decimal to another base, repeatedly divide by the target radix and record the remainders in reverse order. To convert a fraction, repeatedly multiply the fractional part by the target radix and record the integer parts in forward order until the desired precision is reached. Conversion from binary to octal groups bits in threes from the binary point, and conversion from binary to hexadecimal groups bits in fours, because eight and sixteen are powers of two. The reverse conversion expands each octal digit into three bits or each hexadecimal digit into four bits. Converting between arbitrary bases is most safely done through decimal: expand each digit times its place value, sum the result, then use repeated division in the new base. When a calculation involves an unknown radix, the coefficients themselves must be interpreted in that radix before solving, which is why decimal coefficient values cannot be assumed. A good answer shows each conversion with the place value expansion or the division sequence, states the radix of every intermediate result and gives the final answer with the correct base subscript. Checking by expanding the result back to decimal catches arithmetic slips. Mentioning that negative numbers are handled separately by sign magnitude, ones complement or twos complement shows awareness of the limits of unsigned conversion.

256=1×162256 = 1\times 16^{2}
25610=10016256_{10} = 100_{16}
(123)9=1×81+2×9+3=10210(123)_{9} = 1\times 81 + 2\times 9 + 3 = 102_{10}
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • 256 decimal = 100 hex.
  • (123)_9 = 102 decimal.
  • 378.93 ≈ 572.7341 octal; A3BH=101000111011₂; 2F3H=001011110011₂.
Q2b7MUnit 2 — half and full adders
Survival Mode

Design a full adder by constructing the truth table and simplify the output equations.

Answer: Truth table for inputs A,B,CinA,B,C_{in}: rows 000->Sum0,Cout0; 001->1,0; 010->1,0; 011->0,1; 100->1,0; 101->0,1; 110->0,1; 111->1,1. From the Sum column, Sum=1Sum=1 for minterms 1,2,4,71,2,4,7, so Sum =A′B′Cin+A′BA' B' C_{in} + A' B C_in' +AB′+ A B' C_in' +ABCin=A+ A B C_{in} = A XOR B XOR CinC_{in}. From the Carry column, Cout=1C_{out}=1 for minterms 3,5,6,73,5,6,7; K-map simplification gives C_out = AB + B C_in + A C_in = AB + C_in(A XOR B). Circuit: one XOR for A XOR B, a second XOR with CinC_{in} for Sum, two AND gates and one OR gate for CoutC_{out}.

Adding binary digits. A half adder adds two single bits and produces a sum and a carry. Its sum output is the exclusive OR of the inputs, and its carry output is their AND. It cannot accept a carry from a previous lower position, so it cannot be used directly for multi bit addition. A full adder adds three bits: the two operands and a carry in from the previous stage. Its sum output is the exclusive OR of all three inputs, which is one when an odd number of inputs are one. Its carry out output is one when at least two inputs are one, expressed as the majority function A B plus B C in plus C in A. The truth table has eight rows and is the clearest way to verify both equations. A full adder can be constructed from two half adders and an OR gate: the first half adder adds A and B, the second adds its sum to the carry in, and the OR of the two half adder carries gives the final carry. It can also be implemented entirely with NAND gates by converting the exclusive OR and AND functions using De Morgan's theorem. A good answer builds the truth table, derives or verifies the minimized expressions, draws the two half adder construction and explains the NAND implementation. Mentioning that cascading full adders gives a ripple carry adder, whose delay grows with bit width, connects the component to the larger system. A note that carry look ahead adders remove this bottleneck by computing carries in parallel shows where the design leads.

+ABCin=A+ A B C_{in} = A
Cout=1C_{out}=1
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • Sum = A XOR B XOR C_in.
  • C_out = AB + B C_in + A C_in.
  • Truth table has eight input combinations.
Q2c7MUnit 3 — Building blocks like S-R
Survival ModePredicted

Describe the operation of various flip-flops, including S-R, JK, D, and T flip-flops.

Answer: SR FF:S=1FF: S=1 sets, R=1R=1 resets, S=R=0S=R=0 holds, S=R=1S=R=1 invalid; Q+=S+R′QQ+=S+R'Q with SR=0.DFF:Q+=DSR=0. D FF: Q+=D; the input is sampled at the active edge, making it ideal for registers. JK FF:J=1,K=0FF: J=1,K=0 sets; J=0,K=1J=0,K=1 resets; J=K=0J=K=0 holds; J=K=1J=K=1 toggles; Q+=JQ′+K′Q.TFFQ+=JQ'+K'Q. T FF: a JK with J=K=T;T=0J=K=T; T=0 holds, T=1T=1 toggles, so Q+=TQ+=T XOR Q. It is the basic element for counters. A T FF can be obtained from a D FF by D = T XOR Q, and from a JK FF by tying J and K to T. Edge-triggered versions avoid race-around.

Storage elements for sequential logic. A flip flop is a bistable circuit that stores one bit of information. Unlike combinational logic, its output depends on both present inputs and past history, which is why it is the basic building block of sequential systems. The S R flip flop has set and reset inputs. Setting makes the output one, resetting makes it zero, and holding both inactive preserves the previous state. The combination that asserts both inputs is forbidden because it forces complementary outputs to the same value and leads to an unpredictable state when the inputs are released. The D flip flop removes this problem by using a single data input. On the active clock edge the output copies the data input, and between edges it holds that value. The J K flip flop behaves like an S R device but defines the previously forbidden combination as a toggle operation. Its characteristic equation expresses the next output as J times the complement of the present output plus the complement of K times the present output. The T flip flop toggles its output whenever its input is one and holds it when the input is zero. Edge triggered devices sample inputs only at a clock transition, which makes timing predictable and avoids the race around problem of level sensitive designs. A good answer describes each device with its truth or excitation table, explains the characteristic behaviour and gives the characteristic equations where appropriate. Mentioning setup and hold time, which specify how long data must be stable around the clock edge, relates the abstract tables to real hardware. A comparison of edge triggered and level triggered operation shows why modern synchronous designs prefer edge triggering.

FF:S=1FF: S=1
Q+=S+R′QQ+=S+R'Q
SR=0.DFF:Q+=DSR=0. D FF: Q+=D
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • SR, D, JK and T are the standard 1-bit storage elements.
  • Equations: Q+=S+R'Q; Q+=D; Q+=JQ'+K'Q; Q+=T XOR Q.
  • T FF is obtained from JK by J=K=T and is used in counters.
Q2d7MUnit 4 — CMOS families and their interfacing
Core Concept

Draw a circuit diagram of a CMOS inverter. Draw its transfer characteristics and explain its operation.

Answer: Circuit: pMOS source at VDDV_{DD}, drain at output; nMOS source at ground, drain at output; common gate at VinV_{in}. Operation: Vin=0V_{in}=0 turns pMOS ON and nMOS OFF, so Vout=VDD;Vin=VDDV_{out}=V_{DD}; V_{in}=V_{DD} turns pMOS OFF and nMOS ON, so Vout=0V_{out}=0. The transfer characteristic VoutV_{out} versus VinV_{in} is a steep descending curve. For 0<Vin<VTn0 \lt V_{in} \lt V_{Tn} the output stays at VDDV_{DD}; for VTn<Vin<VDD−∣VTp∣V_{Tn} \lt V_{in} \lt V_{DD}-\vert V_{Tp}\vert both devices conduct; at Vin≈VDD/2V_{in} \approx V_{DD}/2 both saturate and the gain is maximum; near VDDV_{DD} the nMOS is linear and output approaches 0. The switching point VMV_{M} and the slope define noise margins. CMOS has high input impedance, low static power and rail-to-rail swing.

The complementary metal oxide semiconductor inverter. A complementary metal oxide semiconductor inverter uses one n channel transistor and one p channel transistor connected in series between the supply and ground, with their gates tied together as the input and their drains tied together as the output. When the input is low, the n channel device is off and the p channel device is on, so the output is pulled up to the supply. When the input is high, the p channel device is off and the n channel device is on, so the output is pulled down to ground. Only one device conducts in either steady state, which is why static power dissipation is extremely small. The voltage transfer characteristic plots output voltage against input voltage. It has five regions: output high with the n device off, a transition where the n device saturates and the p device is linear, the switching point where both are saturated, a region where the n device is linear and the p device saturates, and output low with the p device off. The switching threshold occurs near half the supply when device strengths are balanced. Noise margins are the differences between the input and output logic levels at the points where the transfer curve has unity gain. A good answer draws the circuit and the transfer characteristic, explains each region and defines noise margin, propagation delay and power. Mentioning that complementary metal oxide semiconductor logic has high input impedance, high packing density and low static power but is sensitive to electrostatic discharge gives a balanced specification. A note that dynamic power grows with switching frequency and load capacitance explains why power is not zero in real operation.

Vin=0V_{in}=0
Vout=VDD;Vin=VDDV_{out}=V_{DD}; V_{in}=V_{DD}
Vout=0V_{out}=0
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • One pMOS pull-up and one nMOS pull-down.
  • VTC is an inverse S-curve with maximum gain near V_DD/2.
  • Rail-to-rail output, low static power and high noise margin.
Q2e7MUnit 5 — switched capacitor circuits: Basic concept
Survival Mode

Explain switched capacitor and give its applications.

Answer: A switched-capacitor circuit replaces a resistor by a capacitor that is alternately connected to two nodes by MOS switches driven by a clock. During each clock period T=1/fsT=1/f_{s}, charge Q=C(V1−V2)Q=C(V1-V2) is transferred, giving an average current I=C(V1−V2)fsI = C(V1-V2)f_{s}. Hence the circuit behaves like an equivalent resistance Req=1/(Cfs)R_{eq} = 1/(C f_{s}). The resistance is set by capacitor ratio and clock frequency rather than an absolute resistor value, so it is accurate in IC form. Applications: SC filters (low-pass, high-pass, biquad), sample-and-hold circuits, pipelined and sigma-delta ADCs, DACs, charge pumps, switched-capacitor voltage regulators and capacitive sensor interfaces.

Switched capacitor circuits. A switched capacitor circuit replaces a resistor with a capacitor that is repeatedly connected between two nodes by metal oxide semiconductor switches driven by non overlapping clocks. During one clock phase the capacitor is charged to the voltage at the first node. During the opposite phase it is connected to the second node and transfers charge. The average current equals the capacitance times the voltage difference times the switching frequency, so the circuit behaves like a resistor whose value is the reciprocal of capacitance times frequency. This equivalent resistance can be made large with a small capacitor if the clock frequency is moderate, which is difficult to achieve with a physical on chip resistor. Switched capacitor techniques are used in filters, integrators, sample and hold circuits, analogue to digital converters and programmable gain stages. Their accuracy depends on capacitor ratios, which are controlled very precisely in integrated circuit fabrication, rather than on absolute resistor values. Important practical considerations include clock feedthrough, charge injection from the switches, finite switch resistance and the need for non overlapping clocks to prevent simultaneous conduction. A good answer explains the two phase operation, derives the equivalent resistance expression, gives a simple integrator or filter example and lists applications. Mentioning that the technique works best at low and moderate frequencies because the switches must settle each cycle shows its limits. A note that the effective resistance can be adjusted electronically by changing the clock frequency explains why the method is so useful in programmable analogue systems.

T=1/fsT=1/f_{s}
Q=C(V1−V2)Q=C(V1-V2)
I=C(V1−V2)fsI = C(V1-V2)f_{s}
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • Charge transferred per clock gives I=C(V1-V2)f_s.
  • Equivalent resistance R_eq=1/(C f_s).
  • Used in filters, ADCs/DACs, sample-and-hold and charge pumps.

Section C

7 Marks Each · 10 questions
Q3a7MUnit 1 — Karnaugh maps up to 5 variables
Survival Mode

Use Karnaugh maps to simplify the Boolean function: F(A,B,C,D)=∑(1,2,4,6,9,10,11,12,13,14,15)F(A, B, C, D) = \sum(1, 2, 4, 6, 9, 10, 11, 12, 13, 14, 15).

Answer: Plot the minterms on a 4-variable K-map. Best groups: {1,9} gives B′C′DB'C'D; {2,10} gives B′CD′B'CD'; {4,6} gives A′BD′A'BD'; {12,13,14,15} gives AB; {10,11,14,15} gives AC. These five groups cover all listed minterms: 1 by B′C′D;2B'C'D; 2 by B′CD′;4,6B'CD'; 4,6 by A′BD′;12,13A'BD'; 12,13 by AB;10,11,14,15AB; 10,11,14,15 by AC and AB. Hence F=B′C′D+B′CD′+A′BD′+AB+F = B'C'D + B'CD' + A'BD' + AB + AC.

Minimising logic with a Karnaugh map. A Karnaugh map is a grid representation of a truth table arranged so that cells which differ in only one variable are physically adjacent, including the wraparound from the last column to the first and from the last row to the first. A four variable function uses sixteen cells labelled by Gray code, where consecutive labels change in one bit only. Each minterm given in the sum of products is marked with a one, and each don't care term is marked with a dash because it may be used as either zero or one. Groups are then formed of two, four, eight or sixteen adjacent cells, always a power of two and always rectangular. Larger groups eliminate more variables, so the goal is the fewest possible groups and the largest possible size. Don't care cells are used only when they enlarge a group and may be left unused. For each group, variables that take both values within the group cancel, while variables that remain constant appear in the product term, in complemented form when the constant is zero. The sum of these product terms is the minimized function. A practical example with ones at minterms one, two, four, six, nine, ten, eleven, twelve, thirteen, fourteen and fifteen yields a small set of groups whose terms cover every one and no zero. A good answer draws the map, labels rows and columns with Gray code, marks ones and don't cares, circles the groups and writes the resulting Boolean expression. It should then implement that expression with AND, OR and NOT gates or with universal gates. Mentioning that Karnaugh maps are convenient up to about five variables but become unwieldy beyond that explains when the Quine McCluskey method is preferred.

F=B′C′D+B′CD′+A′BD′+AB+F = B'C'D + B'CD' + A'BD' + AB +
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • Groups: {1,9}, {2,10}, {4,6}, {12-15}, {10,11,14,15}.
  • F = B'C'D + B'CD' + A'BD' + AB + AC.
  • All eleven minterms are covered.
Q3b7MUnit 1 — review of Boolean algebra and Demorgans theorem
Core Concept

State and Prove Demorgan's theorem.

Answer: De Morgan's theorems are (A+B)′=A′B′(A+B)' = A'B' and (AB)′=A′+B′(AB)' = A' + B'. Proof by truth table: for every combination of A and B, the left and right sides give identical columns. Algebraic proof of the first: let X=A+BX=A+B, then X′=1X' = 1 iff A=B=0A=B=0, which is exactly A′B′=1A'B'=1; for all other cases A+B=1A+B=1 so X′=0X'=0 while A′B′=0A'B'=0. The second follows by complementing the first and replacing A by A′,BA', B by B′B'. For n variables: (A1+A2+...+An)' = A1'A2'...An' and (A1A2...An)' = A1'+A2'+...+An'. These theorems convert SOP to POS and are used to realise functions with NAND/NORNAND/NOR gates.

De Morgan's theorems and universal gates. De Morgan's theorems provide a way to move complementation through Boolean expressions. The first theorem states that the complement of a sum of variables equals the product of their complements. The second states that the complement of a product equals the sum of their complements. In words, the complement of an OR operation is an AND of the inverted inputs, and the complement of an AND operation is an OR of the inverted inputs. The theorems extend to any number of variables and can be proved by constructing a truth table with columns for the left side and the right side and showing that every row agrees. They can also be proved algebraically using the complement laws and distributivity. Their practical value is that a circuit using only NAND gates or only NOR gates can realise any Boolean function. A NAND gate is an AND followed by an inversion, and a NOT gate is made by tying both NAND inputs together. An AND gate is a NAND followed by a NOT, an OR gate is a NAND with inverted inputs, and a NOR gate is a NAND with its output inverted. The NOR family gives the dual constructions. To implement an exclusive OR with NAND gates, one first expresses it as A times not B plus not A times B, generates the needed complements with NAND inverters, forms the two product terms and combines them with a final NAND used as an OR by De Morgan's theorem. A good answer states and proves both theorems, derives each basic gate from the universal gate and draws or describes the NAND only exclusive OR circuit. Mentioning that universal gates reduce inventory and are easy to fabricate in complementary metal oxide semiconductor technology gives the engineering motivation.

(A+B)′=A′B′(A+B)' = A'B'
(AB)′=A′+B′(AB)' = A' + B'
X′=1X' = 1
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • (A+B)' = A'B' and (AB)' = A'+B'.
  • Verified by truth table and complement reasoning.
  • General n-variable form; used for NAND/NOR conversion.
Q4a7MUnit 2 — half and full adders
Core Concept

Implement a full adder using NAND gates.

Answer: A NAND-only full adder uses the NAND realisation of XOR. Let X = A XOR B = NAND(NAND(A,NAND(A,B)), NAND(B,NAND(A,B))) (four NANDs). Sum = X XOR CinC_{in}, realised with another four NANDs. Carry: Cout=AB+CinX=C_{out} = AB + C_{in} X = NAND(NAND(A,B), NAND(C_in,X)) Thus the complete adder needs nine 2-input NAND gates (four for X, four for Sum, one more pair for carry, with sharing of N1=AB') More compactly: N1=(AB)'; N2=(A N1)'; N3=(B N1)'; X=(N2 N3)'; P=(X C_in)'; Q=(A C_in)'; Sum=(X XOR C_in) using NANDs as above; Cout=NAND(N1,P)C_{out}=NAND(N1,P). This works because NAND is universal.

Adding binary digits. A half adder adds two single bits and produces a sum and a carry. Its sum output is the exclusive OR of the inputs, and its carry output is their AND. It cannot accept a carry from a previous lower position, so it cannot be used directly for multi bit addition. A full adder adds three bits: the two operands and a carry in from the previous stage. Its sum output is the exclusive OR of all three inputs, which is one when an odd number of inputs are one. Its carry out output is one when at least two inputs are one, expressed as the majority function A B plus B C in plus C in A. The truth table has eight rows and is the clearest way to verify both equations. A full adder can be constructed from two half adders and an OR gate: the first half adder adds A and B, the second adds its sum to the carry in, and the OR of the two half adder carries gives the final carry. It can also be implemented entirely with NAND gates by converting the exclusive OR and AND functions using De Morgan's theorem. A good answer builds the truth table, derives or verifies the minimized expressions, draws the two half adder construction and explains the NAND implementation. Mentioning that cascading full adders gives a ripple carry adder, whose delay grows with bit width, connects the component to the larger system. A note that carry look ahead adders remove this bottleneck by computing carries in parallel shows where the design leads.

Cout=AB+CinX=C_{out} = AB + C_{in} X =
Cout=NAND(N1,P)C_{out}=NAND(N1,P)
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • Realise XOR with four NAND gates.
  • Sum = (A XOR B) XOR C_in.
  • C_out = NAND((AB)', C_in(A XOR B)) = AB + C_in(A XOR B).
Q4b7MUnit 2 — MSI devices like comparators
Survival ModePredictedRepeated

Design 2-bit magnitude comparator.

Answer: A magnitude comparator compares two binary numbers and produces A>B, A=BA=B and A< B outputs. For two-bit numbers A=A1A0A=A1A0 and B=B1B0B=B1B0, let X1 = A1 XNOR B1 and X0 = A0 XNOR B0. Equality: A=B=X1X0A=B = X1 X0. Greater than: A>B =A1B1′+X1A0B0′A1 B1' + X1 A0 B0'. Less than: A< B=A1′B1+X1A0′B0B = A1' B1 + X1 A0' B0. Circuit: generate X1 and X0 with XNOR gates; feed them into AND gates with the appropriate bit comparisons; OR the two product terms for each of the greater and less outputs. These equations come directly from comparing the most significant bit first and using the less significant bit only when the MSBs are equal.

Comparing two bit patterns. A magnitude comparator is a combinational circuit that compares two binary numbers and produces outputs indicating whether one is greater than, equal to or less than the other. It has no memory: the result depends only on the present input values. For a single bit comparison, the greater output is A and not B, the equality output is the exclusive NOR of A and B, and the less output is not A and B. For two bit numbers A one A zero and B one B zero, comparison starts with the most significant bit. If A one is one and B one is zero, A is greater regardless of the lower bits. If A one is zero and B one is one, A is less. Only when the most significant bits are equal does the circuit inspect the least significant bits using the single bit equations. The equality output is one when both corresponding bits are equal, which is the AND of the two exclusive NOR results. The greater output is the OR of the term for a higher most significant bit and the term where the most significant bits are equal but A zero exceeds B zero. The less output is formed symmetrically. Cascading inputs allow several comparator chips to be connected for wider words by passing the result of lower order bits to the next stage. A good answer defines the device, gives the truth relationship for each bit position, derives the three output equations and draws the gate level circuit. Mentioning that comparison is central to sorting, branch decisions in processors and threshold detection shows why the circuit matters. A table of representative input pairs and outputs makes the behaviour immediately clear.

A=A1A0A=A1A0
B=B1B0B=B1B0
A=B=X1X0A=B = X1 X0
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • X1=A1 XNOR B1; X0=A0 XNOR B0.
  • A=B = X1X0.
  • A>B=A1B1'+X1A0B0'; A<B=A1'B1+X1A0'B0.
Q5a7MUnit 3 — Finite state machines: Mealy and Moore machines
Survival Mode

Compare and contrast Mealy and Moore machines and discuss their applications in digital systems design.

Answer: A Mealy machine output depends on present state and inputs: Z = f(state,input)f(\text{state}, \text{input}). A Moore machine output depends only on present state: Z = f(state)f(\text{state}). Mealy outputs can change immediately with inputs, giving faster response but possible glitches; Moore outputs change at clock edges and are more stable. Mealy usually requires fewer states, Moore more. Applications: Mealy is used in high-speed controllers and sequence detectors where fast response matters; Moore is used in counters, displays and safety circuits where stable outputs matter. Both are represented by state diagrams and state tables and are implemented with flip-flops plus combinational next-state and output logic.

Mealy and Moore state machines. A finite state machine is a sequential circuit whose behaviour is described by a finite set of states, transitions between them and outputs associated with states or transitions. It is specified by a state diagram or state table and implemented with flip flops to hold the present state plus combinational logic to compute the next state and outputs. The two common models differ in how outputs are generated. In a Moore machine the output depends only on the present state, so outputs stay stable for the whole clock cycle in which a state is occupied and change only at state transitions. In a Mealy machine the output depends on both the present state and the current inputs, so it can change within a clock cycle when an input changes. A Mealy design often needs fewer states because the input can be encoded in the output logic, but it can propagate input glitches to the output. A Moore design is more synchronous and easier to time, but may need an extra state to reproduce the same behaviour and can respond one clock later. Both machines are converted to hardware by assigning binary codes to states, deriving the next state equations from the transition table and deriving output equations from the output column. A good answer compares the two models in a table, gives an example such as sequence detection, draws or describes the state diagrams and states typical applications. Mentioning that Mealy machines suit high speed controllers where immediate response matters, while Moore machines suit stable display or protocol outputs, shows design judgement. A note that the number of flip flops is the ceiling of the log⁡\log of the number of states ties the abstract model to hardware cost.

f(state,input)f(\text{state}, \text{input})
f(state)f(\text{state})
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • Mealy: output depends on state and input; Moore: state only.
  • Mealy is faster but may glitch; Moore is stable.
  • Applications depend on speed versus output stability.
Q5b7MUnit 3 — edge triggered FF
Core Concept

Explain positive edge triggered D-flip-flop with the help of circuit diagram and waveforms.

Answer: A positive edge-triggered D FF captures D only at the LOW-to-HIGH transition of the clock. It can be built from three SR latches: two latches form a master-slave pair with opposite enables and input steering uses D and D′D'. When CLK=0CLK=0 the master is transparent and the slave holds; when CLK rises the master closes and the slave opens, transferring the sampled D to Q. Thus Q(t+) = D sampled at the rising edge and is unchanged at other times. Waveforms: plot CLK, D and Q; Q follows D only at each rising edge. Setup time tsut_{su} and hold time tht_{h} around the edge must be met; propagation delay tpdt_{pd} is the clock-to-Q delay. Edge triggering avoids race-around and is used in synchronous designs.

The positive edge triggered D flip flop. A D flip flop stores the value present at its data input at a precise instant. In a positive edge triggered device, that instant is the transition of the clock from zero to one. Changes in the data input at other times do not affect the stored output, so the circuit is immune to level sensitive transparency problems. Internally the device can be built from a master and a slave latch enabled on opposite clock phases, or from three input gates and an SR latch in the classic edge triggered construction. During the clock low phase the master follows the data while the slave is disabled. At the rising edge the master is disabled and the slave is enabled, transferring the captured value to the output. The waveform therefore shows the output changing shortly after each rising edge and holding steady until the next one. Setup time requires data to be stable before the edge, and hold time requires it to remain stable after the edge; violating either leads to metastability or an incorrect stored bit. A good answer explains the circuit operation phase by phase, draws the clock, data and output waveforms and marks the sampling instants. It should state the characteristic equation that the next output equals D and mention asynchronous preset and clear inputs if present. Mentioning that edge triggering allows many storage elements to be synchronised to a single clock is the reason synchronous systems use it. A note that propagation delay from clock to output limits the maximum operating frequency ties the waveform to real timing.

CLK=0CLK=0
tsut_{su}
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • Q changes only at the rising clock edge: Q+ = D.
  • Master-slave structure with complementary enables.
  • Setup/hold times and clock-to-Q delay define timing.
Q6a7MUnit 4 — TTL NAND gate
Survival ModePredicted

Explain the characteristics and specifications of TTL NAND gates, including noise margin, propagation delay, fan-in, and fan-out.

Answer: A standard TTL NAND uses a multi-emitter input transistor and a totem-pole output. Typical 74-series specs (V_CC=5 V): VIH(min⁡)=2.0V,VIL(max⁡)=0.8V,VOH(min⁡)=2.4V,VOL(max⁡)=0.4VV_{IH}(\min)=2.0 V, V_{IL}(\max)=0.8 V, V_{OH}(\min)=2.4 V, V_{OL}(\max)=0.4 V. Hence NMH=2.4−2.0=0.4VNM_{H}=2.4-2.0=0.4 V and NML=0.8−0.4=0.4VNM_{L}=0.8-0.4=0.4 V. Propagation delay is about 10 ns, power about 10 mW/gate, so the speed-power product is about 100 pJ. Fan-in is usually 2 to 8 inputs; fan-out for standard TTL is 10 standard loads (I_OL=16 mA, I_IL=1.6 mA). TTL is fast and robust but consumes more power than CMOS. LS and ALS subfamilies reduce power while retaining TTL levels.

Transistor transistor logic characteristics. Transistor transistor logic, usually abbreviated TTL, is a family of digital integrated circuits built from bipolar junction transistors. The standard TTL NAND gate uses a multi emitter input transistor, a phase splitter and a totem pole output stage. It is called saturated logic because transistors are driven between cutoff and saturation. Important specifications define how the device behaves in a real system. Noise margin is the difference between the guaranteed output level and the required input level, and it measures immunity to unwanted voltage spikes. Propagation delay is the time from a change at the input reaching halfway to the corresponding output change reaching halfway, and it limits switching speed. Fan in is the number of inputs a gate accepts, while fan out is the number of standard loads the output can drive without violating logic levels. Power dissipation is the supply current times the supply voltage and is higher than complementary metal oxide semiconductor logic, especially in standby. The speed power product combines delay and power into one figure of merit. A good answer defines each characteristic with its unit and explains how it influences system design. It should state typical logic thresholds qualitatively, note that a totem pole output sources and sinks current, and mention that open collector outputs allow wired logic and level shifting. Mentioning that low power and Schottky variants trade speed against power shows how the family evolved. A comparison with complementary metal oxide semiconductor logic on power, speed and noise makes the discussion complete.

NMH=2.4−2.0=0.4VNM_{H}=2.4-2.0=0.4 V
NML=0.8−0.4=0.4VNM_{L}=0.8-0.4=0.4 V
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • TTL logic levels: V_IH=2.0 V, V_IL=0.8 V, V_OH=2.4 V, V_OL=0.4 V.
  • Noise margin about 0.4 V; t_pd about 10 ns.
  • Fan-in 2-8; fan-out 10 for standard TTL.
Q6b7MUnit 4 — concept of programmable logic devices such as FPGA
Core Concept

Describe the concept of programmable logic devices (PLDs) and explain how they are used for logic implementation in digital systems.

Answer: A PLD is an IC whose logic functions are configured after manufacture. The basic idea is a programmable array of AND gates and OR gates: a truth table or SOP expression is programmed by making/breaking fuse links (or using EEPROM/flash switches). PROM has a fixed decoder and programmable OR plane; PLA has both planes programmable; PAL has programmable AND and fixed OR. CPLDs extend PLA/PALPLA/PAL with many macrocells and flip-flops; FPGAs contain configurable logic blocks (look-up tables and flip-flops), programmable interconnect and I/OI/O blocks. Design flow: write HDL, synthesise to gates/LUTs, place and route, then program the device. PLDs replace many SSI/MSISSI/MSI chips, reduce board space and allow field upgrades.

Programmable logic devices. A programmable logic device is a general purpose integrated circuit whose internal connections can be configured to implement a chosen logic function. It reduces the need to design and manufacture a custom chip for every small digital subsystem. The simplest family is the programmable read only memory, in which a fixed AND array generates all minterms and a programmable OR array selects which minterms form each output. A programmable logic array has both the AND array and the OR array programmable, which is flexible but slower because both arrays use programmable links. A programmable array logic device has a programmable AND array and a fixed OR array, which is faster and cheaper but less flexible. Complex programmable logic devices combine several such blocks with programmable interconnect, while field programmable gate arrays contain many configurable logic blocks, input output blocks and a programmable routing fabric. Configuration is stored on chip in fuses, antifuses, electrically erasable memory or static memory loaded at power up. Designers describe the function in a hardware description language, and synthesis tools map it to the available resources. A good answer defines programmable logic devices, explains the fixed and programmable arrays in each family, describes the design flow from description to configuration and gives applications such as glue logic, address decoding, prototypes and rapid product development. Mentioning that field programmable gate arrays can be reprogrammed makes them ideal for iterative development, while application specific integrated circuits become economical only at high volume shows the tradeoff clearly.

PLA/PALPLA/PAL
I/OI/O
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • PLDs implement logic by programmable AND/OR arrays or LUTs.
  • Types: PROM, PLA, PAL, CPLD, FPGA.
  • HDL synthesis and programming replace fixed hardware.
Q7a7MUnit 5 — R-2R ladder
Survival ModePredicted

Explain the principle of operation of an R-2R ladder DAC.

Answer: An R-2R ladder DAC consists of a repeating network of series R and shunt 2R branches. Each bit controls a switch that connects its branch either to VrefV_{ref} or to ground (virtual ground of an op-amp summing node). Looking into any node toward the terminated end, the equivalent resistance is R, so each successive branch halves the current entering the summing node. Therefore bit i contributes weight Vref/2iV_{ref}/2^{i}. The op-amp converts the summed current to a voltage: V_out = -V_ref (b_{n-1}/2 + b_{n-2}/4 + ... + b_0/2^n) for an inverting configuration. Only R and 2R values are needed, giving high accuracy and easy IC fabrication.

The R two R ladder digital to analogue converter. A digital to analogue converter turns a binary word into a proportional analogue voltage or current. The R two R ladder is preferred over a binary weighted resistor network because it uses only two resistor values. The network is built from repeating sections: a series resistor R along the ladder and a shunt resistor two R to ground at each node. Looking into any node toward the termination, the equivalent resistance is two R regardless of position, because the parallel combination of two R with the rest of the ladder repeatedly reduces to R. This self similar property means each bit contributes a current that is exactly half the contribution of the more significant bit. The ladder is terminated at one end by two R, which preserves the ratio. In a voltage mode ladder, switches connect each bit either to the reference voltage or to ground, and the output is taken from the terminated end through a buffer. In a current mode ladder, switches steer the bit currents to the output or to ground, and a transimpedance amplifier converts the summed current to a voltage. The output is proportional to the digital code divided by two to the number of bits times the reference voltage. A good answer explains the ladder structure, shows why the resistance looking in is constant, derives the halving of bit weights and gives the output equation. Mentioning that using only R and two R avoids the huge spread of resistor values needed in binary weighted networks, which improves accuracy and manufacturability, is the central advantage. A note that an output buffer prevents the load from changing the ladder ratios completes the practical discussion.

VrefV_{ref}
Vref/2iV_{ref}/2^{i}
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • Repeating R-2R network gives binary-weighted currents.
  • Each branch halves the current toward the LSB.
  • V_out is proportional to the binary code; only two resistor values.
Q7b7MUnit 5 — successive approximation
Core Concept

Describe the principle of operation of a successive approximation ADC.

Answer: A successive-approximation (SAR) ADC consists of a sample-and-hold, a comparator, a DAC and a successive-approximation register. On conversion start, the SAR sets the MSB to 1 and all other bits to 0; the DAC produces half-scale voltage. The comparator decides whether VinV_{in} is greater; if yes the MSB is kept, otherwise cleared. The next bit is then tried, and the process continues bit by bit down to the LSB. After n clock cycles the SAR holds the best n-bit approximation of VinV_{in}, and the conversion-complete signal is asserted. It is a feedback (trial-and-error) ADC with fixed conversion time nTclknT_{clk}, good resolution and moderate speed, widely used in data acquisition.

Successive approximation analogue to digital conversion. A successive approximation register converter finds the digital code for an input by a binary search. It contains a sample and hold circuit, a digital to analogue converter, a comparator, a successive approximation register and control logic. Conversion begins by holding the input steady. The register sets the most significant bit to one and all lower bits to zero, so the digital to analogue converter produces half the reference voltage. The comparator decides whether the input is greater than this trial voltage. If it is, the bit is kept; otherwise it is cleared. The converter then sets the next bit to one and repeats the comparison with the refined trial voltage. This continues one bit at a time until the least significant bit has been decided. An N bit conversion therefore takes N clock periods, plus a small acquisition and output time. The method is much faster than a dual slope converter but slower than a flash converter, and it offers a good compromise between speed, cost and resolution. Accuracy depends on the linearity of the digital to analogue converter and the offset of the comparator. A good answer describes each block, traces the binary search with a short numerical example and states that conversion time is N times the clock period. Mentioning that the sample and hold is essential because the input must not change during conversion shows understanding of the complete system. A note that the digital to analogue converter output approaches the input from alternating sides explains the meaning of the successive approximation name.

VinV_{in}
nTclknT_{clk}
Tip from Examiner: State the circuit or conversion principle, show the table, equation or calculation with symbols defined, and support the answer with a labelled diagram or waveform where required.

Key Points

  • Blocks: sample-hold, comparator, DAC and SAR.
  • Tests each bit from MSB to LSB using binary search.
  • Conversion takes n clock cycles, independent of input amplitude.