Challenge - 5 Problems
Combinational Logic Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediateOutput of simple combinational logic module
What is the output of this Verilog module when inputs A=1 and B=0?
Verilog
module comb_logic(input A, input B, output Y); assign Y = A & B; endmodule // Inputs: A=1, B=0
Attempts:
2 left
💡 Hint
AND gate outputs 1 only if both inputs are 1.
✗ Incorrect
The AND operation outputs 1 only when both inputs are 1. Here, B=0, so output Y=0.
🧠 Conceptual
intermediateWhy combinational logic is foundational in digital circuits
Which statement best explains why combinational logic is the foundation of digital systems?
Attempts:
2 left
💡 Hint
Think about what combinational logic does compared to sequential logic.
✗ Incorrect
Combinational logic produces outputs based only on current inputs, without memory, making it predictable and essential for building blocks.
🔧 Debug
advancedIdentify the error in combinational logic assignment
What error will this Verilog code produce?
Verilog
module faulty_logic(input A, input B, output reg Y); always @(*) begin if (A) Y = 1; end endmodule
Attempts:
2 left
💡 Hint
Think about what happens when A is 0.
✗ Incorrect
When A is 0, Y is not assigned a new value, so synthesis infers a latch to hold previous value, which is usually unintended in combinational logic.
📝 Syntax
advancedCorrect combinational logic syntax for a 2-input OR gate
Which option shows the correct Verilog syntax for a combinational 2-input OR gate output Y?
Attempts:
2 left
💡 Hint
Combinational logic uses continuous assignment without clock.
✗ Incorrect
Option D uses continuous assignment with assign keyword, which is correct for combinational logic. Others use incorrect syntax or imply sequential logic.
🚀 Application
expertNumber of output bits in a combinational decoder
A 3-to-8 line decoder is a combinational circuit. How many output bits does it have?
Attempts:
2 left
💡 Hint
A decoder activates one output line for each input combination.
✗ Incorrect
A 3-to-8 decoder has 3 input bits and 8 output lines, each representing one input combination.
