← ProblemsVerilog Language / Vectors

Four-input gates

64%vectorsbasics

Build a circuit with a 4-bit input in[3:0] and three outputs:

  • out_and — 4-input AND of all bits
  • out_or — 4-input OR of all bits
  • out_xor — 4-input XOR of all bits