Menu
Coddy logo textTech

Recap - Logic Gate Circuit

Part of the Fundamentals section of Coddy's Verilog journey — lesson 42 of 90.

challenge icon

Challenge

This challenge combines everything you learned in this chapter about gate primitives. You will build a circuit using multiple gates.

What to do:

Build a circuit with:

  • Inputs: a, b, c
  • Outputs: out1, out2, out3

Logic:

  1. out1 = a AND b
  2. out2 = b OR c
  3. out3 = a XOR c

Use gate primitives (and, or, xor) to create these outputs.

Try it yourself

module logic_circuit (
  input a,
  input b,
  input c,
  output out1,
  output out2,
  output out3
);
  
  // TODO: Add AND gate for out1 (a & b)
  
  // TODO: Add OR gate for out2 (b | c)
  
  // TODO: Add XOR gate for out3 (a ^ c)

endmodule

All lessons in Fundamentals