WEBVTT

00:00:00.510 --> 00:00:02.820
The previous sections
showed us how

00:00:02.820 --> 00:00:04.920
to build a circuit
that computes a given

00:00:04.920 --> 00:00:06.940
sum-of-products expression.

00:00:06.940 --> 00:00:08.820
An interesting
question to ask is

00:00:08.820 --> 00:00:11.370
if we can implement the
same functionality using

00:00:11.370 --> 00:00:13.710
fewer gates or smaller gates?

00:00:13.710 --> 00:00:16.560
In other words is there an
equivalent Boolean expression

00:00:16.560 --> 00:00:19.290
that involves fewer operations?

00:00:19.290 --> 00:00:21.490
Boolean algebra
has many identities

00:00:21.490 --> 00:00:24.760
that can be used to transform an
expression into an equivalent,

00:00:24.760 --> 00:00:27.660
and hopefully
smaller, expression.

00:00:27.660 --> 00:00:29.770
The reduction
identity in particular

00:00:29.770 --> 00:00:32.009
offers a transformation
that simplifies

00:00:32.009 --> 00:00:35.450
an expression involving two
variables and four operations

00:00:35.450 --> 00:00:38.700
into a single variable
and no operations.

00:00:38.700 --> 00:00:41.660
Let’s see how we might use
that identity to simplify

00:00:41.660 --> 00:00:44.770
a sum-of-products expression.

00:00:44.770 --> 00:00:47.160
Here’s the equation from
the start of this chapter,

00:00:47.160 --> 00:00:49.500
involving 4 product terms.

00:00:49.500 --> 00:00:52.240
We’ll use a variant of the
reduction identity involving

00:00:52.240 --> 00:00:56.930
a Boolean expression alpha
and a single variable A.

00:00:56.930 --> 00:00:59.320
Looking at the product
terms, the middle two

00:00:59.320 --> 00:01:02.110
offer an opportunity to
apply the reduction identity

00:01:02.110 --> 00:01:06.150
if we let alpha be the
expression (C AND B).

00:01:06.150 --> 00:01:08.190
So we simplify the
middle two product terms

00:01:08.190 --> 00:01:13.580
to just alpha, i.e., (C AND
B), eliminating the variable A

00:01:13.580 --> 00:01:15.730
from this part of
the expression.

00:01:15.730 --> 00:01:17.620
Considering the now
three product terms,

00:01:17.620 --> 00:01:19.930
we see that the first
and last terms can also

00:01:19.930 --> 00:01:22.300
be reduced, this
time letting alpha be

00:01:22.300 --> 00:01:25.890
the expression (NOT C and A).

00:01:25.890 --> 00:01:29.970
Wow, this equivalent
equation is much smaller!

00:01:29.970 --> 00:01:32.440
Counting inversions and
pair-wise operations,

00:01:32.440 --> 00:01:35.170
the original equation
has 14 operations,

00:01:35.170 --> 00:01:39.067
while the simplified
equation has 4 operations.

00:01:39.067 --> 00:01:40.900
The simplified circuit
would be much cheaper

00:01:40.900 --> 00:01:45.560
to build and have a
smaller tPD in the bargain!

00:01:45.560 --> 00:01:48.070
Doing this sort of Boolean
simplification by hand

00:01:48.070 --> 00:01:50.290
is tedious and error-prone.

00:01:50.290 --> 00:01:53.990
Just the sort of task a computer
program could help with.

00:01:53.990 --> 00:01:56.990
Such programs are in common
use, but the computation

00:01:56.990 --> 00:02:00.910
needed to discover the smallest
possible form for an expression

00:02:00.910 --> 00:02:03.400
grows faster than
exponentially as the number

00:02:03.400 --> 00:02:05.410
of inputs increases.

00:02:05.410 --> 00:02:07.470
So for larger
equations, the programs

00:02:07.470 --> 00:02:12.330
use various heuristics to choose
which simplifications to apply.

00:02:12.330 --> 00:02:16.040
The results are quite good,
but not necessarily optimal.

00:02:16.040 --> 00:02:19.870
But it sure beats doing
the simplification by hand!

00:02:19.870 --> 00:02:22.440
Another way to think about
simplification is by searching

00:02:22.440 --> 00:02:25.280
the truth table for
“don’t-care” situations.

00:02:25.280 --> 00:02:27.940
For example, look at
the first and third rows

00:02:27.940 --> 00:02:30.740
of the original truth
table on the left.

00:02:30.740 --> 00:02:35.420
In both cases A is 0, C is
0, and the output Y is 0.

00:02:35.420 --> 00:02:39.660
The only difference is the value
of B, which we can then tell

00:02:39.660 --> 00:02:42.810
is irrelevant when
both A and C are 0.

00:02:42.810 --> 00:02:45.760
This gives us the first row of
the truth table on the right,

00:02:45.760 --> 00:02:49.500
where we use X to indicate that
the value of B doesn’t matter

00:02:49.500 --> 00:02:52.690
when A and C are both 0.

00:02:52.690 --> 00:02:55.440
By comparing rows with
the same value for Y,

00:02:55.440 --> 00:02:59.080
we can find other
don’t-care situations.

00:02:59.080 --> 00:03:02.370
The truth table with don’t-cares
has only three rows where

00:03:02.370 --> 00:03:04.230
the output is 1.

00:03:04.230 --> 00:03:06.690
And, in fact, the last row is
redundant in the sense that

00:03:06.690 --> 00:03:11.370
the input combinations it
matches (011 and 111) are

00:03:11.370 --> 00:03:15.210
covered by the second
and fourth rows.

00:03:15.210 --> 00:03:17.770
The product terms derived
from rows two and four

00:03:17.770 --> 00:03:21.010
are exactly the product terms we
found by applying the reduction

00:03:21.010 --> 00:03:23.180
identity.

00:03:23.180 --> 00:03:26.360
Do we always want to use the
simplest possible equation

00:03:26.360 --> 00:03:28.830
as the template
for our circuits?

00:03:28.830 --> 00:03:31.320
Seems like that would
minimize the circuit cost

00:03:31.320 --> 00:03:34.630
and maximize performance,
a good thing.

00:03:34.630 --> 00:03:37.280
The simplified
circuit is shown here.

00:03:37.280 --> 00:03:40.830
Let’s look at how it
performs when A is 1, B is 1,

00:03:40.830 --> 00:03:44.020
and C makes a
transition from 1 to 0.

00:03:44.020 --> 00:03:46.460
Before the transition, C
is 1 and we can see from

00:03:46.460 --> 00:03:49.970
the annotated node values that
it’s the bottom AND gate that’s

00:03:49.970 --> 00:03:51.510
causing the Y output to be 1.

00:03:51.510 --> 00:03:57.400
When C transitions to 0, the
bottom AND gate turns off

00:03:57.400 --> 00:04:01.880
and the top AND gate turns on,
and, eventually the Y output

00:04:01.880 --> 00:04:04.060
becomes 1 again.

00:04:04.060 --> 00:04:07.530
But the turning on of the
top AND is delayed by the tPD

00:04:07.530 --> 00:04:10.920
of the inverter, so there’s
a brief period of time where

00:04:10.920 --> 00:04:16.019
neither AND gate is on, and the
output momentarily becomes 0.

00:04:16.019 --> 00:04:18.779
This short blip in Y’s value
is called a glitch and it may

00:04:18.779 --> 00:04:22.019
result in short-lived changes
on many node values as it

00:04:22.019 --> 00:04:25.610
propagates through other
parts of the circuit.

00:04:25.610 --> 00:04:27.720
All those changes
consume power, so it

00:04:27.720 --> 00:04:31.890
would be good to avoid these
sorts of glitches if we can.

00:04:31.890 --> 00:04:35.580
If we include the third product
term BA in our implementation,

00:04:35.580 --> 00:04:38.650
the circuit still computes
the same long-term answer

00:04:38.650 --> 00:04:40.120
as before.

00:04:40.120 --> 00:04:42.380
But now when A and
B are both high,

00:04:42.380 --> 00:04:45.340
the output Y will
be 1 independently

00:04:45.340 --> 00:04:47.730
of the value of the C input.

00:04:47.730 --> 00:04:51.480
So the 1-to-0 transition on the
C input doesn’t cause a glitch

00:04:51.480 --> 00:04:52.990
on the Y output.

00:04:52.990 --> 00:04:55.900
If you recall the last section
of the previous chapter,

00:04:55.900 --> 00:05:00.280
the phrase we used to describe
such circuits is “lenient”.