电子电气工程导论9月24日第三至四节
实时字幕历史
宋律师 你是潘龙吗? the one in the Panama. represent the number one in a Panama. which mean actually exist. and here is zero. For example, for the first thing is zero.
宋律师,你是潘龙吗?就是那个在巴拿马的人。代表巴拿马的第一号人物。也就是说,它确实存在。这里是零。比如,第一个是零。
the first thing is d zero. d is not c not. and you have d a not.
第一个是d0。d不等于c0。还有d a0。
and this is zero because this mean term doesn't exist. in an expression. so it should not be included. in a karnaugh map.
而这个是零,因为这个中间项不存在。在表达式中。所以不应该把它包括进去。在卡诺图中。
this is the first very important stage. because if you draw the wrong karnaugh map, you cannot do any simplification. Any questions?
这是第一个非常重要的步骤。因为如果你画错了卡诺图,你就无法进行化简。有什么问题吗?
Okay.
好的。
And also here is another example how to convert the truth table. to the karnaugh map. One cell of the karnaugh map represent one row. one row of the truth table.
另外,这里还有一个例子,说明如何转换真值表。到卡诺图。卡诺图中的每一个单元格代表真值表中的一行。也就是真值表的一行。
The second important step is how can we use the karnaugh map. once we finish drawing. the karnaugh map, how can we use it?
第二个重要的步骤是我们该如何使用卡诺图。一旦我们完成了绘制。卡诺图,我们该如何利用它呢?
how can we use it for simplification? The principle, here are the principles. First, you have a group. group the cells.
我们该如何用它来进行化简?原则如下,这就是原则。首先,你需要进行分组。把单元格分组。
And each cell in the group should be one.
而组内的每一个单元格,都应该是1。
That means should not be included in a group. And group is the power, is the two of the power. So it should be either square, or rectangular. Yeah, it could be two, four, eight. There's no three. or five.
这意味着,0不应该被包含在组内。而且,分组必须是2的幂次方。所以,它应该是正方形,或者是长方形。对,可以是2、4、8。没有3。也没有5。
So the group should be two, four, eight. And it's a square and a rectangular.
所以,分组应该是2、4或8。而且必须是正方形或长方形。
The group should be as large as possible. because the larger the group is, it's simpler. the simpler the expression you will get. The larger the group, the simpler the expression you will get. And groups can be overlapped. Two groups can be overlapped.
分组应该尽可能大。因为组越大,就越简单。得到的表达式也就越简单。组越大,表达式越简单。而且,组之间可以重叠。两个组可以重叠。
But they cannot be totally overlapped. For example, here is a group, is a square, and there's another square.
但是不能完全重叠。例如,这里有一个组,是一个正方形,还有另一个正方形。
They are overlapped here. That's fine.
它们在这里重叠了。这是可以的。
But it cannot be a bigger group. and there's a small group. A small group is completely inside. of the larger one. This is unnecessary. This is not required.
但不能是一个更大的组。这里还有一个小组。这个小组完全包含在里面。在大的那个组里面。这是不必要的。这不是必需的。
And depending on how you group the number, you may have different correct solutions. Some people may group this four one. and some people may group these four one together. So depend on how you group the numbers, you may get a different solutions.
而且,根据你如何对数字进行分组,你可能会得到不同的结果。正确的解法。有些人可能会把这四个归为一组。而有些人可能会把这四个归为一组。所以,这取决于你如何对数字进行分组,你可能会得到不同的解法。
For the top left, it is also adjacent to the bottom left. so they are also adjacent.
最后,是年龄。同一列中的数字也是相邻的。对于左上角,它也与左下角相邻。所以它们也是相邻的。
Because for the group, you can only group the adjacent cells. You cannot group one number is here, one number is here. You cannot group them together. They should be adjacent.
因为对于分组来说,你只能对相邻的单元格进行分组。你不能把一个数字放在这里,另一个数字放在那里。你不能把它们归为一组。它们必须是相邻的。
And for those four corners, they are adjacent.
至于那四个角,它们也是相邻的。
Okay, that's all the principles.
好的,以上就是所有的原则。
Okay, similar, the same kind of map. Here you can see 1001, okay? It's just a copy. The color map here. And if we have this color map, how can we group them?
好的,类似的,也是同一种类型的地图。这里你可以看到1001,对吧?这只是个复制品。就是这里的颜色图。如果我们有了这张颜色图,我们该如何对它们进行分组呢?
There are different solutions. and different group methods. And for each groups, you may get different solutions.
有不同的解决方案。以及不同的分组方法。对于每一个分组,你可能会得到不同的结果。
So, the first principle. The group should always only contain one. And the group should be as large as possible. Here, okay, this is the first group solution. This second. Let's first look at the first. The first one. The group should be as large as possible. and only contain one.
那么,第一个原则是。一个组应该始终只包含一个元素。而且,这个组应该尽可能大。这里,好的,这是第一种分组方案。这是第二种。我们先来看第一种。就是第一个。组应该尽可能大。但只能包含一个。
And these four ones are adjacent. And it's the largest. This largest we can do. Because the group can only be square or a rectangle. You cannot group these six ones here. If you group these six ones together, it's not a rectangle or square anymore.
而这四个是相邻的。而且这是最大的。这是我们能做到的最大规模。因为组只能是正方形或长方形。你不能把这里的这六个归为一组。如果你把这六个放在一起,它就不是长方形,也不是正方形了。
So this is the blue.
所以,这是蓝色的。
The blue one is the largest group we can give. And for this row, there are also four ones.
蓝色这个是我们能给出的最大的一组。对于这一行,也有四个。
and this is the second largest group we can give.
这是我们能给出的第二大组。
even though they are overlapped. These two ones, they both contain these two ones. it's okay. because they are not totally or completely overlapped.
尽管它们有重叠。这两个组,都包含了这两个。没关系。因为它们并没有完全重叠。
for these two ones, it's only included in this
对于这两个,它们只包含在这个
group. and they are not included in this blue one. so they are not completely overlapped. so these are the two groups. we can determine
组里。而没有包含在蓝色的这个组里。所以它们并没有完全重叠。所以,这就是这两个组。我们可以确定,
and then we have group the following the remaining ones. here we have three. remaining ones, right? and these two are the largest group.
然后我们再把剩下的这些归为一组。这里有三个。剩下的,对吧?而这两个是最大的组。
they are adjacent.
它们是相邻的。
and for the corner bottom left and the bottom right, they are also adjacent. so this corner represents the fourth.
至于角落的,左下角和右下角,它们也是相邻的。所以这个角代表第四个。
the fourth group.
第四组。
and some people, for the second solution, for example here, you may group these two ones together. instead of the two ones below. that's totally fine. so here you group these two ones together, and here you group these two ones.
还有一些人,对于第二种解法,比如这里,你可以把这两个归为一组。而不是下面的这两个。这也是完全没问题的。所以这里你把这两个归为一组,而这里你把这两个归为一组。
and the bottom left and bottom right together.
左下角和右下角也归为一组。
so there are different possible grouping. both are correct. but you should just remember
所以,有不同的分组方式。这两种都是正确的。但是你只需要记住,
how to follow the rules. if you successfully follow the rules,
如何遵循规则。只要你正确地遵循了规则,
you make a different grouping method, that's totally fine.
即使分组方法不同,也是完全没问题的。
okay, now let's do
好的,现在我们来
once we finished grouping,
完成分组后,
let's first look at the left one. that's called kinoma. okay, we write the number together.
首先来看左边的这个。它叫做“基诺玛”。好的,我们一起把数字写出来。
each group represents
每个小组代表
one turn. let's first look at the blue one.
一次转动。我们先来看蓝色的这个。
the blue one.
就是蓝色的。
the blue one has the blue one for BA. when you look at the BA, the blue one, BA is 01. and 11.
蓝色的是代表BA的。大家看BA,也就是蓝色的这个,它是01。还有11。
which means
这意味着
B is changed. from 0 to 1. and A is always 1.
B发生了变化。从0变成了1。而A始终是1。
That means the blue group
也就是说,蓝色这一组
don't care about the value of B.
并不关心B的值。
the blue group doesn't care about what the concrete value of B is.
它不在乎B具体是什么值。
So, the group represent a term. that doesn't include B. because the value of B doesn't affect group.
所以,这一组代表了一个项。这个项里不包含B。因为B的值不会影响这一组。
the group doesn't care about the value of B, right? it can either be zero or one. But A is always one. so A should be included. in a group.
这一组并不关心B的值,对吧?它可以是0,也可以是1。但是A总是1。所以,A应该是被包含在内的。在这一组里。
And similarly, when you look at the B and C,
同样地,当我们看B和C的时候,
DC is the left axle. D is always zero.
DC是左轴。D总是0。
C is either zero or one. So it doesn't matter whether C is zero or one. it's in the group. The group doesn't care about C. But D matters. D is always zero. Right? So this is the term. the blue group. This is the term the blue group represents.
C可以是0,也可以是1。所以,C是0还是1并不重要。它都在这个组里。这个组并不关心C。但是D很重要。D总是0。对吧?所以,这就是这个项。就是蓝色的这个组。这就是蓝色组所代表的项。
Now you can see the simplification.
现在大家可以看到简化后的结果了。
Originally, you have four terms, right? For the first number,
原本有四项,对吧?对于第一个数,
you have D is zero, C is zero, B is zero. A is one.
D是0,C也是0,B也是0。A是1。
And for the second term, D is zero, C is zero, B is one. A is one. And for the third number in the blue group, you have D zero, C is one, one.
而对于第二项,D是0,C是0,B是1。A也是1。至于蓝色组中的第三个数,D是0,C是1和1。
B zero, A one.
B是0,A是1。
And for the fourth term, you have D zero, C one.
对于第四项,你有D是0,C是1。
B one, A one.
B是1,A是1。
Now you can see the simplification.
现在大家可以看到简化后的结果了。
The four terms, can be simplified just with one. So that's the function. That's the purpose of Karnaugh map.
这四项,可以简化为一项。所以,这就是这个函数。这就是卡诺图的作用。
And similarly, maybe we can check together. use what you have learned.
同样地,我们可以一起检查一下。利用你们学到的知识。
and we have learned the boolean algebra, right?
我们之前学过布尔代数,对吧?
okay, let's check AB. so AB, we should remove BC.
好的,我们来检查一下AB。所以对于AB,我们应该去掉BC。
but it's four terms. there is DC.
但是这里有四项。还有DC。
A, right?
A,对吧?
so this is one.
所以这就是一项了。
and for these two terms,
至于这两项,
it's p minus a.
是P减A。
this is also one.
这也是一个。
so we get a
所以我们得到
3p minus.
3P减。
or 3 minus c.
或者3减C。
right?
对吧?
and we can do it further.
我们还可以继续推导。
c plus or c.
C加或C。
and this is one.
这也是一个。
so finally we get
所以最后我们得到
it's exactly the group has represented.
这正是我们要表示的群。
Okay, so this is the reason that we want to use calomax. you don't have to compute the process again.
好的,这就是我们想要使用伽罗瓦理论的原因。这样你就不用再重新计算一遍了。
and use the group to represent.
而是用群来表示。
or very long and complex expressions.
或者那些非常长且复杂的表达式。
okay, this is the turn for the blue one. but you can also use the term to represent the bigger red one. the red one is horizontal. right?
好的,现在轮到蓝色的这位了。不过,你也可以用这个术语来表示那个更大的红色的。红色的是水平的。对吧?
draw it. let's write it down.
画出来。我们把它写下来。
what does it represent?
它代表什么?
for the horizontal one, dc is the one.
对于水平的这个,DC就是那个。
zero one. ba is 0001. one one one zero.
01。而BA是0001。1110。
is one one here, right? and you group them together.
这里就是11,对吧?然后把它们组合在一起。
yes. here you can see.
是的。在这里你可以看到。
b and a. This is b and a. right?
B和A。这就是B和A。对吧?
okay. b and a has changed.
好的。B和A已经改变了。
for example, b changed from zero to one. a changed from one to zero.
比如说,B从0变成了1。而A从1变成了0。
so b and a is not the interest.
所以,B和A并不是我们感兴趣的。
it's not the interest of this group. this group doesn't care about what is the value of b and a.
这不是这个组的研究重点。这个组并不关心B和A的具体数值是什么。
but d c is always deterministic.
但是,D和C始终是确定的。
so this
所以,这个
this group just represents d and x.
组只代表D和X。
and similarly for this group.
同样地,对于这个组来说,也是如此。
we do it further.
我们继续往下看。
for the vertical one, for the vertical yellow one, you have d c.
对于垂直的那个,也就是那个黄色的,里面有D和C。
one one one zero.
分别是1、1、1、0。
you have a b.
还有A和B。
one a zero.
分别是1、A、0。
this is one.
这是1。
and we group them together.
然后把它们组合在一起。
we group these two ones together. okay, next thing.
我们把这两个1组合在一起。好的,接下来。
here you can see d is always one. so d should be kept.
这里大家可以看到,D总是1。所以D应该保留下来。
so c is one or zero, so doesn't matter. c either can be zero or one.
而C是1或0,所以没关系。C可以是0,也可以是1。
so that doesn't matter. here, b a. b a a is deterministic.
所以这并不重要。这里,是B和A。B和A的组合是确定的。
b a doesn't change.
B和A不会改变。
so we should keep these.
所以我们应该保留它们。
and finally,
最后,
for the this color, i don't know what color is. so this can be
对于这个颜色,我不知道它是什么颜色。所以它可以是
for the bottom left and bottom right.
左下角和右下角的颜色。
d c is one zero.
D和C是1和0。
b a is either zero zero, or one zero. right? these are two ones. so these two bottom left and bottom right are adjacent. so this is the group.
B和A要么是0和0,要么是1和0。对吧?这两个都是1。所以左下角和右下角这两个是相邻的。这就是这个组。
here d c is deterministic. so we should always get this. b is one and c is one. and b a b can change, so it doesn't.
这里,D和C是确定的。所以我们应该总是得到这个结果。B是1,C也是1。而B和A可以变化,所以它不固定。
a is always zero.
A总是0。
so finally we can simplify. simplify the very long expression to this. because we have four groups. you can check this. we have a not c not b. the first one. we have a not b d.
所以最后,我们可以简化一下。把这个很长的表达式简化成这个。因为我们有四个组。你可以检查一下。我们有A非C非B。第一个。我们有A非B D。
we have c d not.
还有C D非。
and finally, a d not.
最后,是A D非。
so the first expression, the expression above, is the result. of the karnaugh map.
那么第一个表达式,也就是上面的这个表达式,就是结果。就是卡诺图的结果。
is it clear?
清楚了吗?
any questions?
有什么问题吗?
do you understand?
听懂了吗?
okay, let's continue.
好的,那我们继续。
for the second karnaugh map. it's a different grouping method.
关于第二个卡诺图。它的分组方法不同。
but a bigger group.
但是分组更大。
it remains the same. the blue one and the red one. I will not repeat. the big blue one and the big red one.
结果是一样的。就是蓝色的和红色的这个。我就不重复了。就是那个大的蓝色组和大的红色组。
I would like to show the small vertical one.
我想展示一下那个小的垂直组。
right? and we have b a.
对吧?然后我们有BA。
c is always one.
C始终为1。
and ba is deterministic.
而BA是确定的。
so this is the small vertical one.
所以,这就是那个小的垂直组。
represents.
它代表的是。
When you compare these two Karnaugh maps, their corresponding expression. is very similar to each other. because only one group is different. So,
当你比较这两个卡诺图时,它们对应的表达式。非常相似。因为只有一组是不同的。所以,
it helps.
这很有帮助。
c, you can also find it below. a, you can also find it below. so where is different? the tiny difference is
C,你也可以在下面找到。A,你也可以在下面找到。那么,不同之处在哪里呢?微小的区别在于,
the equation below. you have a not bc.
下面的这个表达式。这里有一个A非BC。
it's surprising, right? both terms are correct. and actually only one variable is different.
这很令人惊讶,对吧?这两个表达式都是正确的。实际上,只有一个变量是不同的。
Three terms are the same.
三个项是一样的。
because they have three common groups.
因为它们有三个共同的组。
The small vertical group.
就是那个小的垂直组。
and only one variable is different.
而且只有一个变量不同。
Because for the first one, group is the third row and the fourth row. and for the second Karnaugh map, the small vertical group is the second row and the third row.
因为对于第一个来说,这个组是第三行和第四行。而对于第二个卡诺图,那个小的垂直组是第二行和第三行。
very complete solutions, but both are correct.
这两个解都非常完整,但都是正确的。
we get very tiny solution. a different solution.
我们得到了一个非常简洁的解。一个不同的解。
and both are correct.
而且两者都是正确的。
and we can also prove we can also prove why these two equations are identical.
我们还可以证明,为什么这两个方程是相同的。
so we have the first is a0, c0.
所以,第一个是a0, c0。
okay, this is the equation of all, right?
好的,这就是所有的方程,对吧?
and the equation below. we have ad here. we have cd0 here. we have a0c0d here.
还有下面的方程。这里我们有ad。这里有cd0。这里还有a0c0d。
same is a0bc.
同样,也是a0bc。
why these two are identical?
为什么这两个是相同的?
let's try to prove it. i'm not sure whether i can achieve the final solution. but i will try.
我们来试着证明一下。我不确定我能不能得出最终的解。但我会试一试。
we have ab.
我们有ab。
a not b in here. here we have a not bc.
这里还有a非b。这里还有a非bc。
so we should have
所以,我们应该有
we should include c in here. how can we include c?
在这里包含c。我们该如何包含c呢?
c or
c或者
c not. right? so we have c here.
非c。对吧?所以,我们这里有c。
let's do it further.
让我们继续做下去。
a not bcd.
a非bcd。
a not d, a not e.
a非d,a非e。
okay, how can we do it further?
好的,我们该如何继续?
okay, here.
好的,这里。
here we have a not c.
我们有a非c。
a not c not d.
a非c非d。
here we also have a not c not d. let's combine them.
这里我们也有a非c非d。让我们把它们合并起来。
a not c not d.
a非c非d。
so we have a not c not d.
所以,我们有a非c非d。
okay, how can we do it further?
好的,我们该如何继续?
a not c not d.
a非c非d。
a b c d.
a b c d。
any ideas? how can we do it further?
有什么想法吗?我们该如何继续?
does anybody have solutions? how can we do it further?
有人有解决方案吗?我们该如何继续?
can you hold it?
你能拿着吗?
because when we compare the solutions, here only this one is different. it's simplified to a not c.
因为当我们比较这些解决方案时,只有这一个不同。它被简化为a非c。
um
嗯,
oh sorry sorry.
哦,对不起,对不起。
what?
什么?
the last one, what do you mean?
最后一个,你是什么意思?
a not c.
a非c。
okay, does anybody have solutions?
好的,有人有解决方案吗?
you want to speak in the front?
你想到前面来说吗?
就是把这里是a
就是把这里改成a,
这里都是
那么这里就是
okay. thanks, thank you so much.
好的。谢谢,非常感谢。
It's time for break.
现在是休息时间了。
You do not understand.
你不明白。
Okay, let's
好的,那我们
stick in that again. So here we have a same field. Same thing as the years, right?
再回到那个话题上。那么,这里我们有一个相同的字段。和年份是一样的,对吧?
So if we, for example, if we only know number seven, eight and nine.
那么,比如说,如果我们只知道数字七,八和九。
are present.
是存在的。
If only number seven, eight and nine are present, so we write down, write one here in the cell. seven is one. eight is one, nine is one, right?
如果只有数字七、八和九存在,那么我们就在这里的格子里写一个一。七是一。八是一,九也是一,对吧?
So one is here. eight is here, nine is here. They are very, they far away from each other. They are separate. But they are six invalid. number ten, eleven, twelve, thirteen, fourteen, fifteen. they are invalid. the 8421 BCD.
所以这里有一个一。八在这里,九也在这里。它们彼此离得很远。它们是分开的。但是,有六个是无效的。数字十、十一、十二、十三、十四、十五。它们都是无效的。也就是8421 BCD码。
cannot express from 10 to 15. This means the value of this there, the value of 10, 11, 12, 13, 14, 15,
无法表示10到15之间的数字。这意味着,这里的数值,也就是10、11、12、13、14和15的数值,
can be either one or zero. but what time should we put one here? only if we can enlarge. we can make the group larger.
可以是1,也可以是0。但是,我们什么时候应该在这里放1呢?只有当我们能够扩展的时候。我们可以把组变大。
so in this case, let's draw it.
所以在这种情况下,我们来画一下。
and so in this table, or in this color map, we have one here. and one one here. they are separate, they are far away from each other. because the remaining are zero. and they are six and low. or in minus number.
在这个表格里,或者说是这个颜色图中,我们有这里有一个1。这里也有一个1。它们是分开的,彼此相距很远。因为剩下的都是0。而且它们的值很低。或者是负数。
if we make a group, this is the group. this is a group, right? very small.
如果我们把这些连成一个组,这就是一个组。这是一个组,对吧?非常小。
it's very small.
它非常小。
for the invalid combination or the combination cannot occur. you can either put a one here, or zero. it depends on whether you can make a group larger. for example, if you put a one here, one, one, one, one, okay. you can get a big, very big. that's exactly what we want. because the larger the group, the simpler the expression you will get. so it's exactly what we want. we want to enlarge the group. so we just put a one here.
对于无效的组合,或者不可能发生的组合。你可以在这里放一个1,或者放一个0。这取决于你能不能把这个组变大。比如,如果你在这里放一个1,那么就是1、1、1、1,没问题。这样你就能得到一个很大的组。这正是我们想要的。因为组越大,就越简单。你得到的表达式就越简单。所以,这正是我们想要的。我们要把组扩大。所以我们直接在这里放一个1。
that's the reason. so for the combinations that cannot occur, you can either put a one or put a zero. depends on whether you can enlarge the group. if you put a one here, you can enlarge the group. then put a one. in the cell.
这就是原因。所以,对于那些不可能出现的组合,你可以放一个1,或者放一个0。这取决于你能否扩大这个组。如果你在这里放一个1,就能扩大这个组。那就放1吧。在这个单元格里。
okay. is this understandable? yes.
好的。大家能理解吗?能。
because for this large group, you can see, you can just use d. we just use d to express.
因为对于这个大的组,大家可以看到,你只需要用D就可以了。我们就是用D来表示的。
to express this large group. it's quite simple. so it's exactly what we want. make the group larger.
来表示这个大的组。这很简单。所以,这正是我们想要的。把组扩大。
okay, let's learn something simple. this is kind of simple for you, i think. the most difficult part has already gone. so let's learn some speed. and we have known this is logical symbols, right? there are two and. two and logic symbols and one or.
好的,让我们来学习一些简单的内容。我想这对你们来说应该挺简单的。最难的部分已经过去了。所以,让我们学点速度吧。我们已经知道这些是逻辑符号,对吧?这里有两个“与”。两个“与”逻辑符号,和一个“或”符号。
and the output of gate one, gate one is a and b. the output of gate two is c and d. and the final output is a and b or c and d.
第一个门的输出,也就是门一,是A与B。第二个门的输出是C与D。最终的输出是A与B,或者C与D。
And the logical gates can be analyzed. considering the output. considering the output of each gate.
这些逻辑门可以进行分析。通过考虑输出结果。也就是考虑每个门的输出。
And the output is at all times dependent on the combination of the input labels.
而且,输出始终取决于输入标签的组合。
so we have the output y here.
所以,我们这里有一个输出Y。
And it depends on the combination of the input labels.
它取决于输入标签的组合。
We have input a, b, c, d and three logical gates.
我们有输入A、B、C、D,以及三个逻辑门。
So if we know a, b, c, d, we can compute the output.
那么,如果我们知道A、B、C、D,就可以计算出输出。
We can compute the output of g1.
我们可以计算出门一的输出。
g2 and g3. I think this truth table is actually, I believe, is now easy for you. if you know a, b, c, d. And how can you compute the g1 output, g2, and g3?
还有门二和门三。我认为这个真值表现在对你们来说应该很简单了。只要知道A、B、C、D。那么,你们如何计算出门一的输出、门二的输出和门三的输出呢?
okay, now we have this expression. a and b or c and d and e. And how can we design a circuit? how can we design a circuit to express this expression? express this equation.
好的,现在我们有了这个表达式。A和B或C和D和E。那么,我们如何设计一个电路呢?我们如何设计一个电路来表达这个表达式?表达这个等式。
We have two terms, right? The term one is a and b. the term two is c and d and e.
我们有两个项,对吧?第一项是A和B。第二项是C、D和E。
And here we define two labels.
在这里,我们定义了两个标签。
The first level is or. and second level is and. So you and a and b, and c and d and e. and the first level you or them. together.
第一层是“或”。第二层是“与”。所以,你要把A和B相与,再把C、D和E相与。然后在第一层把它们相或。合在一起。
Okay, here is another example.
好的,这里还有一个例子。
You have a little bit complex equation. You have a and b and c not b or e and f.
你有一个稍微复杂一点的等式。这里有A和B,还有C和B的非,或者E和F。
And first we assign the label. we assign the label to these functions. first level is the and.
首先,我们给它们分配标签。给这些函数分配标签。第一层是“与”门。
and the second level is the
第二层是
also the and. for a, b is and.
“与”门。对于A和B来说,就是“与”门。
and for c not b or e and f, the second level is or.
而对于C和B的非,或者E和F,第二层就是“或”门。
and the third level is
第三层是
c and d not. e and f. at the third level. and the fourth level is d not. the level is determined by the level of the level is determined from outside to inside.
C和D的非相与。E和F相与。在第三层。第四层就是D的非。层数是由外到内确定的。
from outside to inside. so here is the first level. and the second and third. and then the fourth.
从外到内。所以,这里就是第一层。还有第二层和第三层。然后是第四层。
and based on the labels, you can draw. you can draw the circuit. you design the circuit. you first draw the lowest level. that's the fourth level. b is not. it's the fourth level. and the third level is and. c and d not. b and a. c and d not. the second level is a and b.
根据这些层数,你就可以画出来了。你可以画出这个电路。也就是设计这个电路。首先,你要画出最底层。也就是第四层。B的非,就是第四层。第三层是“与”门。C和D的非相与。B和A相与。C和D的非相与。第二层是A和B相与。
and c d not or e f. and finally you and.
然后,C和D的非,再与E和F相或。最后,再与前面的结果相与。
and then the third.
这就是第三层。
also, this is even simpler, right? the most outside level is or. it's the first level.
另外,这个甚至更简单,对吧?最外层是“或”门。也就是第一层。
and the second level is and.
第二层是“与”门。
and the third level is d not.
第三层是D的非。
so when you design the circuit, just do the third level at first. you have d not. and then you and d not with a b c. and you and a b d f. and the first level you or them.
所以,当你设计电路时,只需要先处理第三层。这里有D的非。然后把它和A、B、C进行“与”运算。再把A、B、D、F也进行“与”运算。最后,在第一层把它们“或”起来。
i believe there should be no question. for this size, right?
我相信应该没什么问题了。就这个规模而言,对吧?
is there any questions?
还有问题吗?
okay, that's all the slides.
好的,这就是所有的幻灯片了。
we have finished lecture three.
我们已经讲完了第三讲。
so actually lecture three is quite simple.
其实,第三讲的内容相当简单。
it's just one task.
它只有一个任务。
how can we use the kernel map? to simplify. how can we use kernel maps to simplify the expression?
那就是,我们如何利用核映射?来简化问题。我们如何利用核映射来简化这个表达式?
to answer this question, you have two steps. the first step is you draw the kernel map. second step is
要回答这个问题,你需要分两步走。第一步是画出核映射。第二步是
yeah, make correct grouping. and each group is just one term.
进行正确的分组。每个组只包含一项。
any questions?
还有问题吗?
do you want to do exercise or do you want this? you want to be free now?
好的,你们想做练习题吗,还是想听这个?现在想自由活动吗?
free now!
现在自由了!
free now! 我要回家!
自由了!我要回家!
课堂最终稿
In a Karnaugh map, the number 1 represents each minterm that actually exists. The number 0 represents a minterm that does not exist. For example, the first cell is 0. The first cell is minterm 0, where D is complemented, C is complemented, and B and A are complemented.
在卡诺图中,数字1代表每个实际存在的最小项。数字0代表不存在的最小项。例如,第一个单元格为0。第一个单元格是最小项0,其中D取反,C取反,B和A也取反。
Because this mint one does not exist in the expression, it should not be included in the canonical map. This is the first very important mistake. If you draw the wrong canonical map, you cannot do any simplification. Any questions?
因为这个薄荷项在表达式中不存在,所以不应包含在标准映射中。这是第一个非常重要的错误。如果你画了错误的标准映射,就无法进行任何化简。有问题吗?
Here is another example of how to convert a truth table to a Karnaugh map. One cell of the Karnaugh map represents one row of the truth table. The second important step is: once we finish drawing the Karnaugh map, how can we use it?
这是另一个如何将真值表转换为卡诺图的例子。卡诺图中的一个单元格代表真值表中的一行。第二个重要步骤是:当我们画完卡诺图之后,如何使用它?
The simplification principle here involves grouping cells. Each cell in a group should be one. That means zero should not be included in a group. A group size must be a power of two, so it should be either square or rectangular. The group can be two, four, or eight — there is no three or five. So the group should be two, four, or eight.
这里的化简原则涉及对单元格进行分组。组内的每个单元格都应为1,也就是说,0不应被包含在组内。分组的大小必须是2的幂,因此组可以是正方形或矩形。组的大小可以是2、4或8——不存在3或5的情况。所以分组的大小应为2、4或8。
A group should be square and rectangular. The group should be as large as possible, because the larger the group is, the simpler the expression you will get. And groups can be overlapped. Two groups can be overlapped, but they cannot be totally overlapped.
一个组应当是正方形或矩形的。组应尽可能大,因为组越大,得到的表达式就越简单。并且组之间可以重叠。两个组可以重叠,但不能完全重叠。
They cannot totally... For example, here is a group, a square, and there is another square. They overlap here. That is fine. But you cannot have a big group and then a small group completely inside of the larger one. This is unnecessary; this is not required. And depending on how you group the numbers, you may have different correct solutions. Some people may group these four 1s together, and some people may group these four 1s together. So depending on how you group the numbers, you may get different solutions.
它们不能完全……例如,这里有一个组,一个方框,还有另一个方框。它们在这里重叠,这是允许的。但是你不能有一个大组,然后一个小组完全包含在大组内部,这是不必要的,不需要这样做。根据你如何对数字进行分组,你可能会得到不同的正确解。有些人可能会把这四个1归为一组,有些人可能会把那四个1归为一组。所以根据你如何对数字进行分组,你可能会得到不同的解。
The edge of the Karnaugh map is also adjacent. For instance, the bottom-left cell is adjacent to the bottom-right cell, and the top-left cell is adjacent to the bottom-left cell. When grouping, you can only group adjacent cells. You cannot group two non-adjacent cells together; they must be adjacent.
卡诺图的边缘也是相邻的。例如,左下角的单元格与右下角的单元格相邻,左上角的单元格与左下角的单元格也相邻。在分组时,只能对相邻的单元格进行分组,不能将两个不相邻的单元格归为一组,它们必须是相邻的。
Corners are adjacent. That covers all the principles. Similarly, for the same Karnaugh map, here you can see the values 1, 0, 0, 1. We simply copy the Karnaugh map here. Now, given this Karnaugh map, how can we group them?
角是相邻的。以上涵盖了所有原则。类似地,对于同一张卡诺图,这里可以看到值为1、0、0、1。我们只需将卡诺图复制到这里。那么,面对这张卡诺图,我们该如何进行分组?
There are different solutions and different group methods. For each group, you may get different solutions. So the first principle: the group should always only contain ones, and the group should be as large as possible. Here, this is the first group solution; this is the second. Let us look at the first one. The group should be as large as possible and only contain ones.
存在不同的解法和不同的分组方法。对于每一组,你可能得到不同的解。因此第一条原则是:分组中只能包含1,且分组应尽可能大。这里,这是第一组解法,这是第二组。我们先来看第一组。分组应尽可能大,且只包含1。
Adjacent cells can be grouped. The largest group must be square or rectangular. You cannot group these four L-shaped ones together, because if you do, it is no longer rectangular or square. So the blue group is the largest group we can get. For this row, there are also four 1s, and this is the second group.
相邻的格子可以分组。最大的组必须是正方形或矩形。你不能将这四个L形的格子归为一组,因为那样就不再是矩形或正方形了。所以蓝色组是我们能得到的最大组。对于这一行,也有四个1,这是第二个组。
The largest group we can kick is this. This is the second largest group we can kick. Even though they are overlapped—these two ones both contain these two ones—it is okay, it is fine, because they are not totally or completely overlapped. For these two ones, they are only included in this group but they are not included in this big one. So they are not completely overlapped like this. These are the two groups we can determine.
我们能踢掉的最大组是这个。这是我们能踢掉的第二大组。尽管它们有重叠——这两个元素同时包含在这两组中——但这没有关系,因为它们并非完全重叠。对于这两个元素来说,它们只包含在这个组里,而没有被包含在这个大组中。所以它们并不是像这样完全重叠的。这就是我们能够确定的两个组。
We have grouped the remaining ones. Here we have three remaining ones. These two are the largest group we can get. They are adjacent. For the corners—bottom left and bottom right—they are also adjacent. So this corner represents the fourth group.
我们已经对剩余的部分进行了分组。这里还剩下三个。其中这两个是我们能得到的最大组,它们是相邻的。对于角落——左下角和右下角——它们也是相邻的。因此这个角落代表第四组。
For the second solution, some people may group these two ones together instead of the two ones below. That is totally fine. Here you group these two ones together, and here you group the bottom left and the bottom right together. There are two different possible grouping methods. Both are correct. But you should just remember how to—
对于第二种解法,有些人可能会把这两个归为一组,而不是下面那两个。这完全没问题。这里你把这两个归为一组,这里你把左下和右下归为一组。存在两种不同的分组方法,两者都是正确的。但你只需要记住如何——
If you successfully follow the rules, you may obtain a different grouping method. That is perfectly fine. Now, once we finish grouping, let us first look at the left Karnaugh map. We write the numbers together for each group.
如果你成功遵循规则,可能会得到一种不同的分组方法,这完全没有问题。现在,完成分组后,我们先看左边的卡诺图,将每个组中的数字写在一起。
Each group represents one term. Let's look at the blue one first. The blue one is for BA. BA is 01 and 11, which means B is changed.
每个组代表一个项。我们先看蓝色的那个。蓝色对应的是BA。BA是01和11,这意味着B发生了变化。
B is changed from 0 to 1, and A is always 1. That means the blue group doesn't care about the value of B. The blue group represents a term that doesn't include B, because the value of B doesn't affect the group.
B从0变为1,而A始终为1。这意味着蓝色组不关心B的值。蓝色组代表一个不包含B的项,因为B的值不影响该组。
The group doesn't care about the value of B. It can either be 0 or 1. But A is always 1, so A should be included in the group. Similarly, when you look at D and C — the left axis — D is always 0.
这个组不关心B的值,B可以是0也可以是1。但A始终为1,所以A应当包含在该组中。类似地,观察D和C——即左侧轴——D始终为0。
C is either 0 or 1, so it doesn't matter whether C is 0 or 1 in the group. The group doesn't care about C. But D matters. D is always 0. So this is the term the blue group represents. Now you can see the simplification.
C 要么是 0 要么是 1,所以在这个组中 C 是 0 还是 1 无关紧要,该组不关心 C。但 D 很重要,D 始终为 0。因此这就是蓝色组所代表的项。现在你可以看到化简的结果了。
You have four terms. For the first number, D is zero, C is zero, B is zero, A is one. For the second term, D is zero, C is zero, B is one, A is one. For the third number in the blue group, you have D zero, C one, B one.
你有四个项。第一个数:D为零,C为零,B为零,A为一。第二个项:D为零,C为零,B为一,A为一。蓝色组中的第三个数:D为零,C为一,B为一。
A0, B1. And for the first term, we have D0, C1, B1, A1. Now you can see the simplification. The four terms can be simplified to just one term. That is the purpose of the Karnaugh map. And similarly, we can check together using what we have learned previously.
A0,B1。对于第一个项,我们有D0、C1、B1、A1。现在你可以看到简化过程。四个项可以简化为一个项。这就是卡诺图的目的。类似地,我们可以用之前学过的内容一起来验证。
In Boolean algebra, let's check AD. We should remove BC. For the four terms—BC, C, A—this equals 1.
在布尔代数中,我们来检查AD项。应该去掉BC。对于这四个项——BC、C、A——结果等于1。
And for these two terms, this p₀a and p—this is also one. So we get ap₀ or p₀a. Right? And we can...
对于这两项,这个 p₀a 和 p——这一项的系数也是 1。所以我们得到 ap₀ 或 p₀a。对吧?然后我们可以……
Three-fourths, or three over four. And this is one. So finally we get a and b. This is exactly the group as represented. This is the reason we want to use canonical maps: you do not have to compute the process again and use the group.
四分之三,或者说三比四。而这是一。所以最终我们得到 a 和 b。这恰好就是该群的表示。这正是我们希望使用典范映射的原因:你不必重新计算整个过程再使用该群。
Terms can represent very long and complex expressions. This is the term for the blue one. You can also use a term to represent the big red one. The red one is horizontal.
项可以表示非常长且复杂的表达式。这是蓝色那个对应的项。你也可以用一个项来表示大的红色那个。红色那个是水平的。
Write that down. What do they represent? For the horizontal one, DC is 01. BA is 00011110. There is 11 here, right? And we group them together. Yes. Here you can see B and A.
把这个记下来。它们代表什么?对于水平方向的那个,DC是01,BA是00011110。这里有一个11,对吧?我们把它们归为一组。是的。这里你可以看到B和A。
This is B and A, right? BMA has changed. For example, B changed from zero to one, A changed from one to zero. So B and A is not the interest of this group. This group doesn't care about what is the value of B and A. But DC is always deterministic.
这是B和A,对吧?BMA发生了变化。例如,B从0变为1,A从1变为0。所以B和A不是这个群的关注点。这个群不关心B和A的值是什么。但DC始终是确定性的。
This group just represents T₀ and C. And similarly for this group, T₃⁴. For the vertical T₀ one, you have TC₁₁.
这个群仅表示 T₀ 和 C。类似地,对于这个群,是 T₃⁴。对于竖直方向的 T₀ 群,你有 TC₁₁。
You have BA = 10. This is 1. We group these two 1s together. Next, here you have C and D. D is always 1, so D should be kept.
BA = 10,该格值为 1。我们将这两个 1 归为一组。接下来看 C 和 D:D 始终为 1,因此 D 应当保留。
It is one or zero, so it doesn't matter. Either can be zero or one. Here, BA is deterministic. BA doesn't change, so we should care about B not. And finally, for this color, I don't know what color it is, so this can be for both of them.
它是一或零,所以无关紧要,两者都可以是零或一。这里,BA 是确定性的,BA 不会改变,所以我们应该关注 B 非。最后,对于这个颜色,我不知道它是什么颜色,所以它对两者都可以成立。
Bottom left and bottom right. DC is 0 1 0. DA is either 0 0 0 or 1 0 0. These are two ones. As I said, bottom left and bottom right are adjacent, so this is the group.
左下角和右下角。DC 是 0 1 0。DA 是 0 0 0 或 1 0 0。这里有两个 1。如前所述,左下角和右下角是相邻的,因此它们构成一个组。
DFC is deterministic, so we always keep it. C is 1, C̄. DAB can be changed, so it does not matter; A is always there. We can simplify the very long expression to four terms, because we have four groups. The terms are: A̅C̅D̅, A̅BD, and CD̅.
DFC是确定性的,所以我们始终保留它。C为1,C̄。DAB可以改变,所以无关紧要;A始终存在。我们可以将这个很长的表达式简化为四项,因为我们有四个组。这四项为:A̅C̅D̅、A̅BD和CD̅。
The expression above is the result of the canonical map at lift. Is it clear?
上面的表达式是提升处典范映射的结果。清楚了吗?
Any questions? Any questions? We have thirty minutes for the second half hour.
有问题吗?有问题吗?下半场我们有三十分钟。
B equals two times C. Two sides are equal.
B等于两倍的C。两边相等。
[No discernible lecture content in this segment; audio consists of ambient classroom noise, shuffling, and indistinct background sounds.]
[该片段无可辨识的讲课内容;音频仅包含教室环境噪音、翻动声及模糊的背景杂音。]
Any questions?
有什么问题吗?
For the second canonical map, it is a different grouping method, but only
对于第二个典范映射,它是一种不同的分组方法,但仅
There is a very tiny difference. The two big groups remain the same; only the vertical group is different. For the second one, you can write down the numbers together. As for the bigger blue one and the bigger red one, I will not repeat those.
差异非常小。两个大组保持不变,只有垂直组不同。对于第二个,你可以把数字写在一起。至于较大的蓝色组和较大的红色组,我不再重复。
As I have shown before, let me show the small vertical one. We have BC equal to 01 and 11, and we have BA equal to 10. We group these two together. C dot and D dot. C is always one.
如我之前所展示的,让我展示小的垂直方向的那个。我们有BC等于01和11,以及BA等于10。我们将这两个归为一组。C点和D点。C始终为1。
is deterministic. This is the term. This small vertical one represents... And finally, when you compare these two canonical maps, their corresponding expression is very similar to each other because only one group is different. So the three terms they have...
是确定性的。这就是该项。这条小的竖线代表……最后,当你比较这两个典范映射时,它们对应的表达式彼此非常相似,因为只有一个群不同。所以它们拥有的三个项……
Three terms are identical. A₀C₀D, CD₀, and AD₀ can all be found in the equation below. The only difference between the two equations lies in one factor: in the equation above, you have A₀ times B, whereas in the equation below, you have A₀ times D.
有三项是完全相同的。A₀C₀D、CD₀ 和 AD₀ 都可以在下方方程中找到。两个方程之间唯一的差别仅在于一个因子:上方方程中是 A₀ 乘以 B,而下方方程中是 A₀ 乘以 D。
It is surprising, right? Both terms are correct, and only one variable is different. Both canonical maps are correct. Three terms are the same because they have three common groups. So three terms are the same, and only…
这很令人惊讶,对吧?两个项都是正确的,且只有一个变量不同。两个规范映射都是正确的。三个项是相同的,因为它们有三个公共组。所以三个项相同,而只有……
The only timing difference is between a vertical group and a small vertical group, and only one variable is different. For the first one, the group is the third row and fourth row. For the second Kanuma, the small vertical group is the second row and third row. Only a very tiny difference. That is the reason we may get very complicated solutions, but both are correct.
唯一的时序差异在于一个垂直组和一个小的垂直组之间,且只有一个变量不同。对于第一个,该组是第三行和第四行。对于第二个 Kanuma,小的垂直组是第二行和第三行。差异非常微小。这就是我们可能得到非常复杂的解的原因,但两者都是正确的。
Both are correct. We get a very tiny solution, or a very different solution, but both are correct.
两者都是正确的。我们得到一个非常小的解,或者一个非常不同的解,但两者都是正确的。
We can also prove that equations one and two are identical, and equations one and three are identical. So we have the first is n of sigma two. This is the equation above. And the equation below—
我们还可以证明方程一和方程二是恒等的,方程一和方程三也是恒等的。因此我们得到第一个是 n of sigma 2。这是上面的方程,而下面的方程——
We have A B naught here. We have C B naught here. We have A naught C naught D here. The only difference is that one is A naught B C. Why are these two identical? Let us try to prove it. I am not sure whether I can reach the final solution, but we will try.
这里我们有 A B naught。这里有 C B naught。这里有 A naught C naught D。唯一的区别在于其中一个是 A naught B C。为什么这两个是相同的?让我们尝试证明。我不确定能否得到最终解,但我们会试一试。
Let's try this again. Here we have A not B D, and here we have A not B C. We should include C here. How can we include C? C or C naught. So we have C here. Let's do it further.
我们再来一次。这里我们有 A非BD,这里我们有 A非BC。我们需要把 C 包含进来。怎样才能包含 C?C 或 C补。所以这里我们有 C。我们继续往下做。
A not B C D. A not B not D. How can we read three to the four? Here we have—
A 非 B C D。A 非 B 非 D。三的四次方怎么读?这里我们有——
We have A'C' and A'C'D'. Here we also have A'C'D'. Let's combine them. First, B plus B' equals 1, so B is eliminated. We are left with A'C'D'.
我们有 A'C' 和 A'C'D'。这里也有 A'C'D'。将它们合并。首先,B 加 B' 等于 1,因此 B 被消去。最终得到 A'C'D'。
A, B, C, D, E, F. How can we proceed further? Obviously not D. Not C either. So the answer is A, B, C, D.
A、B、C、D、E、F。我们如何进一步处理?显然不是D。也不是C。因此答案是A、B、C、D。
Does anybody have a solution? How can we include a folder?
有没有人有解决方案?我们如何包含一个文件夹?
The moment.
此刻。
When we compare the solutions, only this one is different, which simplifies to another PC.
当我们比较这些解时,只有这一项不同,它简化为另一个PC。
The last one—what did B give? Anybody has solutions?
最后一题——B 给出了什么?有人有解法吗?
A dot b equals a scalar value. Then we look at the cross product here.
a 点乘 b 等于一个标量值。然后我们来看这里的叉乘。
[Student presentation]: 如图所示,这两个点相等,所以它的斜率…… [Instructor]: Thank you so much. Applause. Brilliant. [Discussion]: 不是一个位置……C杠G…… [Instructor]: Great.
【学生报告】:如图所示,这两个点相等,所以它的斜率…… 【教师】:非常感谢。大家鼓掌。太精彩了。 【讨论】:不是一个位置……C杠G…… 【教师】:很好。
Apart from this method, which uses a canal graph as an input, and another method that uses a kinama as an input—if we do not use the kinama and instead just consider these four terms, how can we proceed further? You can do it like this: A₀CD. For this, we have CD₀ and A₀BC. We have a common C; pull it outside.
除了这种以canal graph作为输入的方法,以及另一种以kinama作为输入的方法之外——如果我们不使用kinama,而仅仅考虑这四项,该如何进一步推进?可以这样做:A₀CD。对于这一项,我们有CD₀和A₀BC。它们有一个公共的C,将其提取到外面。
We have D naught or A naught B D, that is, A naught B D or A D naught. Is this understandable? Now comes the magic. At the very beginning, I introduced the eleventh equation: A or A naught B equals A or B. Let us apply the eleventh equation to the first line.
我们有 D非 或 A非BD,即 A非BD 或 AD非。这可以理解吗?接下来就是关键一步。在课程一开始,我介绍了第十一条等式:A 或 A非B 等于 A 或 B。让我们将第十一条等式应用到第一行。
From the eleventh equation, A OR (A NOT B) equals A OR B. Now you see here—it is exactly the same form: A OR A NOT B. So this can be expressed by B NOT OR A NOT B.
由第十一条等式可知,A OR (A NOT B) 等于 A OR B。现在大家看这里——它恰好是相同的形式:A OR A NOT B。因此这可以表示为 B NOT OR A NOT B。
Using the distributive law, we get A′C′D + A′BC. Let us open the slide again—it should be exactly the same. A′C′, A′CD, and A′BC. We have just theoretically proved that the equation above and the one below are identical.
利用分配律,我们得到 A′C′D + A′BC。让我们重新打开幻灯片——结果应该完全一致。A′C′、A′CD 和 A′BC。我们刚刚从理论上证明了上面的方程和下面的方程是恒等的。
Any questions? Is this time for break or not? It is time for break. You do not understand?
还有问题吗?现在是休息时间了吗?是的,该休息了。你没有听懂?
Here we have safety layers. If we only know that number seven, eight, and nine are present, we write one in each corresponding cell: seven is one, eight is one, nine is one.
这里我们有安全层。如果我们只知道数字七、八和九存在,我们就在对应的每个单元格中写入一:七为一,八为一,九为一。
One is here, eight is here, nine is here. They are far away from each other; they are separate. But there are six in one unit: ten, eleven, twelve, thirteen, fourteen, fifteen. They are in one unit because the 8421 BCD code cannot—
一在这里,八在这里,九在这里。它们彼此相距很远,是分散的。但有六个数构成一个单元:十、十一、十二、十三、十四、十五。它们在一个单元中,因为8421 BCD码无法——
Express from 10 to 15. This means the value of 10, 11, 12, 13, 14, 15 can be either 1 or 0. But when should we put 1 here? Only if we can make the group larger. So in this case, let's join it.
表示从10到15。这意味着10、11、12、13、14、15的值可以是1或0。但什么时候应该在这里放1?只有当我们能使组变大时才可以。所以在这种情况下,让我们合并它。
In this table, or in this Karnaugh map, we have one here and one here. They are separate, far away from each other, because the remaining are zero, and there are six unknown or invalid numbers.
在这个表中,或者在这个卡诺图中,这里有一个1,那里也有一个1。它们是分离的,彼此相距很远,因为其余的都是0,并且有六个未知或无效的数。
If we make a group here, this is a group. It is very small. But for the invalid combination, or the combination that cannot occur, you can either put a 1 here or a 0. It depends on whether you can make a group larger. For example, if you put a 1 here, you get 1-1-1-1, and you can form a very big group. That is exactly what we want, because the larger the group, the simpler the expression you will get. We want to enlarge the group, so we just put a 1 here. That is the reason.
如果我们在这里画一个圈,这就是一个组,它非常小。但对于无效组合,即不可能出现的组合,你可以在这里填1或0,取决于你是否能让组变得更大。例如,如果你在这里填1,就得到1-1-1-1,可以形成一个非常大的组。这正是我们想要的,因为组越大,得到的表达式就越简单。我们想要扩大组的范围,所以在这里填1。这就是原因。
For calculations that cannot occur, you can either put a 1 or 0, depending on whether you can enlarge the group. If you put a 1 here, you can enlarge the group, then put a 1 in the same position. Because for this large group, we can just use d to express it.
对于无法发生的计算,你可以填1或0,取决于是否能扩大该群。如果你在这里填1,就可以扩大这个群,然后在相同位置也填1。因为对于这个大群,我们只需使用d来表示即可。
To express it in logical groups, it is quite simple. This is exactly what we want: make the group larger. Now let us learn something simple. The most difficult part has already gone. We have learned these logical symbols. There are two AND logical symbols and one OR.
用逻辑组来表达,这非常简单。这正是我们想要的:把组合得更大。现在我们来学一些简单的内容。最难的部分已经过去了。我们已经学过这些逻辑符号,有两个 AND 逻辑符号和一个 OR 逻辑符号。
The output of Gate 1 is A AND B. The output of Gate 2 is C AND D. And the final output is A AND B OR C AND D. Logic gates can be analyzed by considering the output of each gate. The output at all times depends on the combination of the input levels.
Gate 1 的输出是 A AND B。Gate 2 的输出是 C AND D。最终输出是 A AND B OR C AND D。可以通过考虑每个门的输出来分析逻辑门。输出在任何时刻都取决于输入电平的组合。
Of the input labels, so we have output Y here, and it depends on the combination of the input labels. We have inputs A, B, C, D and three logic gates G1, G2, G3. So if we know A, B, C, D, we can compute the outputs of G1, G2, and G3.
关于输入标签,我们有输出Y,它取决于输入标签的组合。我们有输入A、B、C、D以及三个逻辑门G1、G2、G3。因此,如果我们知道A、B、C、D,就可以计算G1、G2和G3的输出。
I believe this truth table is now easy for you. If you know the values of A, B, C, and D, how can you compute the G1 output, G2 output, and G3? Now we have this expression: A and B, or C, and D and E. How can we design a circuit to express this equation? We have two terms, right?
我相信这个真值表现在对你们来说已经很容易了。如果你们知道 A、B、C、D 的值,如何计算 G1 输出、G2 输出和 G3?现在我们有这个表达式:A 与 B,或 C,与 D 与 E。我们如何设计一个电路来表达这个方程?我们有两个项,对吧?
The first term is A AND B. The second term is C AND D AND E. Here we define two labels: the first label is OR, and the second label is AND. You AND within each term, and at the first level you OR the terms together. Here is another example.
第一项是 A AND B,第二项是 C AND D AND E。这里我们定义两个标签:第一个标签是 OR,第二个标签是 AND。在每个项内部使用 AND 运算,在第一层将各项通过 OR 运算组合在一起。下面看另一个例子。
With a complex equation, we have A and B and C, not D, or E and F. First, we assign a label to these functions. The first label is "and." The second label for AB is also "and."
对于一个复杂方程,我们有 A 与 B 与 C,非 D,或 E 与 F。首先,我们为这些函数分配标签。第一个标签是"与"。AB 的第二个标签也是"与"。
For C, D̄, E, and F — these are at the third level. The first level is D̄. The label is determined from outside to inside.
对于 C、D̄、E 和 F,它们处于第三层。第一层是 D̄。标签由外向内确定。
From outside to inside, here is the first level, the second, the third, and the fourth. Based on the labels, you can design the circuit. The lowest label—the fourth level—gives B·D̄. The third level gives C·D̄, B·A, and C·D̄. The second level gives A·B.
从外到内,这里是第一层、第二层、第三层和第四层。根据这些标注,你可以设计电路。最低的标注——第四层——给出 B·D̄。第三层给出 C·D̄、B·A 和 C·D̄。第二层给出 A·B。
C is not OR. Finally, you AND them together. This is even simpler. The outermost label is OR—the first label.
C不是OR。最后,你将它们用AND组合在一起。这更简单。最外层的标签是OR——即第一个标签。
The second level is AND. The third level is DNOT. So when you design a circuit, just draw the third level at first. You have DNOT, and then you AND DNOT with ABC, and you AND ABD. Finally, at the first level, you OR them together.
第二级是与门。第三级是DNOT。所以在设计电路时,先画第三级。得到DNOT,然后将DNOT与ABC进行与运算,再将ABD进行与运算。最后在第一级将它们进行或运算。
I believe there should be no questions from this side. Is there any question for this side? That is all the slides. We have finished Lecture 3. Actually, Lecture 3 is quite simple. It is just one task.
我相信这一侧应该没有问题了。这一侧还有问题吗?所有幻灯片到此结束。我们已经完成了第三讲。实际上,第三讲非常简单,只有一个任务。
How can we use a Karnaugh map to simplify an expression? To answer this question, you have two steps. The first step is you draw a Karnaugh map. The second step is make correct grouping, and each group is just one term. Any questions?
如何使用卡诺图来简化表达式?回答这个问题有两个步骤。第一步是画出卡诺图。第二步是进行正确的分组,每组对应一个项。有问题吗?
Do you want to do exercise, or do you want to be free now? Students: Free now! Free now! Student: 我要回家。
你们想做练习,还是想现在自由活动? 学生:自由活动!自由活动! 学生:我要回家。
课程总结
课程概览
本节课程围绕数字逻辑中的 Karnaugh map(卡诺图)化简 展开,属于“电子电气工程导论”第三讲的核心内容。教师先回顾如何用 0/1 表示最小项、如何从真值表转换到卡诺图,然后重点讲解卡诺图化简的两大步骤:
- 正确画出卡诺图;
- 在卡诺图上进行正确分组,并由每个组写出对应的乘积项。
课堂中通过同一卡诺图的两种不同分组方式,说明“正确解不唯一”,并用布尔代数证明两种表达式等价。随后引入 8421 BCD 无效组合 / 不能发生的组合,说明在卡诺图中可把它们当作 0 或 1 来扩大分组,从而得到更简单表达式。最后讲解如何分析逻辑门电路,以及如何根据布尔表达式设计逻辑电路。
教师反复强调:画错卡诺图就无法化简;分组必须只包含 1,大小必须为 2 的幂,形状必须是正方形或矩形,组越大表达式越简单。
主要内容
1. 卡诺图的基本表示:1、0 与最小项
在 Karnaugh map 中:
- 数字 1 表示该最小项 minterm 在实际表达式中存在。
- 数字 0 表示该最小项不存在。
- 卡诺图中的一个单元格 cell 对应真值表的一行,也对应一个最小项。
- 例如第一个单元格对应 minterm 0,其中 D 取反、C 取反、B 和 A 也取反,即 D′C′B′A′。
- 如果某个最小项在表达式中不存在,就应填 0,不能把它包含进任何分组。
教师强调:这是第一个非常重要的步骤或易错点。如果卡诺图画错,后面就无法进行任何有效化简。
2. 从真值表到卡诺图
操作逻辑:
- 真值表的一行对应卡诺图的一个 cell。
- 根据输入变量组合,把真值表中输出为 1 的行填入卡诺图中的 1。
- 输出为 0 的行填入 0。
- 只有填 1 的 cell 才能参与后续分组。
教师给出的第二个重要问题是:画完卡诺图之后,如何用它进行化简?答案是通过分组。
3. 卡诺图分组原则
教师逐条说明分组规则:
- 每个组内只能包含 1,不能包含 0。
- 组的大小必须是 2 的幂,即 2、4、8 等,不能是 3、5、6 这类非 2 的幂。
- 组的形状必须是正方形或矩形,不能是 L 形等不规则形状。
- 组应尽可能大。组越大,得到的表达式越简单。
- 组之间可以重叠,但不能完全重叠。
- 不允许一个大组里面再画一个完全被包含的小组,这是不必要的。
- 只能把相邻的单元格分到同一组。不相邻的 cell 不能直接成组。
- 卡诺图的边缘也视为相邻:例如左上与左下相邻,左下与右下相邻,四个角也可按相邻处理。
- 不同分组方法可能得到不同的正确表达式,只要遵循规则,都是正确的。
4. 从分组到乘积项:变量如何取舍
每个组代表一个乘积项 term。判断规则:
- 看组内所有 cell 对应的变量取值。
- 如果某个变量在组内始终为 1,则该项中保留该变量本身。
- 如果某个变量在组内始终为 0,则该项中保留该变量的反变量,例如 D′。
- 如果某个变量在组内既有 0 又有 1,说明它发生变化,不影响该组,应被消去。
- 组越大,被消去的变量越多,项越简单。
例如蓝色大组中:
- B 从 0 变到 1,所以 B 被消去;
- A 始终为 1,所以保留 A;
- D 始终为 0,所以保留 D′;
- C 可以变化,所以 C 被消去。 因此该组对应 A D′。
5. 示例:同一卡诺图的两种正确分组
教师展示同一张卡诺图的两种分组方案。两种方案有三个组相同,只有一个小组不同。
第一种分组得到的表达式可整理为:
F = A D′ + C D′ + A′ B D + A′ C′ D
第二种分组得到的表达式可整理为:
F = A D′ + C D′ + A′ C′ D + A′ B C
其中:
- A D′:蓝色大组。D 始终为 0,A 始终为 1,B、C 变化。
- C D′:红色水平大组。D=0,C=1,B、A 变化。
- A′C′D:底部左右角组。A=0,C=0,D=1,B 变化。
- A′BD:第一种分组中的垂直小组。A=0,B=1,D=1,C 变化。
- A′BC:第二种分组中的小垂直组。A=0,B=1,C=1,D 变化。
教师说明:
- 第一个小垂直组是第三行和第四行;
- 第二个卡诺图的小垂直组是第二行和第三行;
- 所以两个表达式只有一个变量不同,但整体仍然等价;
- 三个公共组相同,因此三个项相同;
- 两种解都非常完整,也都是正确的。
6. 用布尔代数验证两种化简结果
教师尝试证明上面两个看似不同的表达式其实是同一个函数。关键思路是使用布尔代数:
- 分配律;
- x + x′ = 1;
- 第 11 条恒等式:A OR (A NOT B) = A OR B,即 A + A′B = A + B。
教师说明,不用卡诺图、只从四项布尔表达式出发,也可以通过提取公因式、合并项、应用第 11 条恒等式,最终证明两个表达式相同。这说明卡诺图给出的是化简结果,而布尔代数可以从理论上验证结果。
7. 8421 BCD 无效组合与不能发生的组合
教师讲解 8421 BCD 中的无效组合:
- 8421 BCD 不能表示 10 到 15。
- 因此 10、11、12、13、14、15 是无效组合,或称为不能发生的组合。
- 例如如果只知道数字 7、8、9 存在,就在对应 cell 写 1:
- 7 = 0111;
- 8 = 1000;
- 9 = 1001。
- 这些 1 在卡诺图中彼此距离较远,单独分组会很小。
- 对于无效组合,可以填 0,也可以填 1,取决于是否能扩大组。
- 如果填入 1 能使组更大,就填 1。
- 教师举例:若把 10 到 15 这些无效组合也填 1,就能形成很大的组,甚至可以用 D 表示该大组。
- 原因仍然是:组越大,表达式越简单。
这就是后来数字逻辑中常说的 don't care 思想,但教师课堂中主要使用“invalid combination”“cannot occur”等表述。
8. 逻辑门电路分析与由表达式设计电路
教师最后讲解逻辑门和电路设计。
分析逻辑门电路:
- 逻辑符号包括 AND、OR、NOT。
- 例子中:
- Gate 1 输出:A AND B;
- Gate 2 输出:C AND D;
- 最终输出:Y = (A AND B) OR (C AND D)。
- 逻辑门电路可以通过考虑每个门的输出来分析。
- 输出始终取决于输入标签的组合。
- 如果知道 A、B、C、D,就可以计算 G1、G2、G3 的输出,并列出真值表。
由布尔表达式设计电路:
- 例:Y = (A AND B) OR (C AND D AND E)。
- 先看表达式有两项:
- 第一项:A AND B;
- 第二项:C AND D AND E。
- 第一层是 OR,第二层是 AND。
- 先在各组内部做 AND,再在第一层做 OR。
- 另一个更复杂例子中,教师强调层次从外到内确定:
- 最外层是第一层;
- 向内依次是第二层、第三层、第四层。
- 画电路时反过来,先画最内层或最低层,例如先画 NOT D,得到 D′;再把 D′ 与 A、B、C 相与;另一支与 A、B、D 等相与;最后在第一层用 OR 合并。
教师总结:Lecture 3 的任务就是一个:如何用 Karnaugh map 化简表达式。回答分两步:
- 画 Karnaugh map;
- 正确分组,每个组对应一个项。
9. 课堂互动与课程小结
课堂中教师多次问“Any questions?”、“Do you understand?”。学生有上台讲解或板演,教师表示感谢并鼓掌。课末教师问学生想做练习还是自由活动,学生回答“Free now!”、“我要回家”。这些互动说明本节内容已经讲完,教师认为最难的部分已经过去,后面的逻辑门与电路设计相对简单。
关键知识点与详细解释
- Karnaugh map 的作用:把真值表或最小项表达式放入二维表格,通过相邻格合并来消去变量,得到更简单的布尔表达式。
- 1 和 0 的含义:1 表示该最小项存在;0 表示不存在。0 不能进入任何组。
- cell 与真值表行:一个 cell 对应真值表的一行,也对应一个 minterm。
- 分组大小:必须是 2 的幂,即 1、2、4、8 等。课堂中强调不能有 3、5、6。
- 分组形状:必须是正方形或矩形,不能是 L 形。组越大越好。
- 重叠规则:组可以部分重叠,但不能完全重叠;不允许小组完全被包含在大组中。
- 相邻规则:只有相邻 cell 能成组;卡诺图边缘相邻,四角也按相邻处理。
- 变量消去规则:
- 组内始终为 1 的变量保留原变量;
- 组内始终为 0 的变量保留反变量;
- 组内变化的变量消去。
- 多个正确解:同一卡诺图可以有不同分组方式,得到不同但等价的表达式。
- 布尔代数验证:可用分配律、x + x′ = 1、A + A′B = A + B 等证明不同表达式等价。
- 无效组合 / 不能发生的组合:在 8421 BCD 中 10 到 15 不能表示。它们可以填 0 或 1,目标是扩大组、简化表达式。
- 逻辑门分析:根据每个门的输出逐级计算,最终输出取决于输入组合。
- 电路设计层次:从表达式最外层开始确定第一层,向里依次分层;画图时从最内层开始画。
易错点:
- 画错卡诺图,导致无法化简。
- 把 0 放进组里。
- 分组大小不是 2 的幂。
- 把 L 形或不规则形状当作一个组。
- 把不相邻的 1 强行分到一组。
- 画一个完全被大组包含的小组。
- 以为只有唯一正确表达式。
- 无效组合随便填,没有考虑是否能扩大组。
- 忘记卡诺图边缘和四角可以相邻。
- 从组写项时保留变化变量或消去不变变量,导致结果错误。
课堂示例与问题
示例 1:真值表转卡诺图
教师说明:
- 卡诺图一个 cell 代表真值表一行。
- 如果某最小项存在,填 1;不存在,填 0。
- 第一个 cell 是最小项 0,即 D′C′B′A′,若不存在则填 0。
- 画错卡诺图,后面无法化简。
示例 2:同一卡诺图的两种正确分组
第一种分组: F = A D′ + C D′ + A′ B D + A′ C′ D
第二种分组: F = A D′ + C D′ + A′ C′ D + A′ B C
教师说明:
- 三个组相同,因此三个项相同。
- 只有一个小垂直组不同:
- 第一种分组:第三行和第四行;
- 第二种分组:第二行和第三行。
- 只有一个变量不同,但两个表达式都正确。
- 教师尝试用布尔代数证明二者等价。
示例 3:8421 BCD 的无效组合
- 7 = 0111,8 = 1000,9 = 1001。
- 10 到 15 无法由 8421 BCD 表示,是无效组合。
- 无效组合可填 0 或 1。
- 如果填 1 能扩大组,就填 1。
- 教师举例:把无效组合填 1 后可形成大组,甚至用 D 表示。
示例 4:逻辑门分析
表达式: Y = (A AND B) OR (C AND D)
分析:
- Gate 1 输出 A AND B;
- Gate 2 输出 C AND D;
- 最终输出是两者相