The next gate we are going to build is the OR gate. This gate receives two inputs and returns
1 if either one of the inputs is
To build your
OR_gate(), you should use any combination of the gates you’ve already made:
Here’s the truth table:
OR_gate() which takes two inputs,
b, and returns the outputs specified in the truth table.
You can do this using traditional Python logic. Or, using a combination of the other gates you have learned about so far, you can make this in one line!