Combinational Circuits
Subject: Hardware Chapter: 3.3 Combinational Circuits Difficulty Level: 2 (Recall — definitions, standard textbook problems, short derivations) Time Limit: 30 minutes Total Marks: 40
Instructions: Answer all questions. Show working where derivations are required. Use for XOR, for AND, for OR.
Q1. [3 marks] Write the Boolean expressions for the Sum and Carry outputs of a half adder with inputs and .
Q2. [4 marks] For a full adder with inputs , and carry-in , write the expressions for Sum and Carry-out . State how many half adders and OR gates are needed to build one full adder.
Q3. [4 marks] A 4-bit ripple-carry adder is built from full adders, each having a gate delay of for its carry output. Compute the worst-case time to produce the final carry-out . Explain briefly why ripple-carry adders are slow.
Q4. [5 marks] For a carry-lookahead adder, define the generate and propagate signals in terms of and . Write the expression for carry and in terms of , and .
Q5. [4 marks] Explain how a full subtractor differs from a full adder. Write the Boolean expressions for the Difference and Borrow-out of a full subtractor with inputs , , .
Q6. [4 marks] A 4:1 multiplexer has data inputs – and select lines . Write the output expression as a sum-of-products of the select lines and data inputs.
Q7. [4 marks] Distinguish between a decoder and a demultiplexer. State the number of output lines of a 3-to-8 decoder and how many of them are active for any given input.
Q8. [4 marks] Explain the function of a priority encoder and how it differs from an ordinary encoder. For an 8-to-3 priority encoder, if inputs and are both HIGH, what is the 3-bit output?
Q9. [4 marks] Design an even parity generator for a 3-bit data word . Write the expression for the parity bit . What value of is generated for the input ?
Q10. [4 marks] Define a static-1 hazard in a combinational circuit. State one general method used to eliminate such hazards.
Answer keyMark scheme & solutions
Q1. [3 marks]
- (1.5)
- (1.5)
Why: Sum is 1 when inputs differ (XOR); carry is generated only when both are 1 (AND).
Q2. [4 marks]
- (1.5)
- (or ) (1.5)
- Built from 2 half adders + 1 OR gate (1)
Why: First HA adds ; second HA adds their sum with ; OR combines the two intermediate carries.
Q3. [4 marks]
- Carry ripples through 4 stages, each : (2)
- Slow because each stage's carry-out depends on the previous stage's carry-in, so the carry must propagate sequentially through all stages — delay grows linearly with word length. (2)
Q4. [5 marks]
- (1)
- (or ) (1)
- (1.5)
- (1.5)
Why: A carry is produced if generated at that bit, or propagated from a lower carry. Expanding recursively removes ripple dependency → constant depth.
Q5. [4 marks]
- A full subtractor computes producing a borrow instead of a carry; it uses a borrow-in/borrow-out. (1)
- (1.5)
- (or ) (1.5)
Why: Difference mirrors adder sum; borrow arises when the minuend bit is smaller than subtrahend + incoming borrow.
Q6. [4 marks] Each correct product term (1 each).
Why: Each select combination enables exactly one data input onto the output.
Q7. [4 marks]
- Decoder: activates one output line based on binary input code (no data input). Demultiplexer: routes a single data input to one of several outputs selected by control lines. (A decoder = demux with data input tied to enable.) (2)
- 3-to-8 decoder has 8 output lines, and exactly 1 output is active for any input. (2)
Q8. [4 marks]
- A priority encoder outputs the binary code of the highest-priority active input, resolving the ambiguity when multiple inputs are HIGH (ordinary encoder gives invalid output for multiple inputs). (2)
- (higher priority than ) wins → output = binary = . (2)
Q9. [4 marks]
- Even parity: total number of 1s (data + parity) must be even, so . (2)
- For input : , so . (2)
Why: Data already has two 1s (even), so parity bit is 0 to keep it even.
Q10. [4 marks]
- A static-1 hazard is a momentary transient (glitch) to 0 on an output that should remain steady at 1 while inputs change, caused by unequal path delays. (2)
- Eliminated by adding redundant (consensus) prime-implicant terms to cover the transition between adjacent groups in the K-map. (2)
[
{"claim":"4-bit RCA final carry delay = 8*delta", "code":"delta=symbols('delta'); result = (4*2*delta) == 8*delta"},
{"claim":"Full subtractor difference for A=1,B=0,Bin=1 is 0", "code":"A,B,Bin=1,0,1; result = ((A ^ B ^ Bin)==0)"},
{"claim":"Even parity bit for data 101 is 0", "code":"D=[1,0,1]; result = ((D[0]^D[1]^D[2])==0)"},
{"claim":"Priority encoder with D5,D2 high outputs binary 5 = 101", "code":"hi=5; bits=[(hi>>2)&1,(hi>>1)&1,hi&1]; result = (bits==[1,0,1])"},
{"claim":"C2 for A=[1,1],B=[1,0],C0=0 gives carry into bit2 = 1", "code":"A0,B0,A1,B1,C0=1,1,0,1,0; g0=A0&B0; p0=A0^B0; g1=A1&B1; p1=A1^B1; C2=g1|(p1&g0)|(p1&p0&C0); result = (C2==1)"}
]