Challenge - 5 Problems
Combinational Logic Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Output of simple combinational logic using operators
What is the output of the following VHDL process when inputs A = '1' and B = '0'?
VHDL
process(A, B)
begin
Y <= A and B;
end process;Attempts:
2 left
💡 Hint
AND operator outputs '1' only if both inputs are '1'.
✗ Incorrect
The AND operator in VHDL models combinational logic that outputs '1' only when both inputs are '1'. Since B is '0', the output Y is '0'.
❓ Predict Output
intermediate2:00remaining
Output of combinational logic with multiple operators
Given inputs A = '1', B = '0', and C = '1', what is the output Y of this VHDL process?
process(A, B, C)
begin
Y <= (A or B) and C;
end process;
VHDL
process(A, B, C) begin Y <= (A or B) and C; end process;
Attempts:
2 left
💡 Hint
OR operator outputs '1' if any input is '1'.
✗ Incorrect
The OR operator outputs '1' because A is '1'. Then AND with C which is '1' results in '1'.
🔧 Debug
advanced2:00remaining
Identify the error in combinational logic modeling
What error will this VHDL code produce when synthesizing?
process(A, B)
begin
if A = '1' then
Y <= B;
end if;
end process;
VHDL
process(A, B) begin if A = '1' then Y <= B; end if; end process;
Attempts:
2 left
💡 Hint
Combinational logic must assign output in all cases to avoid latches.
✗ Incorrect
Because Y is assigned only when A = '1', otherwise it keeps previous value, causing unintended latch behavior.
🧠 Conceptual
advanced2:00remaining
Why do operators model combinational logic behavior in VHDL?
Which statement best explains why operators like AND, OR, and NOT model combinational logic in VHDL?
Attempts:
2 left
💡 Hint
Combinational logic outputs depend only on current inputs.
✗ Incorrect
Operators model combinational logic as they compute outputs directly from inputs without storing past values or needing clocks.
❓ Predict Output
expert3:00remaining
Output of complex combinational expression with mixed operators
Given signals A = '0', B = '1', C = 'Z', and D = '1', what is the output Y of this VHDL expression?
Y <= (A nand B) or (not C and D);
VHDL
Y <= (A nand B) or (not C and D);
Attempts:
2 left
💡 Hint
Consider how 'Z' (high impedance) affects NOT and AND operations in VHDL.
✗ Incorrect
NOT of 'Z' results in 'X' (unknown), AND with '1' remains 'X', NAND of '0' and '1' is '1', OR with 'X' results in 'X'.