A logic gate represents boolean logical operators. Those operators take one or more boolean inputs (either a 1/TRUE or a 0/FALSE) and evaluate them to generate an output. A Truth Table is just all possible inputs and outputs.
For example, you have the AND operator. It returns 1/TRUE if both inputs are TRUE. If the inputs are 1 and 1 then it gives you 1. If the inputs are 0 and 0 then it gives you 0. If the inputs are 1 and 0 then it gives you 0, because the inputs are not matched.
So the table would look like this:
Input1 Input 2 = Output
0 AND 0 = 0
1 AND 0 = 0
0 AND 1 = 0
1 AND 1 = 1
The most useless useful logic gate is “YES” which is a straight pass through. 1 outputs 1, 0 outputs 0. “Not” is also pretty helpful, it inverts the input. 1 -> 0 and 0 -> 1.
Then you have AND where if the two inputs are matched it outputs 1 and OR where if *any* input is 1 it outputs 1.
It gets a little more complicated with XOR, named “exclusive OR.” XOR requires exactly one input to be 1 in order to output 1. 1 OR 1 = 1 while 1 XOR 1 = 0.
Then there’s the “not” operators, which are just a combination of NOT and another operator, but they’re useful enough that they get their own names.
NAND is “NOT AND” so anything that gives you a TRUE with AND will give you a FALSE instead and vice versa. 1 NAND 1 = 0 while 0 NAND 0 = 1 and 0 NAND 1 also = 1.
Take the output of the operator and put it through a NOT gate and that’s the N version of the operator. NAND, NOR, XNOR
Latest Answers