or gate and and gate code example
Example 1: 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
Example 2: and gate
1 | 0 | 0
1 | 1 | 1
BOTH 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
1 | 0 | 0
1 | 1 | 1
BOTH MUST BE TRUE