Truth Tables and Ohm`s Law
Download
Report
Transcript Truth Tables and Ohm`s Law
Some basic electronics
and truth tables
Some material on truth
tables can be found in
Chapters 3 through 5 of
Digital Principles
(Tokheim)
PHY 201 (Blum)
1
Logic Digital Electronics
In Logic, one refers to Logical
statements (propositions which
can be true or false).
What a computer scientist would
represent by a Boolean variable.
In Electronics, one refers to inputs
which will be high or low.
PHY 201 (Blum)
2
Boola Boola!
The expression
(Booleans) and the
rules for combining
them (Boolean
algebra) are named
after George Boole
(1815-64), a British
mathematician.
PHY 201 (Blum)
3
PHY 201 (Blum)
4
Boolean operators
AND: when two or more Boolean
expressions are ANDed, both must be
true for the combination to be true.
OR: when two or more Boolean
expressions are ORed, if either one or the
other or both are true, then the
combination is true.
NOT: takes one Boolean expression and
yields the opposite of it, true false and
vice versa.
PHY 201 (Blum)
5
Representations of
Standard Boolean Operators
Boolean
algebra
expression
NOT A
A´
A AND B
AB
A OR B
A NOR B
A+B
AB
(A+B)´
A NAND B
(AB)´
A XOR B
PHY 201 (Blum)
Gate symbol
6
Our Notation
NOT is represented by a prime or an
apostrophe.
OR is represented by a plus sign.
A’ means NOT A
A + B means A OR B
AND is represented by placing the two
variables next to one another.
AB means A AND B
The notation is like multiplication in regular
algebra since if A and B are 1’s or 0’s the only
product that gives 1 is when A and B are both 1.
PHY 201 (Blum)
7
Other Notations
Ā means NOT A
A means NOT A
AB means A OR B
A&B means A AND B
Tokheim uses the overbar notation
for NOT, but we will use the prime
notation because it is easier to type.
PHY 201 (Blum)
8
Other vocabulary
We will tend to refer to A and B as
“inputs.” (Electronics)
Another term for them is “Boolean
variables.” (Programming)
Still another term for them is
“propositions.” (Logic)
And yet another term for them is
“predicates.” (Logic and grammar)
PHY 201 (Blum)
9
(AB)’ A’B’
A
B
0
0
1
0
1
0
0
0
0
1
1
1
1
1
1
0
Note that the
output is different
AB (AB)’
PHY 201 (Blum)
A
B
A’
B’
A’B’
0
0
0
1
1
1
1
0
1
0
1
1
0
1
0
0
1
0
0
0
10
A Truth Table
A Truth table lists all possible
inputs, that is, all possible values
for the propositions.
For a given numbers of inputs, this is
always the same.
Then it lists the output for each
possible combination of inputs.
This varies from situation to situation.
PHY 201 (Blum)
11
The true one
Traditionally we take a 1 to
represent true and a 0 to
represent false.
This is just a convention.
In addition, we will usually
interpret a high voltage as a true
and a low voltage as a false.
PHY 201 (Blum)
12
Generating Inputs
The truth-table inputs consist of all the possible
combinations of 0’s and 1’s for that number of
inputs.
One way to generate the inputs for is to count in
binary.
For two inputs, the combinations are 00, 01,
10 and 11 (binary for 0, 1, 2 and 3).
For three inputs, the combinations are 000,
001, 010, 011, 100, 101, 110 and 111 (binary
for 0, 1, 2, 3, 4, 5, 6 and 7).
For n inputs there are 2n combinations (rows in
the truth table).
PHY 201 (Blum)
13
Expressing truth tables
Every truth table can be expressed in
terms of the basic Boolean operators
AND, OR and NOT operators.
The circuits corresponding to those truth
tables can be build using AND, OR and
NOT gates.
The input in each line of a truth table can
be expressed in terms of AND’s and
NOT’s.
PHY 201 (Blum)
14
A
0
B
0
A’B’
1
A
0
B
0
A’B
0
0
1
1
1
0
1
0
0
0
0
1
1
1
0
1
1
0
0
A
0
0
B
0
1
AB’
0
0
A
0
0
B
0
1
AB
0
0
1
1
0
1
1
0
1
1
0
1
0
1
PHY 201 (Blum)
Note that
these
expressions
have the
property
that their
truth table
output has
only one row
with a 1.
15
In a sense, each line has an
expression
Input A Input B
Expression
0
0
(NOT A) AND (NOT B)
A´B´
0
1
(NOT A) AND B
A´B
1
0
A AND (NOT B)
AB´
1
1
A AND B
AB
PHY 201 (Blum)
16
It’s true; it’s true
The following steps will allow you to generate
an expression for the output of any truth table.
Take the true (1) outputs.
Write the expressions for that input line (as
shown on the previous slide).
Then feed all of those expressions into an
OR gate.
Sometimes we have multiple outputs (e.g. bit
addition had a sum output and a carry output).
Then each output is treated separately.
PHY 201 (Blum)
17
Example: Majority Rules
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
PHY 201 (Blum)
C
0
1
0
1
0
1
0
1
Majority
0
0
0
1
0
1
1
1
If two or
more of the
three inputs
are high,
then the
output is
high.
18
Row Expressions
A
0
0
0
B
0
0
1
C
0
1
0
Row expressions
A’B’C’
A’B’C
A’BC’
0
1
1
0
1
0
A’BC
AB’C’
1
0
1
AB’C
1
1
1
1
0
1
ABC’
ABC
PHY 201 (Blum)
The
highlighted
rows
correspond
to the high
outputs.
19
Sum of products
Each row is represented by the ANDing of inputs
and/or inverses of inputs.
E.g. A’BC
Recall that ANDing is like Boolean
multiplication
The overall expression for the truth table is then
obtained by ORing the expressions for the
individual rows.
Recall that ORing is like Boolean addition
E.g. A’BC + AB’C + ABC’ + ABC
This type of expression is known as a sum of
products expression.
PHY 201 (Blum)
20
Minterm
The terms for the rows have a
particular form in which every
input (or its inverse) is ANDed
together.
Such a term is known an a
minterm.
PHY 201 (Blum)
21
Minterms
PHY 201 (Blum)
22
Majority rules
A´BC + AB´C + ABC´ + ABC
NOTs
OR
PHY 201 (Blum)
ANDs
23
Majority rules
A´BC + AB´C + ABC´ + ABC
NOTs
OR
PHY 201 (Blum)
ANDs
24
Another Example
A
0
0
B
0
0
C
0
1
Out
1
0
0
0
1
1
1
1
0
0
0
1
0
1
1
0
0
1
1
1
1
1
0
1
0
1
PHY 201 (Blum)
25
Another Example (Cont.)
A’B’C’ + A’BC’ + AB’C + ABC
The expression one arrives at in this way
is known as the sum of products.
You take the product (the AND operation)
first to represent a given line.
Then you sum (the OR operation) together
those expressions.
It’s also called the minterm
expression.
PHY 201 (Blum)
26
Yet Another Example
A
0
0
B
0
0
C
0
1
Out
0
1
0
0
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
PHY 201 (Blum)
27
Yet Another Example 2 (Cont.)
A’B’C + A’BC’ + A’BC + AB’C’ +
AB’C + ABC’ + ABC
But isn’t that just the truth table
for A+B+C?
There is another way to write the
expression for truth tables.
PHY 201 (Blum)
28
Another Example (Cont.)
A
0
0
B
0
0
C
0
1
Out
0
1
0
0
1
1
1
1
0
0
0
1
0
1
1
1
1
1
1
1
1
1
0
1
1
1
PHY 201 (Blum)
In this
approach,
one looks at
the 0’s
instead of
the 1’s.
29
Another Example (Cont.)
One writes expressions for the
lines which are 1 everywhere
except the line one is focusing on.
Then one ANDs those expressions
together.
The expression obtained this way
is known as the product of sums.
PHY 201 (Blum)
30
Expressions
A
B
C
Expression
0
0
0
A+B+C
0
0
1
A + B + C’
0
1
0
A + B’ + C
0
1
1
A + B’ + C’
1
0
0
A’ + B + C
1
0
1
A’ + B + C’
1
1
0
A’ + B’ + C
1
1
1
A’ + B’ + C’
This is not yet a truth table. It has no outputs.
PHY 201 (Blum)
31
Return to Example 1
A
0
0
B
0
0
C
0
1
Out
1
0
0
0
1
1
1
1
0
0
0
1
0
1
1
0
0
1
1
1
1
1
0
1
0
1
PHY 201 (Blum)
32
Return to Example 1 (Cont.)
The product of sums expression is
(A+B+C’)(A+B’+C’)(A’+B+C)(A’+B’+C)
Each term has all of the inputs (or their
inverses) ORed together.
Such terms are known as maxterms.
Another name for the product of sums
expression is the maxterm
expression.
PHY 201 (Blum)
33
Maxterm
PHY 201 (Blum)
34
Comparing minterm and maxterm
expressions
A
B
C
Minterm
Maxterm
Expression Expression
0
0
0
A’ B’ C’
A+B+C
0
0
1
A’ B’ C
A + B + C’
0
1
0
A’ B C’
A + B’ + C
0
1
1
A’ B C
A + B’ + C’
1
0
0
A B’ C’
A’ + B + C
1
0
1
A B’ C
A’ + B + C’
1
1
0
A B C’
A’ + B’ + C
1
1
1
ABC
A’ + B’ + C’
PHY 201 (Blum)
35
Venn Diagram
A Venn diagram is a pictorial
representation of a truth table.
Venn diagrams come from set
theory.
The correspondence between set
theory and logic is that either one
belongs to a set or one does not,
so set theory and logic go
together.
PHY 201 (Blum)
36
Venn (Cont.)
Does not
belong to
set False
Belongs to
set True
PHY 201 (Blum)
37
Overlapping sets
A
true,
but B
false
A
and
B
true
B
true,
but A
false
A false
and B
false
The different regions correspond to the various possible
inputs of a truth table. The true outputs are represented by
shaded regions of the Venn diagram.
PHY 201 (Blum)
38
Majority rules Venn Diagram
PHY 201 (Blum)
39
Truth Table for (A+B’)’C+BC
A
B
C
B’
A+B’
(A+B’)’
(A+B’)’C
BC
(A+B’)’C+BC
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
1
0
1
0
0
1
1
0
0
1
1
1
1
0
0
0
1
0
0
0
1
0
0
0
1
0
0
1
1
1
1
0
1
0
0
1
1
0
0
0
0
0
1
0
1
PHY 201 (Blum)
40
Venn Diagram for (A+B’)’C’+BC
A
B
C
PHY 201 (Blum)
41
Ohm’s Law
V = I R, where
V is voltage: the amount of energy per
charge.
I is current: the rate at which charge
flows, e.g. how much charge goes by in
a second.
R is resistance: the “difficulty” a charge
encounters as it moves through a part of
a circuit.
PHY 201 (Blum)
42
Circuit
A circuit is a closed path along which
charges flow.
If there is not a closed path that allows
the charge to get back to where it
started (without retracing its steps), the
circuit is said to be “open” or “broken.”
The path doesn’t have to be unique;
there may be more than one path.
PHY 201 (Blum)
43
Open circuit, closed circuit
PHY 201 (Blum)
44
An analogy
A charge leaving a battery is like you
starting the day after a good night’s
rest; you are full of energy.
Being the kind of person you are, you
will expend all of your energy and
collapse utterly exhausted into bed at
the end of the day; the charge uses up
all of its energy in traversing a circuit.
PHY 201 (Blum)
45
Analogy (cont.)
You look ahead to the tasks of the day
and divide your energy accordingly – the
more difficult the task, the more of your
energy it requires (resistors in series).
The tasks are resistors, so more energy
(voltage) is used up working through the
more difficult tasks (higher resistances).
The higher the resistance, the greater the
voltage drop (energy used up) across it.
PHY 201 (Blum)
46
Resistors in series
PHY 201 (Blum)
47
One charge among many
You are just one charge among many.
If the task at hand is very difficult (the
resistance is high), not many will do it
(the current is low);
V=IR, if R is big, I must be small.
If the task is easy, everyone rushes to
do it.
V=IR, if R is small, I will be large.
PHY 201 (Blum)
48
More energetic
If we had more energy, more of us
would attempt a given task.
V=IR, if V is bigger, I is bigger.
If we are all tired out, few of us will
perform even the most basic task.
V=IR, if V is small, I will be small.
PHY 201 (Blum)
49
Given the choice
Given the choice between a difficult
task and an easy task, most will choose
the easier task.
If there is more than one path, most
take the “path of least resistance”
(resistors in parallel).
PHY 201 (Blum)
50
Resistors in parallel
PHY 201 (Blum)
51
References
Chapters 3 through 5 of Digital
Principles (Tokheim)
http://en.wikipedia.org/wiki/Minter
m
http://www.physics.wisc.edu/underg
rads/courses/phys202fall96/?D=A
PHY 201 (Blum)
52