Boolean Algebra
Background[edit]
The branch of algebra in which the values of the variables are the truth values true and false, usually denoted 1 and 0 respectively. It is a formal description of logical relations. It was introduced by George Boole in his first book The Mathematical Analysis of Logic in 1847.
Basic Operations[edit]
- AND, formally termed conjunction and denoted by
- OR, formally termed disjunction and denoted by
- NOT, formally termed negation, and denoted by
There are also several "shortcut" notations that we can use for more succinct expressions:
- conjunction may be written as multiplication, i.e. or, more simply,
- disjunction may be written as addition, i.e.
- negation may be written with a bar above the variable, i.e.
Truth Tables[edit]
Truth tables provide us with a straightforward means to specify the required output(s) for the specified input(s), in table form. On the left-hand side of the table we enumerate the input(s) and on the right-hand side of the table we specify the output(s). Assuming that we have inputs we may label each input as . The value of the inputs on any given row, may be referred to as an input tuple. Likewise, assuming that we have outputs we may label each output as , and the value of these outputs on any given row may be referred to as an output tuple. The number of rows in any such table is given by the formula . When there is a single output, we can formalize the relationship as
Why is the formula for determining the number of rows in a truth table related only to the number of inputs, and why is the formula ?
Note that for convenience we sometimes label inputs as A, B, C, etc. rather than etc. and do the same for outputs, often beginning with the letter Q.
Logic Gates[edit]
An idealized or physical device implementing a Boolean function; that is, it performs a logical operation on one or more binary inputs and produces one or more binary outputs. The table below provides the symbols that are used to represent common gates.
Composition[edit]
Logic gates can be cascaded in the same way that Boolean functions can be composed, allowing the construction of a physical model of all of Boolean logic.
Consider this three input AND gate internally constructed of two, two-input AND gates. The truth table for this composition is:
Inputs | Outputs | ||
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
De Morgan's Laws[edit]
De Morgan's Laws provide a helpful formula to obtain the same truth table of:
- an AND gate by using negation and an OR gate, or
- an OR gate by using negation and an AND gate
The Laws are:
References[edit]
- Boolean Algebra (Wikipedia)
- De Morgan's Laws (Wikipedia)
- Logic Gates (Wikipedia)