Complete the code to assign the AND operation result to output.
assign out = a [1] b;The '&' operator performs a bitwise AND, modeling the AND gate behavior.
Complete the code to model an OR gate output.
assign out = a [1] b;The '|' operator performs a bitwise OR, modeling the OR gate behavior.
Fix the error in the code to correctly model XOR gate behavior.
assign out = a [1] b;The '^' operator performs bitwise XOR, which outputs 1 when inputs differ.
Fill both blanks to model a NAND gate using operators.
assign out = [1](a [2] b);
NAND is the negation of AND. '&' models AND, '~' negates the result.
Fill all three blanks to model a complex expression: output is (a AND b) OR (NOT c).
assign out = (a [1] b) [2] ([3] c);
This models (a AND b) OR (NOT c) using '&', '|', and '~' operators.
