Prev Problem
Next Problem

9. XOR Gate Using Basic Gates

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 

 

Code

module xor_gate(
    input a, b,
    output y
);
wire  c, d, e, f, g;
assign c= ~b;
assign d = ~a;
assign e = c & a;
assign f = d & b;
assign y = e|f;

endmodule

 

Was this helpful?
Upvote
Downvote