Boolean Logic
Boolean logic is a system of logic
that deals with binary values (True or False, 1 or 0).
Basic Boolean Operations:
- NOT:
Inverts the input value.
- NOT 0 = 1
- NOT 1 = 0
- AND:
Returns True only if both inputs are True.
- 0 AND 0 = 0
- 0 AND 1 = 0
- 1 AND 0 = 0
- 1 AND 1 = 1
- OR:
Returns True if at least one input is True.
- 0 OR 0 = 0
- 0 OR 1 = 1
- 1 OR 0 = 1
- 1 OR 1 = 1
- NAND:
Returns the opposite of AND.
- 0 NAND 0 = 1
- 0 NAND 1 = 1
- 1 NAND 0 = 1
- 1 NAND 1 = 0
- NOR:
Returns the opposite of OR.
- 0 NOR 0 = 1
- 0 NOR 1 = 0
- 1 NOR 0 = 0
- 1 NOR 1 = 0
- XOR (Exclusive OR):
Returns True if only one input is True.
- 0 XOR 0 = 0
- 0 XOR 1 = 1
- 1 XOR 0 = 1
- 1 XOR 1 = 0
Truth Tables
Truth tables show the output of a
logic gate for all possible input combinations.
Truth Tables for AND, OR, NOT, XOR
gates
De Morgan's Laws
De Morgan's laws are a set of rules
that relate logical operations.
- First Law:
NOT (A AND B) = (NOT A) OR (NOT B)
- Second Law:
NOT (A OR B) = (NOT A) AND (NOT B)
Logic Circuits
Logic circuits are electronic
circuits that implement Boolean functions. They are the building blocks of
digital computers.
Logic Gates: AND, OR, NOT, XOR gates
No comments:
Post a Comment