Prev Problem
Next Problem

5. OR Gate

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

The approach is to implement a logical OR gate that outputs high when either of the input signals is high. Using a continuous assignment, the output y is assigned as the logical OR of inputs a and b using the '|' (OR) operator.

 

Code

/*Write your code here*/
module top_module(input a, input b, output y);

assign y = a | b;

endmodule

 

Was this helpful?
Upvote
Downvote