AND gate
Used when both conditions need to be true (1) in order to return output of true (1)
Looks like a stretched D
OR gate
Used when either one of the conditions need to be true (1) to get an output of true (1). Also if both conditions are true (1), the output is true (1).
Looks like a stretched triangle with a wide base to the left which narrows down to a point.
NOT gate
Inverts the input to give the output. If input is true (1), output will be false (0), and vice versa. Takes single input.
Looks like a triangle facing right with a small circle right next to the vertex.
NAND gate
An inverted AND gate (NOT + AND). Since it is the opposite of the NAND gate, it will return true (1) if at least one or both of the conditions are false (0)
Looks like an AND gate with a small circle to the right of it.
NOR gate
Inverted OR gate (NOT + OR gate). Only returns true (1) if both of its inputs are false (0).
Looks like an OR gate with a small circle to the right of it.
XOR gate
Exclusive OR gate. The output will be true (1) when its inputs are different (one of them is true/1, while the other is false/0 or vice versa).
Looks like an OR gate with a curved line to the left of it.
What are the differences between arithmetic, logical, and boolean operators?
Arithmetic operators perform mathematical calculations, logical operators evaluate boolean expressions, and boolean operators specifically handle true/false values.
Arithmetic operators include addition and subtraction, while logical operators include AND, OR, and NOT.