Prev Problem
Next Problem

12. Vector Bitwise Operators

Design a combinational module bitwise_ops_demo that demonstrates the use of vector bitwise operators.

Requirements

  • Module name: bitwise_ops_demo
  • Inputs:
    • A[3:0] (4-bit)
    • B[3:0] (4-bit)
  • Outputs:
    • AND_OUT[3:0] = bitwise AND of A and B
    • OR_OUT[3:0] = bitwise OR of A and B
    • XOR_OUT[3:0] = bitwise XOR of A and B
    • XNOR_OUT[3:0] = bitwise XNOR of A and B

Expected Behavior (example)

If A = 4'b1010 and B = 4'b1100:

OperationResult
AND1000
OR1110
XOR0110
XNOR1001
Need Help? Refer to the Quick Guide below