Title: Lecture 2
1Lecture 2 Boolean Algebra
- Lecturer Amy Ching
- Date 21st Oct 2002
2Binary Systems
- Computer hardware works with binary numbers, but
binary arithmetic is much older than computers - Ancient Chinese Civilisation (3000 BC)
- Ancient Greek Civilisation (1000 BC)
- Boolean Algebra (1850)
3Propositional Logic
- The Ancient Greek philosophers created a system
to formalise arguments called propositional
logic. - A proposition is a statement that could be TRUE
or FALSE - Propositions could be compounded into by means of
the operators AND, OR and NOT
4Propositional Calculus Example
- Propositions, that may be TRUE or FALSE
- it is raining
- the weather forecast is bad
- A combined proposition
- it is raining OR the weather forecast is bad
5Propositional Calculus Example
- We can equate propositions, for example by
writing - I will take an umbrella it is raining OR the
weather - forecast is bad
- or equivalently we can write
- If it is raining OR the weather forecast is bad
- Then I will take an umbrella
- OR
- Rain Bad Weather Forecast Take Umbrella
6Diagrammatic representation
- We can think of the umbrella proposition as a
result that we calculate from the weather
forecast or the fact that it is raining
Rain
Take Umbrella
OR
Bad Weather Forecast
7Truth Tables
- Since propositions can only take two values, we
can express all possible outcomes of the umbrella
proposition by a table
Raining Bad Weather Umbrella
False False False
False True True
True True True
True False True
8Boolean Algebra
- Propositional logic is too cumbersome to express
arguments of any complexity. - An equivalent, more tractable system of logic was
introduced by the English mathematician Boole in
1850.
9Boolean Algebra
- A Boolean variable has only one of two values
true or false (1 or 0), called logic values. - A Boolean variable can be a function of other
Boolean variables, i.e. Z F(A, B, C, D). - We can also express the function in terms of a
Truth Table - A Truth Table is a tabulated list contains a
clear relationship between all possible
combination of input variables and the resultant
operation.
10Fundamental OperatorsAnd Operator
- Three fundamental operators AND, OR and NOT.
- AND Operator
- Z A ? B
- The AND operation is represented by the symbol
?. The truth table or logic table of the AND
operation is as follows
11Fundamental Operators OR Operator
- OR Operator
- Z A B
- The OR operation is represented by the
symbol. Note that the OR operation is not
related to addition in ordinary arithmetic. The
truth table for OR is as follows
12Fundamental Operators NOT Operator
- NOT Operator
- or Z A
- The NOT operation is designated by an overline or
an hyphen. - In words, the above expression is Z is equal to
a NOT. The truth table for the NOT operation is
as follows - The NOT operation is a complement operation.
13Fundamentals of Boolean Algebra
- The truth values are replaced by 1 and 0
- 1 TRUE
- 0 FALSE
- Operators are replaced by symbols
- ' NOT
- OR
- AND
14Precedence
- Further simplification is introduced by
introducing a precedence for the evaluation of
the operators. - (The highest precedence operator is evaluated
first.)
Operator Symbol Precedence
NOT ' Highest
AND Middle
OR Lowest
15All outcomes can be written as
NOT '
AND Operator ()
OR Operator ()
16Boolean Algebra Laws
- 1) Communicative laws 2) Associative laws
- A B B A A(BC) (AB)C
- AB BA (AB)C A(BC)
- 3) Distributive laws 4) Absorption Law
- A? (BC) (A ? B) (A ? C) A? (AB) A
(A ? B) - 5) Complement Law
- A 1
- A ? 0
- Other useful relationship
- 1) A ? 1 A 2) A ? 0 0 3) A 1 1 4) A 0
A - 5) A A A 6) A ? A A
17DeMorgans Theorem
- 1)
- 2)
- Both forms of the DeMorgans Theorem have
complement of an entire expression, and the
effect of this complementing is to interchange
each to a ? and each ? to a and to
complement each variable - Expression 1) is also described as inputs A and B
with a NAND operator - Expression 2) is also described as inputs A and B
with a NOR operator
18Simplification of Boolean Equation Using
DeMorgans Theorem
- Simplify Y (AB) ? (AC)
- Y (AB) ? (AC)
- A ? A A ? C B ? A B ? C
- A A ? C A ? B B ? C
- A ? (1CB) B ? C Redundance Law
- A B ? C
-
19Sum of Product (SOP) and Product of Sum (POS)
- Product term - is a single variable of the logic
product of several variables. The variables may
or may not be complemented. e.g. XYZ, Y - Sum term - is a single variable or the sum of
several variables. The variable may or may not be
complemented e.g. XY, - Sum of products expression - is a product term of
several product terms logically added together
e.g. - Product of sums expression - is a sum term or
several sum terms logically multiplied together
e.g.
20Conversion of a truth table into SOP and POS
- Sum of product solution
- Product of sum solution
21Derivation of SOP and POS
- Sum of Products expression (Minterm Form)
- 1) From a truth table
- 2) The product terms from each row in which the
output is a 1 are collected - 3) The desired expression is the sum of these
products e.g. - Product of Sums expression (Maxterm Form)
- 1) Form a truth table
- 2) Construct a column to contain the sum terms
- 3) The required expression is the product of sums
terms from the row in which the output is 0
e.g.
22Karnaugh Map (K-Map)
- The Karnaugh map provides a formal systematic
approach to the problem of minimisation of logic
functions. e.g. - In the Karnaugh map, every possible combination
of the binary input variables is represented on
the map by a square ( or cell). - For N input variables, we have 2n square.
23Layout of Karnaugh Map
24Use of K-Map
- In this way, by inspection, it is obvious that
terms can be combined and simplified using the
theorem. e.g. - To plot the SOP function on Karnaugh map, a 1
is entered in each square corresponding to a
product term in the function.
25Use of K-Map
- To use the map to form the POS function, a 0 is
entered in each cell corresponding to each sum
term in the function. Result of simplification
should then be in POS form.
26Representation of Karnaugh Map
- Truth Table vs Karnaugh Map
Truth Table
Karnaugh Map
27Use of K-Map
- There is a correspondence between top and bottom
rows, and between extreme left and right-hand
columns.
28Simplification using a K-Map
29Example 1
30Example 2
31Example 3
32Example 4
33Example 5