2.1.11 - Define the Boolean operators: AND, OR, NOT, NAND, NOR and XOR. Flashcards
What is the AND Boolean operator?
The AND operator returns 1 if both operands are 1; otherwise, it returns 0.
0 AND 0 = 0
1 AND 0 = 0
0 AND 1 = 0
1 AND 1 = 1
What is the OR Boolean operator?
The OR operator returns 1 if at least one of the operands is 1; otherwise, it returns 0.
0 OR 0 = 0
1 OR 0 = 1
0 OR 1 = 1
1 OR 1 = 1
What is the NOT Boolean operator?
The NOT operator returns the complement of the operand.
NOT 0 = 1
NOT 1 = 0
What is the NAND Boolean operator?
The NAND operator returns the complement of the AND operator.
0 NAND 0 = 1
1 NAND 0 = 1
0 NAND 1 = 1
1 NAND 1 = 0
What is the NOR Boolean operator?
The NOR operator returns the complement of the OR operator.
0 NOR 0 = 1
1 NOR 0 = 0
0 NOR 1 = 0
1 NOR 1 = 0
What is the XOR Boolean operator?
The XOR operator returns 1 if only one of the operands is 1; otherwise, it returns 0.
0 XOR 0 = 0
1 XOR 0 = 1
0 XOR 1 = 1
1 XOR 1 = 0