Boolean Logic

Logic is the "Science of Reasoning" (John Stuart Mill)

Example 1:

"If it is raining then I will take an umbrella"

The truth value of "take an umbrella" depends on the truth value of "raining"

In the form of a table: 
rainingumbrella
FalseFalse
TrueTrue

Called a TRUTH TABLE - can use it to make a DECISION:


Example 2:

"If it is raining or the weather forecast is bad then I will take an umbrella"

As a Truth Table: 
rainingbad forecastumbrella
FalseFalseFalse
FalseTrueTrue
TrueFalseTrue
TrueTrueTrue


Example 3:

"If it is raining and I have no car then I will take an umbrella"

As a Truth Table: 
rainingno carumbrella
FalseFalseFalse
FalseTrueFalse
TrueFalseFalse
TrueTrueTrue

Examples from Duncan Gillies


Digital Logic

Computers can make decisions using Logic

Basic Logical Operations are:

Also:

Computers operate electronically, using Logic Gates

Inputs and outputs: 1 binary digit (0 or 1)

Electronic circuits, usually written as symbols, easily connected to perform more complex functions, form the basic "building blocks" of computers


Logic Gates


More complex gates can be made by:


Logic Circuits

Combine gates into logic circuits to perform useful functions

"take umbrella" is True when "raining" is True AND "have car" is False (NOT TRUE)

Need NOT gate and AND gate

As a Truth Table: 
rainingNOT carumbrella
000
010
100
111


Practical Digital Circuits

Various physical forms. Most common is the dual in-line package.

Pin assignments for TTL type 7400 IC device

Also see: 7400 series TTL ICs at the Chip Directory


Boolean Algebra

From the graphical representation of circuit diagrams and the truth tables for the gates used, the output values of the circuit can be calculated for any given combination of input values. The same calculations can be done by a special algebraic method called Boolean algebra, first formalised by George Boole in 1847. Claude E. Shannon first extended this algebra in 1939 to binary gates, circuits and binary time-varying systems. Today, Boolean algebra is the formal foundation of digital circuit design.

Danger! Warning!

Infuriatingly, there is no single agreed representation for the logical operators in Boolean algebra:

A AND B º A • B º A Ù B º A & B º AB
A OR B º A + B º A Ú B º A | B  
A XOR B º A Å B  
NOT A º A¢ º Ø A º A (with a bar on top)

requires Symbol font installed to display properly


Algebraic Manipulation

The purpose of any algebra is to manipulate expressions without necessarily evaluating them.

Boolean Algebra has many manipulation rules, for example, concerning negation:

These may be verified by a truth table.

The normal laws of algebra apply:

Simplification Rules

Allow reducing the complexity of Boolean expressions.

Single variables:

Simplification rules with 1 and 0:

Note: in all these simplification rules A and B can be any Boolean expression. Thus

de Morgan's Rules:

(A + B)' = A' • B'
(A • B)' = A' + B'

as before, A and B can be any Boolean expression

Can generalise to n Boolean variables:

(A + B + C + D + ...)' = A' • B' • C' • D' • ...
(A • B • C • D • ...)' = A ' + B' + C' + D' + ...

Also:

A Å B = A • B' + A' • B

Complement Law for XOR

(AÅB)' = AÅB' = A'ÅB

some content from Chris Hand


[ Index ]

last updated: 19-Oct-05 Ian Harries <ih@doc.ic.ac.uk>