Complete the code to perform bitwise AND between a and b.
assign result = a [1] b;The bitwise AND operator in Verilog is &.
Complete the code to add a and b, then multiply by c.
assign result = (a [1] b) * c;The addition operator in Verilog is +. Parentheses ensure addition happens before multiplication.
Fix the error in the expression to correctly compute a OR b AND c.
assign result = a [1] b & c;The OR operator | has lower precedence than AND &. Writing a | b & c computes a | (b & c).
Fill both blanks to compute the expression: (a + b) * (c - d).
assign result = (a [1] b) [2] (c - d);
The expression adds a and b, then multiplies by the difference of c and d. So use + and *.
Complete the code to create a conditional expression: if a > b then c else d.
assign result = (a [1] b) ? c : d : ;The conditional operator in Verilog uses ? and :. The condition is a > b, then c if true, else d.
