De Morgan's Theorem Calculator

Verify De Morgan's Laws Instantly

Use this calculator to explore and verify De Morgan's Theorem by setting the truth values of propositions A and B. Observe how the negation of a conjunction (AND) equals the disjunction (OR) of their negations, and vice-versa.

Check for TRUE, uncheck for FALSE.
Check for TRUE, uncheck for FALSE.

Calculation Results

A AND B:
A OR B:
NOT A:
NOT B:
NOT (A OR B):
(NOT A) AND (NOT B):

Results are boolean (TRUE/FALSE) values, demonstrating the logical equivalences of De Morgan's Theorem.

Visual Verification of De Morgan's Theorem

TRUE FALSE
This chart visually compares the truth values of the two parts of each De Morgan's Theorem, using green for TRUE and red for FALSE.

What is De Morgan's Theorem?

De Morgan's Theorem, named after British mathematician Augustus De Morgan, is a pair of fundamental rules in Boolean algebra and digital logic that describe how logical operations interact with negation. These theorems provide a way to simplify complex logical expressions or to transform them into a more convenient form. Essentially, they state that the negation of a conjunction (AND) is equivalent to the disjunction (OR) of the negations, and the negation of a disjunction (OR) is equivalent to the conjunction (AND) of the negations.

This De Morgan's Theorem calculator is an invaluable tool for students, engineers, and anyone working with logic, set theory, or digital circuit design. It helps in understanding the core principles of logical equivalences by providing immediate feedback on truth values.

Who should use it?

  • Computer Science Students: For understanding logical operations in programming and algorithm design.
  • Electrical Engineers: For simplifying logic gates and digital circuits.
  • Mathematicians: For set theory operations and formal logic proofs.
  • Anyone learning Boolean Algebra: To grasp the fundamental laws governing logical expressions.

Common Misunderstandings

A common pitfall is misunderstanding the scope of the negation. The "NOT" operator applies to the entire expression within the parentheses. Forgetting to negate individual propositions or incorrectly switching the AND/OR operator are frequent errors. Another misunderstanding is assuming De Morgan's Theorem applies to arithmetic operations; it is strictly for logical (Boolean) operations.

De Morgan's Theorem Formula and Explanation

De Morgan's Theorem consists of two dual principles that are crucial for manipulating logical expressions. Let A and B be logical propositions that can be either TRUE or FALSE.

First Theorem: Negation of a Conjunction

The first theorem states that the negation of a conjunction (A AND B) is equivalent to the disjunction of their negations (NOT A OR NOT B).

NOT (A AND B) = (NOT A) OR (NOT B)

In simpler terms: If it's NOT true that both A and B are true, then either A is NOT true, or B is NOT true (or both are NOT true).

Second Theorem: Negation of a Disjunction

The second theorem states that the negation of a disjunction (A OR B) is equivalent to the conjunction of their negations (NOT A AND NOT B).

NOT (A OR B) = (NOT A) AND (NOT B)

In simpler terms: If it's NOT true that either A or B is true, then A must be NOT true AND B must be NOT true.

Variables Table

Key Variables in De Morgan's Theorem
Variable Meaning Unit Typical Range
A Logical Proposition Unitless (Boolean) TRUE / FALSE (1 / 0)
B Logical Proposition Unitless (Boolean) TRUE / FALSE (1 / 0)
NOT Logical Negation (Inverts truth value) Unitless (Operator) Transforms TRUE to FALSE, FALSE to TRUE
AND Logical Conjunction (True if both are true) Unitless (Operator) Binary operation, result TRUE/FALSE
OR Logical Disjunction (True if at least one is true) Unitless (Operator) Binary operation, result TRUE/FALSE

Practical Examples of De Morgan's Theorem

Let's illustrate how De Morgan's Theorem works with a couple of practical scenarios, using the De Morgan's Theorem calculator to verify the results.

Example 1: Both Propositions are TRUE

Suppose we have two propositions:

  • A: "It is raining." (TRUE)
  • B: "The sun is shining." (TRUE) - *Let's assume a peculiar weather condition for this example.*

Inputs: A = TRUE, B = TRUE

Using the calculator:

  • Check "Proposition A"
  • Check "Proposition B"

Results:

  • NOT (A AND B): NOT (TRUE AND TRUE) = NOT (TRUE) = FALSE
  • (NOT A) OR (NOT B): (NOT TRUE) OR (NOT TRUE) = FALSE OR FALSE = FALSE
  • NOT (A OR B): NOT (TRUE OR TRUE) = NOT (TRUE) = FALSE
  • (NOT A) AND (NOT B): (NOT TRUE) AND (NOT TRUE) = FALSE AND FALSE = FALSE

Both theorems hold true: FALSE = FALSE.

Example 2: One Proposition is TRUE, One is FALSE

Consider these propositions:

  • A: "The light is on." (TRUE)
  • B: "The door is open." (FALSE)

Inputs: A = TRUE, B = FALSE

Using the calculator:

  • Check "Proposition A"
  • Uncheck "Proposition B"

Results:

  • NOT (A AND B): NOT (TRUE AND FALSE) = NOT (FALSE) = TRUE
  • (NOT A) OR (NOT B): (NOT TRUE) OR (NOT FALSE) = FALSE OR TRUE = TRUE
  • NOT (A OR B): NOT (TRUE OR FALSE) = NOT (TRUE) = FALSE
  • (NOT A) AND (NOT B): (NOT TRUE) AND (NOT FALSE) = FALSE AND TRUE = FALSE

Again, both theorems are verified: TRUE = TRUE and FALSE = FALSE.

How to Use This De Morgan's Theorem Calculator

Our De Morgan's Theorem calculator is designed for simplicity and immediate feedback. Follow these steps to verify logical equivalences:

  1. Set Proposition A: Locate the "Proposition A" input field. Check the box if Proposition A is TRUE, or uncheck it if Proposition A is FALSE.
  2. Set Proposition B: Similarly, locate the "Proposition B" input field. Check the box if Proposition B is TRUE, or uncheck it if Proposition B is FALSE.
  3. Observe Results: The calculator updates in real-time as you change the inputs. The "Calculation Results" section will display the truth values for both sides of De Morgan's two theorems, along with intermediate values.
  4. Interpret Primary Results: The two main results show the equivalence:
    • NOT (A AND B) = (NOT A) OR (NOT B)
    • NOT (A OR B) = (NOT A) AND (NOT B)
    If the values match (e.g., TRUE = TRUE), the theorem is verified for your chosen inputs.
  5. Use the Visual Chart: The "Visual Verification" section provides a graphical representation using colored blocks (green for TRUE, red for FALSE) to quickly confirm the equivalences.
  6. Reset: Click the "Reset" button to clear all inputs and return to their default (FALSE) state.
  7. Copy Results: Use the "Copy Results" button to quickly copy all calculated values and their explanations to your clipboard for easy sharing or documentation.

This tool does not involve units as it deals with abstract boolean values (TRUE/FALSE), which are inherently unitless. The interpretation is direct: a result of TRUE means the logical expression evaluates to true, and FALSE means it evaluates to false.

Key Factors That Affect De Morgan's Theorem

While De Morgan's Theorem itself is a fixed law of logic, its application and the resulting truth values are directly influenced by several factors related to the propositions involved:

  • Truth Values of Propositions A and B: This is the most direct factor. The initial truth assignments to A and B determine the outcome of all logical operations and thus the verification of De Morgan's Theorem. A change in A or B will lead to different overall results, though the equivalences will always hold.
  • Correct Application of Negation (NOT): The "NOT" operator inverts the truth value. Misapplying negation (e.g., negating only part of an expression instead of the whole) will lead to incorrect results and a failure to verify the theorem. Parentheses are crucial for defining the scope of negation.
  • Understanding of Logical Operators (AND, OR): A solid grasp of how AND (conjunction) and OR (disjunction) operate is fundamental. AND is true only if all inputs are true; OR is true if at least one input is true. Any confusion here will lead to incorrect intermediate and final results.
  • Order of Operations: In complex logical expressions, the order in which operations are performed (usually parentheses first, then NOT, then AND, then OR) is critical. De Morgan's Theorem specifically addresses expressions where negation is applied to a compound (AND or OR) statement.
  • Scope of the Theorem: De Morgan's Theorem applies specifically to the negation of conjunctions and disjunctions. Trying to apply it directly to other logical operations without proper transformation can lead to errors.
  • Context of Application: While the theorem is universally true in Boolean algebra, its practical impact varies. In digital electronics, it can simplify circuit designs by replacing AND gates with OR gates (and vice versa) using inverters. In set theory, it translates to operations on unions and intersections of sets.

Frequently Asked Questions (FAQ) about De Morgan's Theorem

Q: What exactly is De Morgan's Theorem?

A: De Morgan's Theorem is a set of two logical equivalences in Boolean algebra that describe how to negate a conjunction (AND) or a disjunction (OR) of propositions. It essentially provides rules for transforming logical expressions involving negation, AND, and OR.

Q: Why is De Morgan's Theorem important?

A: It's fundamental in Boolean algebra basics, digital logic design, and set theory. It allows for the simplification of complex logical expressions, the conversion between different forms of expressions (e.g., from an AND-based to an OR-based form), and the design of more efficient electronic circuits.

Q: Can De Morgan's Theorem be applied to more than two variables?

A: Yes, De Morgan's Theorem can be extended to any finite number of variables through inductive reasoning. For example, NOT (A AND B AND C) = (NOT A) OR (NOT B) OR (NOT C).

Q: What is the difference between AND and OR in logic?

A: The AND operator (conjunction) returns TRUE only if all its input propositions are TRUE. The OR operator (disjunction) returns TRUE if at least one of its input propositions is TRUE. They are fundamental building blocks of logical expressions.

Q: What does "NOT" mean in the context of De Morgan's Theorem?

A: "NOT" (negation) is a unary operator that reverses the truth value of a proposition. If a proposition is TRUE, its negation is FALSE, and if it's FALSE, its negation is TRUE.

Q: Are there any units involved in De Morgan's Theorem calculations?

A: No, De Morgan's Theorem deals with abstract logical truth values (TRUE/FALSE or 1/0), which are unitless. The results are simply logical states, not quantities with physical units.

Q: How does De Morgan's Theorem relate to set theory?

A: There's a direct analogy:

  • NOT corresponds to the complement of a set.
  • AND corresponds to the intersection of sets (A ∩ B).
  • OR corresponds to the union of sets (A ∪ B).
Thus, the complement of an intersection is the union of the complements: (A ∩ B)' = A' ∪ B'. And the complement of a union is the intersection of the complements: (A ∪ B)' = A' ∩ B'. This is a powerful demonstration of duality in mathematics.

Q: What are common mistakes when applying De Morgan's Theorem?

A: Common mistakes include:

  • Forgetting to change the operator (AND to OR, or OR to AND) when distributing the negation.
  • Incorrectly negating the individual propositions.
  • Misinterpreting the scope of the negation, especially with nested expressions.
Always remember to "break the bar, change the sign" – referring to the negation bar over the entire expression.

Related Tools and Internal Resources

Expand your understanding of logic and computation with these related calculators and guides:

🔗 Related Calculators