logic or gate code example
Example 1: OR gate
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 1
AT LEAST ONE MUST BE TRUE
Example 2: and gate
1 | 0 | 0
1 | 1 | 1
BOTH MUST BE TRUE
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 1
AT LEAST ONE MUST BE TRUE
1 | 0 | 0
1 | 1 | 1
BOTH MUST BE TRUE