Lecture 21
Lecture 21
e 2
10/19/2004 EE 42 fall 2004 lecture 21 5
Discrete vs continuous
• For thousands of years, mathematics has
been split between:
– Arithmetic, the study of the discrete
– Analysis, the study of the continuous.
• Until the 1930’s analysis was considered
the pinnacle of mathematics.
• Computer Science and digital circuits are
a triumph of discrete mathematics
• Most of Electrical engineering is analysis!
10/19/2004 EE 42 fall 2004 lecture 21 6
How close is good enough?
• A Fraction can be constructed to be arbitrarily
close to any real number, but can not perfectly
represent all numbers.
• Decimals are just an extension of the fraction
concept, as are floating point numbers.
• A continuous quantity can not be expressed
exactly with these, but it can be represented with
any desired degree of accuracy.
By using binary numbers we can represent any quantity. For example a binary
two (10) could represent a 2 Volt signal. But we generally have to agree on
some sort of “code” and the dynamic range of the signal in order to know the
form and the minimum number of bits.
• Boolean Expression: H = (A · B · C) + T
A B C T H
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 0 0
1 0 0 0
1 0 1 0 0
1 1 0 0 0
1 1 1 0 0
0 0 0 1 1
0 0 1 1 1
0 1 0 1
0 1 1 1 1
1 0 0 1 11
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
10/19/2004 EE 42 fall 2004 lecture 21 19
Evaluation of Logical Expressions with “Truth Tables”
And one other basic function is often used: the “EXCLUSIVE OR”
… which logically is “or except not and”
• “OR”
AB (only 0 when AB1) AB (or A B C D)
not A (or A )
• “INVERT” or “NOT”
A A
AND C=A·B NAND C = A B
B B
A A
NOR C = A B
OR C=A+B B
B
A
A A C AB
B
NOT
EXCLUSIVE OR
10/19/2004 EE 42 fall 2004 lecture 21 24
Logic Circuits
With a combination of logic gates we can construct any logic function. In
these two examples we will find the truth table for the circuit.
A X It is helpful to list the intermediate
C logic values (at the input to the OR
B gate). Let’s call them X and Y.
Y
Now we complete the truth tables for X and Y, and from that for C. (Note
that X A B and Y B A and finally C = X + Y)
A B X Y C
0 0 0 0 0 Interestingly, this is the
0 1 0 1 1 same truth table as the
EXCLUSIVE OR
1 0 1 0 1
1
10/19/2004 1 0 0 0
EE 42 fall 2004 lecture 21 25