B CompE Bachelor of Computer Engineering Digital Logic Design 2 — Questions and Answers
Question 1: What is the key difference between a latch and a flip-flop?
- Latches store more bits than flip-flops
- Flip-flops are asynchronous; latches are synchronous
- Latches are level-triggered; flip-flops are edge-triggered (Correct answer)
- Flip-flops use less power than latches
Correct answer: Latches are level-triggered; flip-flops are edge-triggered
Latches are level-sensitive (transparent when enabled) while flip-flops are edge-triggered, changing state only on the rising or falling edge of a clock signal.
Question 2: In a full adder, how many inputs does it have?
- 1
- 2
- 3 (Correct answer)
- 4
Correct answer: 3
A full adder has three inputs: two significant bits (A and B) and a carry-in (Cin), producing a Sum and a Carry-out.
Question 3: What does a multiplexer (MUX) do?
- Converts serial data to parallel data
- Selects one of several input signals and forwards it to a single output (Correct answer)
- Splits one input signal into multiple outputs
- Stores binary data temporarily
Correct answer: Selects one of several input signals and forwards it to a single output
A multiplexer selects one of its 2^n data inputs based on n select lines and routes it to a single output, acting like a digitally controlled switch.
Question 4: Which type of counter counts in a sequence where only one bit changes between consecutive states?
- Binary counter
- Decade counter
- Gray code counter (Correct answer)
- Johnson counter
Correct answer: Gray code counter
A Gray code counter changes only one bit per step, reducing switching noise and glitches compared to a standard binary counter.
Question 5: What is the fan-out of a logic gate?
- The number of inputs the gate can accept
- The maximum number of gate inputs the output can reliably drive (Correct answer)
- The propagation delay of the gate
- The power consumption of the gate
Correct answer: The maximum number of gate inputs the output can reliably drive
Fan-out specifies how many logic gate inputs a single gate's output can drive while maintaining valid logic levels.
Question 6: What is the function of a decoder in digital logic?
- Compress multiple inputs into fewer outputs
- Convert an n-bit binary input into one of 2^n output lines (Correct answer)
- Store and retrieve binary data
- Add two binary numbers
Correct answer: Convert an n-bit binary input into one of 2^n output lines
A decoder takes n binary input lines and activates exactly one of its 2^n output lines based on the binary value of the input.
What is the key difference between a latch and a flip-flop?