🡄 Previous

Next 🡆

Contents > Logic Gates

OR

OR is a two-input gate that outputs the disjunction of its inputs. That is, the output is 0 only when both inputs are 0.

The code below creates an OR gate by dropping a single O-tetromino onto abutting input nodes.

or.t
o 0

in a -1 0
in b 0 0
out o -1..0 2

Here are the results for all input combinations:

OR

The O-tetromino lands low unless one or both inputs are 1.

🡄 Previous

Next 🡆