Basic logical operation
Definition
A basic logical operation is an operation applied to one or more logical propositions to produce a new logical result, usually represented by True/False in logic or 1/0 in digital systems.
The most common basic logical operations are:
Negation (NOT)
- : reverses the truth value
Conjunction (AND)
- : true only if all inputs are true
Disjunction (OR)
- : true if at least one input is true
These operations are the building blocks of propositional logic and are directly implemented in digital circuits using logic gates.
Main Content
1. Negation (NOT)
Negation is a unary logical operation, meaning it works on only one proposition. It changes a true statement into false and a false statement into true.
- If a proposition is P, then its negation is written as ¬P or NOT P.
- If P = True, then ¬P = False
- If P = False, then ¬P = True
Example:
- Proposition: “The light is on.”
- Negation: “The light is not on.”
Truth table:
| P | ¬P |
|---|---|
| T | F |
| F | T |
Negation is widely used in conditions, decision-making, and circuit design. In digital electronics, it is implemented by a NOT gate or inverter.
2. Conjunction (AND)
Conjunction is a binary logical operation, meaning it uses two propositions. It gives true only when both propositions are true.
- If the propositions are P and Q, then the conjunction is written as P ∧ Q
P ∧ Q
- is true only if P is true and Q is true
- If either one or both are false, the result is false
Example:
- P: “I studied”
- Q: “I passed the exam”
- P ∧ Q: “I studied AND I passed the exam”
This statement is true only if both parts are true.
Truth table:
| P | Q | P ∧ Q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
In computing, AND is used when multiple conditions must be satisfied. In digital systems, it is implemented by an AND gate.
3. Disjunction (OR)
Disjunction is another binary logical operation. It gives true if at least one of the propositions is true.
- If the propositions are P and Q, then the disjunction is written as P ∨ Q
P ∨ Q
- is false only when both P and Q are false
- If either one or both are true, the result is true
Example:
- P: “I will take the bus”
- Q: “I will walk”
- P ∨ Q: “I will take the bus OR I will walk”
This statement is true if at least one option happens.
Truth table:
| P | Q | P ∨ Q |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
In practical systems, OR is used when any one of several conditions is enough. In digital electronics, it is implemented by an OR gate.
Working / Process
1. Identify the propositions
- Determine the statements or conditions involved.
- Example: P = “It is sunny”, Q = “It is warm”.
2. Choose the logical operation
- Decide whether the relation is NOT, AND, or OR.
- NOT reverses one statement, AND requires both, OR requires at least one.
3. Evaluate using truth values
- Assign true/false values to the propositions.
- Apply the truth table or gate behavior to get the final logical result.
ASCII diagram showing how the three basic operations behave:
P ──► NOT ──► ¬P
P ──┬──► AND ──► P ∧ Q
Q ──┘
P ──┬──► OR ──► P ∨ Q
Q ──┘
Example process:
- P = True
- Q = False
- NOT P = False
- P AND Q = False
- P OR Q = True
This process is the same in propositional logic and in digital circuits because logical statements are treated like binary values.
Advantages / Applications
- Helps in building clear decision-making systems in mathematics, programming, and logic.
- Forms the basis of digital circuit design, including gates, adders, and memory components.
- Used in conditions and control structures in programming, such as
if,while, and validation checks.
Examples of applications:
Programming
- : checking login credentials, age restrictions, or multiple conditions in
ifstatements
Digital electronics
- : designing logic gates and combinational circuits
Finite state machines
- : determining state transitions based on input conditions
Mathematical logic
- : proving statements and analyzing compound propositions
Everyday reasoning
- : making decisions based on multiple facts
These operations are essential because complex systems are often built by combining simple true/false decisions.
Summary
- Basic logical operations combine or modify true/false statements.
- The main operations are NOT, AND, and OR.
- They are used in logic, programming, and digital circuits.
-
Important terms to remember
-
Proposition
- Truth value
- Negation
- Conjunction
- Disjunction
- Truth table
- Logic gate