0% found this document useful (0 votes)
27 views21 pages

CO221 KBS3 Boolean Algebra

This document discusses Boolean algebra and logic gates. It introduces basic logic functions like AND, OR and inverters. Digital circuit behavior can be represented using waveforms, truth tables or symbols. Primitive gates can be combined to form larger circuits. Boolean algebra defines rules for combining binary variables, including associativity, commutativity and distribution, similar to algebra. DeMorgan's rules allow reducing circuit sizes and are an important concept discussed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views21 pages

CO221 KBS3 Boolean Algebra

This document discusses Boolean algebra and logic gates. It introduces basic logic functions like AND, OR and inverters. Digital circuit behavior can be represented using waveforms, truth tables or symbols. Primitive gates can be combined to form larger circuits. Boolean algebra defines rules for combining binary variables, including associativity, commutativity and distribution, similar to algebra. DeMorgan's rules allow reducing circuit sizes and are an important concept discussed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Digital Design 3e, Morris Mano

Chapter 2 – Boolean Algebra and Logic Gates


Dr. Eng. Kamalanath Samarakoon
Digital Systems
• Analysis problem:

. Logic .
Inputs Outputs
Circuit
. .

– Determine binary outputs for each combination of inputs

• Design problem: given a task, develop a


circuit that accomplishes the task
– Many possible implementation
– Try to develop “best” circuit based on some criterion (size, power,
performance, etc.)
Toll Booth Controller
• Consider the design of a toll booth
controller
• Inputs: quarter, car sensor
• Outputs: gate lift signal, gate close signal
$.25 Logic Raise gate
Car? Circuit Close gate

• If driver pitches in quarter, raise gate.


• When car has cleared gate, close gate.
Describing Circuit Functionality: Inverter
Truth Table

A Y A Y
A Y
N Y F T

Symbol Y N T F

Input Output

• Basic logic functions have symbols.


• The same functionality can be represented with truth tables.
– Truth table completely specifies outputs for all input combinations.
• Why it is called truth table? A Y
• The above circuit is an inverter. 0 1
– An input of 0 is inverted to a 1.
– An input of 1 is inverted to a 0. 1 0
Positive logic and Negative Logic
• Positive logic
• 0 = 0V
• 1 = 5V

• Negative logic
• 0=5V
• 1=0V
The AND Gate
A
Y
B

• This is an AND gate.


Truth Table
• So, if the two inputs signals A B Y
are asserted (high) the 0 0 0
output will also be asserted. 0 1 0

Otherwise, the output will 1 0 0

be deasserted (low). 1 1 1
The AND Gate
• AND
– AND means that both conditions must be true in
order for the conclusion to be true

– Example: If the car is fueled AND the engine


works, then the engine will start
The OR Gate
A
Y
B

A B Y
• This is an OR gate.
0 0 0
• So, if either of the two
0 1 1
input signals are 1 0 1
asserted, or both of 1 1 1
them are, the output
will be asserted.
The OR Gate

• OR works such that the output is true, if either


of the two inputs is true or both are true

• Consider: If I have cash OR a credit card, then I


can pay the bills
Describing Circuit Functionality: Waveforms
AND Gate
A B Y
0 0 0
0 1 0
1 0 0
1 1 1

• Waveforms provide another approach for


representing functionality.
• Values are either high (logic 1) or low (logic 0).
• Can you create a truth table from the
waveforms?
Consider three-input gates

3 Input OR Gate
Ordering Boolean Functions
• How to interpret AB+C?
– Is it AB ORed with C ?
– Is it A ANDed with B+C ?
• Order of precedence for Boolean algebra:
AND before OR.
• Note that parentheses are needed here :
Boolean Algebra
• A Boolean algebra is defined as a closed
algebraic system containing a set K or two
or more elements and the two operators, .
and +.
• Useful for identifying and minimizing circuit
functionality
• Identity elements
–a+0=a
–a.1=a
• 0 is the identity element for the +
operation.
• 1 is the identity element for the . operation.
Commutativity and Associativity of the Operators

• The Commutative Property:


For every a and b in K,
–a+b=b+a
–a.b=b.a
• The Associative Property:
For every a, b, and c in K,
– a + (b + c) = (a + b) + c
– a . (b . c) = (a . b) . c
Distributivity of the Operators and Complements

• The Distributive Property:


For every a, b, and c in K,
– a+(b.c)=(a+b).(a+c)
– a.(b+c)=(a.b)+(a.c)
• The Existence of the Complement:
For every a in K there exists a unique element
called a’ (complement of a) such that,
– a + a’ = 1
– a . a’ = 0
• To simplify notation, the . operator is frequently
omitted. When two elements are written next to
each other, the AND (.) operator is implied…
– a+b.c=(a+b).(a+c)
– a + bc = ( a + b )( a + c )
Duality
• The principle of duality is an important concept.
This says that if an expression is valid in Boolean
algebra, the dual of that expression is also valid.
• To form the dual of an expression, replace all +
operators with . operators, all . operators with +
operators, all ones with zeros, and all zeros with
ones.
• Form the dual of the expression
a + (bc) = (a + b)(a + c)
• Following the replacement rules…
a(b + c) = ab + ac
• Take care not to alter the location of the
parentheses if they are present.
Involution
• This theorem states:
(a’)’ = a

• Taking the double inverse of a value will give


the initial value.
Absorption
• This theorem states:
a + ab = a a(a+b) = a
• To prove the first half of this theorem:
a + ab = a . 1 + ab
= a (1 + b)
= a (b + 1)
= a (1)
a + ab =a
DeMorgan’s Theorem
• A key theorem in simplifying Boolean
algebra expression is DeMorgan’s Theorem.
It states:
(a + b)’ = a’b’ (ab)’ = a’ + b’

• Complement the expression


a(b + z(x + a’)) and simplify.

(a(b+z(x + a’)))’ = a’ + (b + z(x + a’))’


= a’ + b’(z(x + a’))’
= a’ + b’(z’ + (x + a’)’)
= a’ + b’(z’ + x’a’’)
= a’ + b’(z’ + x’a)
Summary
• Basic logic functions can be made from AND, OR,
and NOT (invert) functions
• The behavior of digital circuits can be represented
with waveforms, truth tables, or symbols
• Primitive gates can be combined to form larger
circuits
• Boolean algebra defines how binary variables can
be combined
• Rules for associativity, commutativity, and
distribution are similar to algebra
• DeMorgan’s rules are important.
– Will allow us to reduce circuit sizes.
Slides prepared by
• Dr. Swarnalatha Radakrshnan

You might also like