nand2/01_Boolean_Logic/Or.v

22 lines
317 B
Coq
Raw Permalink Normal View History

2023-01-11 10:13:09 +00:00
/**
* Or gate:
* out = 1 if (a == 1 or b == 1)
* 0 otherwise
*/
`default_nettype none
module Or(
input a,
input b,
output out
2023-01-11 10:13:09 +00:00
);
// Put your code here:
wire nanda;
wire nandb;
2023-01-11 10:13:09 +00:00
Nand NAND1(a, a, nanda);
Nand NAND2(b, b, nandb);
Nand NAND3(nanda, nandb, out);
2023-01-11 10:13:09 +00:00
endmodule