or gate explained 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
AND GATE:
|A|B|Y|
|0|0|0|
|0|1|0|
|1|0|0|
|1|1|1|
// A: first Input
// B: Second Input
// Y: Output
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 1
AT LEAST ONE MUST BE TRUE
AND GATE:
|A|B|Y|
|0|0|0|
|0|1|0|
|1|0|0|
|1|1|1|
// A: first Input
// B: Second Input
// Y: Output