Files
freeCodeCamp/guide/english/logic/algebra-of-logic/index.md
Mallory Butt 78b8928b2c Adding "DeMorgans Law" (#20818)
* Adding "DeMorgans Law"

I specified that the above statements were in fact demorgans laws.

* spelling
2018-11-03 12:52:41 -07:00

30 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Algebra of Logic
---
## Algebra of Logic
_Algebra of Logic_ or _Boolean algebra_ is a branch of mathematics. It deals with variables and their truth value. The variables have two possible states `true` or `false`.
It was first introduced by George Boole in his book The Mathematical Analysis of Logic (1847).
Boolean algebra is fundamental to the development of digital electronics. It is responsible for making possible all modern computing.
The three basic operations in Boolean Algebra are `AND`, `OR`, and `NOT`. Consider two boolean variables `x` and `y`:
- `x AND y` is true if and only if both `x` and `y` are true
- `x OR y` is true if and only if either of `x`, `y` are true. If `x`, `y` are both true, `x OR y` is still true
- `NOT x` is true if and only if `x` is false and vice versa
`NOT` of boolean statements can be refactored to apply directly to each variable. Consider the following :
- `NOT (x AND y) = NOT x OR NOT y`
- `NOT (x OR y) = NOT x AND NOT y`
The above statements are called "De Morgan's Laws." This is a very useful and important law in Boolean Algebra.
### More Information:
- The Calculus of Logic: <a href='http://www.maths.tcd.ie/pub/HistMath/People/Boole/CalcLogic/CalcLogic.html' target='_blank' rel='nofollow'>George Boole</a>
- Boolean algebra article: <a href='https://en.wikipedia.org/wiki/Boolean_algebra' target='_blank' rel='nofollow'>Wikipedia</a>
- Boolean Algebra Demonstration: <a href='http://mathworld.wolfram.com/BooleanAlgebra.html' target='_blank' rel='nofollow'>Boolean Algebra</a>