Boolean algebra

From TCS Wiki
Revision as of 11:45, 6 July 2017 by imported>There'sNoTime (Reverted good faith edits by 197.183.238.198 (talk): A common replacement of TRUE and FALSE is 1 and 0 - perhaps all of them should be changed, but not just one.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Boolean algebra is algebra for binary (0 means false and 1 means true). It uses normal maths symbols, but it does not work in the same way. It is named after its creator George Boole.[1]

NOT gate

Template:Rellink

NOT
0 1
1 0

[2]

The NOT operator is written with a bar over numbers or letters like this:

[math]\displaystyle{ \bar{1} = 0 }[/math]
[math]\displaystyle{ \bar{0} = 1 }[/math]
[math]\displaystyle{ \bar{\mbox{A}} = \mbox{Q} }[/math]

It means the output is not the input.

AND gate

Template:Rellink

AND 0 1
0 0 0
1 0 1

[2]

The AND operator is written as [math]\displaystyle{ \cdot }[/math] like this:

[math]\displaystyle{ 0 \cdot 0 = 0 }[/math]
[math]\displaystyle{ 0 \cdot 1 = 0 }[/math]
[math]\displaystyle{ 1 \cdot 0 = 0 }[/math]
[math]\displaystyle{ 1 \cdot 1 = 1 }[/math]

The output is true only if one and the other input is true.

OR gate

Template:Rellink

OR 0 1
0 0 1
1 1 1

[2]

The OR operator is written as [math]\displaystyle{ + }[/math] like this:

[math]\displaystyle{ 0 + 0 = 0 }[/math]
[math]\displaystyle{ 0 + 1 = 1 }[/math]
[math]\displaystyle{ 1 + 0 = 1 }[/math]
[math]\displaystyle{ 1 + 1 = 1 }[/math]

One or the other input can be true for the output to be true.

XOR gate

Template:Rellink

XOR 0 1
0 0 1
1 1 0

[2]

XOR basically means "exclusive or", meaning one input or the other must be true, but not both.

The XOR operator is written as [math]\displaystyle{ - }[/math] like this:

[math]\displaystyle{ 0 - 0 = 0 }[/math]
[math]\displaystyle{ 0 - 1 = 1 }[/math]
[math]\displaystyle{ 1 - 0 = 1 }[/math]
[math]\displaystyle{ 1 - 1 = 0 }[/math]

To make it more simple, one or the other input must be true, but not both.

Identities

Different gates can be put together in different orders:

[math]\displaystyle{ \overline{\mbox{A} \cdot \mbox{B}} }[/math] is the same as an AND then a NOT. This is called a NAND gate.

It is not the same as a NOT then an AND like this: [math]\displaystyle{ \overline{\mbox{A}} \cdot \overline{\mbox{B}} }[/math]

[math]\displaystyle{ \mbox{A} + 1 = 1 }[/math]
[math]\displaystyle{ \mbox{A} \cdot 1 = \mbox{A} }[/math]

which is called XOR identity table

XOR 1 0 Any
1 TRUE 0 0
0 0 0 [math]\displaystyle{ \overline{ANY} }[/math]
Any 0 [math]\displaystyle{ \overline{ANY} }[/math] [math]\displaystyle{ \{Any\} }[/math]

, if [math]\displaystyle{ ANY=\{x|\{x\}=\{\{TRUE\}\or\{\overline{TRUE}\}, \};\and (TRUE, 0) \vdash TRUE \and \overline{0} = \{x\} }[/math].Template:Citation needed


or if [math]\displaystyle{ ANY=\{x \|\{TRUE\}, \{\overline{TRUE}\} .\}, }[/math]=TRUE, TRUE.,

DeMorgan's laws

Augustus De Morgan found out that it is possible to change a [math]\displaystyle{ + }[/math] sign to a [math]\displaystyle{ \cdot }[/math] sign and make or break a bar. See the 2 examples below:

[math]\displaystyle{ \overline{\mbox{A} + \mbox{B}} = \overline{\mbox {A}} \cdot \overline{\mbox{B}} }[/math]
[math]\displaystyle{ \overline{\mbox{A} \cdot \mbox{B}} = \overline{\mbox {A}} + \overline{\mbox{B}} }[/math]

"Make/break the bar and change the sign."

Related pages

References

Template:Reflist

Other websites

Template:LogicGates Nav


Template:Math-stub