There are different types of logic gate, depending upon what the gate is needed to do.
OR gates
An OR gate will give a high output if any of the inputs is high. For example, in a simple lighting circuit with two switches in parallel the lamp will light if either switch is pressed.
The relationship between the inputs and the output can be captured in a truth table. A and B represent the inputs and Q is the output.
Truth table for an OR gate
A
B
Q
0
0
0
0
1
1
1
0
1
1
1
1
OR gate symbol
AND gates
An AND gate will give a high output only if all of the inputs are high. For example, in a simple lighting circuit with two switches in series the lamp will light only if both switches are pressed.
No comments:
Post a Comment