电子电气工程导论9月23日第一节

实时字幕历史

Okay. Hi, good morning.

好的。嗨,早上好。

Let's just begin. our course.

那我们开始吧。我们的课程。

So first,

那么,首先,

I would like to go through what we have learned in our last course.

我想先回顾一下上一节课的内容。

And if you still remember, we have learned six different logical symbols. The first one is the NOT function.

如果大家还记得的话,我们学习了六种不同的逻辑符号。第一个是非函数。

And you can use this symbol. A triangle plus one small circle. to represent the NOT function. And here you can see the table. When A is zero, what is A not? When A is one, what is A not? It is zero.

你可以用这个符号。一个三角形加上一个小圆圈。用来表示非函数。在这里,大家可以看到这个表格。当A为0时,非A是多少?当A为1时,非A是多少?是0。

This table is called a truth table. I forgot to mention

这个表格叫做真值表。我忘了提到,

it.

这一点。

Second logical function is the AND function.

第二个逻辑函数是与函数。

And you can also see the truth table here. When A is zero, B zero, A and B is zero. And people use this symbol. to represent the AND function.

大家也可以看到,这里有一个真值表。当A为0,B为0时,A与B的结果是0。人们使用这个符号。来表示与函数。

And OR function. Similarly, truth table plus the symbol. OR.

还有或函数。同样地,也是真值表加上符号。或。

NAND function.

与非函数。

A NAND B is A AND B first. and then not.

A与非B,就是先计算A与B。然后再取反。

So you can see here is the AND symbol. this is the AND logic symbol. plus the not. you will get NAND.

所以大家可以看到,这里是与符号。这是与逻辑符号。再加上非。这样就能得到与非。

This is the combined symbol.

这是一个组合符号。

And you will also see the NOR.

大家还会看到或非。

NOR is A OR B first. and then not. And then you apply the not function. This is the OR, right? This is NOT. When you combine them together, you will get this one. This symbol.

或非是先计算A或B。然后再取反。然后应用非函数。这是或,对吧?这是非。把它们组合在一起,就能得到这个。就是这个符号。

And here you can also see the truth table. When A zero, B zero, what is the outcome? of the NOR function.

这里大家还可以看到真值表。当A为0,B为0时,结果是什么?或非函数的结果。

Last one is XOR, exclusive OR.

最后一个是异或,即exclusive OR。

It's a little bit different.

它有点不同。

So the definition is that A XOR B is A and not B.

它的定义是,A异或B等于A与非B。

or not A and B.

或者非A与B。

And the truth table is that the output is high if the input are different. So if A and B are different, you will get a high.

真值表是,如果输入不同,输出就是高电平。所以,如果A和B不同,输出就是高。

get the high output. For the second row, for example, A is zero, B is one. they are different. So the outcome is one. A is one, B zero. They are different. So you get one. And this is the symbol.

会得到高输出。以第二行为例,A是0,B是1。它们不同。所以结果是1。A是1,B是0。它们不同。所以输出也是1。这是它的符号。

to represent an exclusive or.

用来表示异或。

And subsequently, we have learned three different logs, right? The firstly is the commutative log.

随后,我们学习了三种不同的逻辑门,对吧?首先是与门。

A or B is equivalent to B or A.

A或B,等于B或A。

or A and B. equals to B and A. So you can switch the position. You can switch the position of two variables. This is the first law. commutative law.

或者与门。等于B与A。所以你可以交换它们的位置。你可以交换两个变量的位置。这就是第一条定律。交换律。

Okay, second. associative law.

好的,第二条。结合律。

So you can just remove the bracket. So in this situation, B or C will be done. So in this situation,

所以你可以直接去掉括号。那么在这种情况下,B或C会先计算。所以,在这种情况下,

you orient this a.

你要把a的位置调整一下。

it's equivalent to you or a and b first. and then or it with c. So the order doesn't matter.

这相当于先计算a和b。然后再与c进行或运算。所以顺序无关紧要。

So now it's distributive law.

接下来是分配律。

you or b and c, and and then and it with a.

先对b和c进行或运算,再与a进行与运算。

So you can just and a and b first. and a and c. and then or them together.

所以你也可以先对a和b进行与运算。再与c进行与运算。最后再把它们进行或运算。

Okay, these are three laws.

好的,这就是三条定律。

Yeah, some basic equations. If we use the laws, we have that.

是的,有一些基本的公式。如果我们运用这些定律,就能得到这些结果。

And also we have learned De Morgan's theorem. There are two forms. to represent De Morgan's theorem. A or B not. is equivalent to not a and not b.

另外,我们还学习了德·摩根定律。它有两种形式。用来表示德·摩根定律。非(A或B)。它等价于非A与非B的与运算。

This means the complement of sum. This is the not is the complement, right? Just like we have learned two's complement, two's complement at the very beginning. the complement of a sum. This is sum a or b is a sum. complement of sum is equivalent to the product. a complement times b complement. this is the first form.

这意味着和的补码。这里的“非”就是补码,对吧?就像我们一开始学过的二进制补码一样。这是一个和的补码。这就是A或B的和。这个和的补码,等价于它们的乘积。即A的补码乘以B的补码。这是第一种形式。

second is the complement of a product. here you have the product first, right? a times b. and the last is equivalent to the sum of the complement. this is complement, this is complement. You add them together, you get the sum.

第二种是乘积的补码。这里先有乘积,对吧?A乘以B。最后,它等价于补码的和。这是补码,这也是补码。把它们加起来,就得到了和。

second, two forms, two forms totally, to represent the de Morgan's theorem.

第二,有两种形式,完全有两种形式来表述德摩根定律。

we have already done the exercise, I will just skim this slide.

我们已经做过这个练习了,所以我只快速过一下这张幻灯片。

and we also have learned the AND gate. we call it universal logic gate. universal is generally applicable. this means you can only just use AND gate. to represent all the remaining gates. You can use the AND gate to express NOT.

而且我们还学习了与门。我们称之为通用逻辑门。“通用”的意思是,它通常适用于各种情况。这意味着,你只需要使用与门就可以了。来表示所有其他的逻辑门。你可以用与门来表示非门。

And similarly, you can use AND to express OR.

同样地,你也可以用与门来表示或门。

And so on. Now we want to learn the second universal gate. apart from the AND gate, here is the second universal gate. which is NOR. universal logic gate. Similarly, we can use NOR gate to represent, to express all the remaining gates. So this is the symbol of NOR, right? You OR first. and then NOT.

以此类推。现在,我们想学习第二种通用逻辑门。除了与门之外,还有第二种通用逻辑门。那就是或非门。通用逻辑门。同样地,我们可以用或非门来表示或实现所有其他的逻辑门。这就是或非门的符号,对吧?首先是“或”运算。然后取反。

Okay, for the first one, for example, the NOT gate. If you still remember the NOT gate, NOT is we OR first.

好的,以第一个为例,就是非门。如果你还记得非门的话,它也是先进行“或”运算。

and then apply the NOT function.

然后再应用非函数。

So the first symbol.

所以这就是第一个符号。

represent this expression, right? and you will get a NOT A.

它表示这个表达式,对吧?这样你就能得到非A。

The OR gate. so for the OR gate, we have to apply the NOT gate twice. We apply the NOT gate twice.

那么或非门呢?对于或门,我们需要应用两次非门。我们应用两次非门。

This is the NOT gate. And then you apply it twice. which means this will be the A here.

这就是非门。然后你把它应用两次。这意味着这里就是A。

Right? And if you apply it twice and you simplify, according to the De Morgan's theory.

对吧?如果你应用两次并进行化简,根据德摩根定律,就是这样。

so the two not function can be removed.

所以,这两个非运算符号可以去掉。

and a and b

而A和B

times and b is a and b.

相乘的结果就是A和B。

so you get the or. you get the or gate. finally.

所以你得到了“或”运算。你得到了一个或门。最后。

and also you can use the not gate to express the and gate.

另外,你也可以用非门来表示与门。

you can find that the number of the not gate is increasing.

你会发现,非门的数量增加了。

the first one, firstly, we just use one not gate to represent the not. for the or, you have to use two. and for the and, use three. for the nand gate, you use four.

首先,我们只用了一个非门,来表示非运算。而对于或运算,你必须使用两个。对于与运算,则需要三个。而对于与非门,你需要四个。

but there's a small error here. i saw student just send me message, yeah, there's a small error here.

不过,这里有一个小错误。我看到有学生给我发了消息,确实这里有个小错误。

yeah, very good.

是的,非常棒。

so here should be a b.

所以这里应该是A和B。

and b.

还有B。

similarly here, here should be a b.

同样,这里也应该是A和B。

okay, maybe let's do the and gate together.

好的,那我们一起做一下与门吧。

we know a not a is a not, right?

我们知道,非A就是A的非,对吧?

the first one is a not. and b here is b not.

第一个就是非A。而这里的B就是非B。

and then we apply the not gate again.

然后,我们再应用一次非门。

so this will be the final form. and using de morgan's theorem.

这就是最终的形式。然后利用德摩根定律。

and you can finally get a b.

最后就能得到A和B。

so this should be a and b not. a or b. there's more error here.

所以,这应该是A与B的非。或者是A或B。这里还有一个错误。

and i found something interesting. for example,

而且我发现了一个有趣的现象。比如说,

for the not gate, if you want to express the not.

对于非门来说,如果你想表达非,

you use the not gate for one for once.

你可以用一个非门。就可以了。

and if you compare it with nand gate,

如果你把它与与非门进行比较,

for nand gate,

对于与非门,

you also use just once. and you launch a, you see f, you'll get a not.

也只需要用一个。你把A输入进去,看到输出是F,那就得到了一个非门。

so this is the commonality.

所以,这就是它们的共同点。

for both gates, either you use the nand gate or you use not gate. finally, you just use one symbol.

对于这两种门来说,你要么用与非门,要么用非门。最后,你只需要用一个符号。

you will get the a not. this is nand gate, or you use the not gate.

就能得到A的非。这是与非门,或者你也可以用非门。

but actually the circuit has has buried. has varied input. which means the input is not always high. or it's not always low. instead, the input is sometimes has very high voltage, sometimes has very low voltage. this is defined as pulsed operation. like, yeah, everybody have pulse, right? so it's like sometimes it's high, sometimes it's low, sometimes it's high. right. it's not always high, not always low.

但实际上,这个电路有冗余。输入是多样的。这意味着输入并不总是高电平。也不总是低电平。相反,输入有时会有很高的电压,有时又会有很低的电压。这被定义为脉冲操作。就像,是的,每个人都有脉搏,对吧?所以它就像这样,有时是高电平,有时是低电平,有时又是高电平。对。它不是一直高,也不是一直低。

and so the circuit we have analyzed so far have constant inputs. it's common for the input level to vary. in your pulsed manner.

那么,到目前为止我们分析的这个电路,有恒定的输入。但输入电平发生变化是很常见的。就是以脉冲的方式。

but the logic we have learned before, is there applicable? but the output must be calculated for every stage. in the input waveform.

但是我们之前学到的逻辑,还适用吗?但是,必须对每一级输出进行计算。也就是根据输入波形来算。

this means, for example, this is the x-axis. should be the time, right? and the y-axis is the voltage. Okay, here is high, is one. here is no. zero. here is no, zero.

这意味着,举个例子,这是x轴。应该是时间,对吧?而y轴是电压。好的,这里是高电平,也就是1。这里是低电平。0。这里也是低电平,0。

So, with increasing of time, sometimes you get one. sometimes you get zero as input. so because the input is changing. because the input is changing. If you use this case, the output is also changing, right?

所以,随着时间的推移,有时候会得到1。有时候输入是0。这是因为输入在变化。因为输入在变化。如果你用这种情况,输出也会随之变化,对吧?

so this is the point here. in this slide, you should always consider how the output will change. based on the input. how the output will be changed based on the input.

所以,这就是这里的关键点。在这张幻灯片里,你应该始终考虑到输出是如何变化的。这取决于输入。输出会根据输入而发生怎样的改变。

and here we have an example. Two parts. Input.

这里我们有一个例子。分为两部分。首先是输入。

Sometimes it's high. Here is high, low. high, low, high. And B, also low, high, low, high. So we have a parsed input. And if you have this circuit, A and B are the input. How can you compute the output x?

有时候它是高电平。这里是高,这里是低。高、低、高。而B也是低、高、低、高。所以,我们有一个解析后的输入。如果你有这个电路,那么A和B就是输入。那么,你怎么计算输出X呢?

We first should analyze what's this circuit. we first should analyze what this circuit mean, right?

首先,我们应该分析一下这个电路是什么。对吧?

Here is the AND gate, right? A and B.

这里是一个与门,对吧?A和B。

Here is the NOT gate, the triangle plus one small circle is NOT gate.

这里是一个非门,那个三角形加一个小圆圈就是非门。

let's write the expression together. So for the gate above, it's AND gate, A AND B.

让我们一起来写出表达式。那么对于上面的这个门,它是与门,就是A与B。

And for the gate below, first we apply the NOT function. for A and B. you will get A not and B not. and they are ANDed together, right?

而对于下面的这个门,首先我们应用非函数。对A和B。你会得到A的非和B的非。然后它们再经过与运算,对吧?

And finally, there's OR logical gate. This is the OR.

最后,有一个或门。这就是或。

So the logical symbol, the circuit, represents this equation. A AND B. OR is NOT A AND NOT B.

所以,这个逻辑符号,也就是电路图,表示的是这个方程。A与B。或则是A的非与B的非。

And now we can draw the truth table. You can draw the truth table. For example, A, B, X. A is zero.

现在,我们可以画出真值表了。比如,我们可以这样画。A、B、X。A是0。

Zero could be one.

0可以是1。

Okay. If A is zero, B is zero. What is the output of this one?

好的。如果A是0,B也是0。那么这个的输出是什么?

Oh, zero.

哦,是0。

It should be one, right?

应该是1,对吧?

Because this is zero. This is one.

因为这里是0。这里是1。

And if A is zero, B is one.

如果A是0,B是1。

Zero.

还是0。

Is that just stable?

这是稳定的吗?

And this is the input of A. How to change this time? And this is the input of B.

这是A的输入。这次要怎么改变?这是B的输入。

How is it? You get A?

怎么样?你得到A了吗?

You get A is high and B is low, right?

A是高电平,B是低电平,对吧?

Finally, get the output. How the output form should look like?

最后,得到输出。输出应该是什么样子的?

Any questions?

有什么问题吗?

Okay, if there's no issues,

好的,如果没有问题的话,

we'll like to the story.

我们就进入下一个故事。

You can download the PDF from Canvas. This is the second tutorial.

大家可以从Canvas上下载PDF文件。这是第二个教程。

At first, focus on the first tutorial.

首先,我们先关注第一个教程。

The third thing is given.

第三个已经给出了。

Java C will be more

Java C会更加麻烦。

You have

你有

a or b.

A或者B。

and this is the log function. right? so we have p naught. this is all again.

这是对数函数。对吧?所以,我们有P0。这里又是全部。

so p naught or c. you have p naught or c, right? and finally, they are and together.

所以是P0或者C。你有P0或者C,对吧?最后,它们是“与”的关系,要一起考虑。

so this is the first expression.

所以,这就是第一个表达式。

for the first circuit.

针对第一个电路。

this is the equation for the first circuit.

这就是第一个电路的方程。

and so this is a.

所以,这就是A。

and b.

还有B。

b you have this is a land gate, right? so you have first

B的话,这是一个与门,对吧?所以,首先

it's not correct.

这是不对的。

the last gate is an and gate.

最后一个门是与门。

oh, and gate.

哦,与门。

so it's and gate. yes, you are correct. thanks for pointing out.

所以是与门。是的,你说得对。谢谢你的指出。

so this is the correct solution for question a.

所以,这就是问题A的正确解法。

okay, let's have a look at question b. question b, you have the land gate. land gate, nor gate. and not gate again. okay, for the first land gate,

好的,我们来看一下问题B。问题B中,有一个与门。与门,或非门。还有一个非门。好的,对于第一个与门,

you have a, b.

输入是A和B。

so this is the first land gate, right? yeah. and you have the nor gate.

所以这就是第一个与门,对吧?是的。然后还有一个或非门。

and you have the nor gate. Nor gate is again here.

还有一个或非门。或非门在这里。

and then finally you have the second land gate. with c.

最后,还有第二个与门。它的输入是C。

this will be the expression for the second logic. logic circuit.

这就是第二个逻辑门的表达式。逻辑电路。

okay, for the question two. similarly,

好的,对于第二题。同样地,

we will write the logical expressions for the following circuit.

我们要为下面的电路写出逻辑表达式。

okay, this is or.

好的,这是一个或门。

you have a or b.

输入是A或B。

and below you have c or d. right?

下面还有C或D。对吧?

and then they are and together.

然后它们再经过一个与门。

you have them and together.

是的,把它们放在一起进行与运算。

and for the question b,

至于B题,

you first have the logic gates.

首先有逻辑门。

a, b,

A、B、

c.

C。

and c is, okay, another logic gate in here.

而C是,这里还有一个逻辑门。

no, this is not a log function. the log function is triangle. plus one small circle, okay? this is just a load. which means needs to branch. also use c.

不,这不是一个逻辑函数。逻辑函数是三角形的。再加上一个小圆圈,好吗?这只是一个负载。这意味着需要分路。也使用C。

and we have cd.

还有CD。

and below we have a, sorry.

下面我们有,抱歉。

below we have cd, and land again.

下面是CD,又是LAND。

and finally, there is a log gate. so we plus

最后,还有一个逻辑门。所以我们加上

this will be the final solution. for the question b.

这就是最终的解决方案。针对问题B。

yeah. okay, any questions until now?

好的。现在有什么问题吗?

yes.

有。

the first question is about determine the truth tables for the circuits.

第一个问题是关于确定电路的真值表。

okay. so once you have the expression here, right? and then you draw the table.

好的。那么,一旦你有了这里的表达式,对吧?然后你就可以画出表格了。

you draw the table a, b, c.

你画出表格,A、B、C。

x. okay. if a zero,

X。好的。如果A是0,

c,

C,

you have c as well.

你也有C。

so there will be many combinations. you have eight combinations. right? eight. because both variable have two options. and you have three variables, so totally have eight combinations.

所以会有许多种组合。一共有八种组合。对吧?八种。因为这两个变量都有两个选项。而且你有三个变量,所以总共就有八种组合。

is there one

还有没有一种

is that you have one zero one.

情况是,是1、0、1?

okay, for the first question. first expression, you have three variables and every variables have two options. and finally you get eight combinations.

好的,对于第一个问题。第一个表达式,你有三个变量,每个变量都有两个选项。最后得到了八种组合。

if a is zero, b zero, c zero, what is the final solution for this one? should be zero, right? should be yes.

如果A是0,B是0,C也是0,那么这个的结果是什么?应该是0,对吧?是的,应该是。

if a zero, b zero, c is one.

如果A是0,B是0,C是1。

should be zero.

也应该是0。

should be zero as well. Should be one.

同样也是0。应该是1。

zero, one, one.

0,1,1。

okay, this is the truth table. for the expression a.

好的,这就是真值表。对于表达式A来说。

similarly for the expression b. yeah, just draw this table.

同样地,对于表达式B。是的,只要画出这个表格就行。

it still has three variables, right? and just list all the combinations. and you replace the variables. replace the variable with concrete value. and one is the output.

它仍然有三个变量,对吧?然后把所有的组合都列出来。然后替换变量。用具体的数值替换变量。其中一个就是输出。

okay, we have 10 minutes break.

好的,我们休息十分钟。

课堂最终稿

Good morning. Let's begin our course. First, I would like to go through what we have learned in our last course.

早上好。我们开始上课。首先,我想回顾一下上节课所学的内容。

If you still remember, we have learned six different logical symbols. The first one is the NOT function. You can use this symbol—a triangle plus one small circle—to represent the NOT function. Here you can see the table. When A is zero, what is A naught? When A is one, what is A naught?

如果你还记得,我们已经学了六种不同的逻辑符号。第一种是NOT函数。你可以用这个符号——一个三角形加一个小圆圈——来表示NOT函数。这里你可以看到真值表。当A为零时,A非是多少?当A为一时,A非是多少?

This table is called a truth table. The second logical function is the AND function. You can also see the truth table here. When A is 0, B is 0, A AND B is 0. And people use this symbol to represent the AND function.

这个表叫做真值表。第二个逻辑函数是 AND 函数。大家也可以在这里看到它的真值表。当 A 为 0,B 为 0 时,A AND B 为 0。人们用这个符号来表示 AND 函数。

The AND function works similarly with a truth table. Now, the NAND function: NAND(A, B) is A AND B first, and then NOT. So you can see here is the AND symbol—this is the AND logic symbol—plus the NOT, and you will get NAND. This is a combined gate.

AND 函数的真值表类似。接下来是 NAND 函数:NAND(A, B) 即先做 A AND B,再取 NOT。可以看到,这里是 AND 符号——即 AND 逻辑符号——加上 NOT,就得到 NAND。这是一个组合门。

Combine the symbols, and you will also see NOR. NOR is A OR B first, and then you apply the NOT function. This is OR, this is NOT. When you combine them together, you will get this one — the NOR symbol. And here you can also see the truth table. When A equals 0, B equals 0, what is the outcome of the NOR function?

将这些符号组合起来,你还会看到NOR。NOR是先对A和B做OR运算,然后再施加NOT函数。这是OR,这是NOT。将它们组合在一起,就得到了这个——NOR符号。这里你还可以看到真值表。当A等于0,B等于0时,NOR函数的输出结果是什么?

XOR, exclusive OR, is a little bit different. The definition is that A XOR B equals A AND NOT B OR NOT A AND B. And the truth table is that the output is high if the inputs are different. So if A and B are different, you get a high output.

XOR,即异或门,与其他门电路略有不同。其定义为:A XOR B 等于 A AND NOT B OR NOT A AND B。从真值表来看,当输入不同时,输出为高电平。也就是说,如果 A 和 B 不同,就会得到高电平输出。

For example, A is 0, B is 1. They are different, so the outcome is 1. A is 1, B is 0. They are different, so you get 1. And this is the symbol to represent exclusive OR. Subsequently, we have learned three different laws. The first one is the commutative law: A OR B is equivalent to B OR A.

例如,A为0,B为1,两者不同,所以结果为1。A为1,B为0,两者不同,结果也是1。这就是表示异或(exclusive OR)的符号。接下来,我们已经学习了三条不同的定律。第一条是交换律:A OR B 等价于 B OR A。

A AND B equals B AND A. You can switch the position of two variables. This is the first law, the commutative law. The second law is the associative law.

A AND B 等于 B AND A。你可以交换两个变量的位置。这是第一条定律,即交换律。第二条定律是结合律。

You can simply remove the brackets. In this situation, B OR C is evaluated first, then U OR A. This is equivalent to evaluating U OR A AND B first, and then OR with C. So the order does not matter.

你可以直接去掉括号。在这种情况下,先计算 B OR C,再计算 U OR A。这等价于先计算 U OR A AND B,然后再与 C 做 OR 运算。因此顺序并不重要。

The second law is the associative law. Given vectors A, B, and C, you can add A and B first, then add C; or add A and C first, then add B. The result is the same. These are the three laws. Based on these three laws, we apply what we have learned.

第二条定律是结合律。给定向量A、B和C,你可以先将A与B相加,再加入C;或者先将A与C相加,再加入B,结果相同。这就是三条定律。基于这三条定律,我们运用所学内容。

We have learned De Morgan's theory. There are two forms to represent De Morgan's theory. The first form: (A OR B) NOT is equivalent to NOT A AND NOT B. This means the complement of a sum. We have learned two's complement at the very beginning. The complement of a sum—this is a sum, A OR B is a sum—the complement of a sum is equivalent to the product of complements: A complement times B complement. This is the first form.

我们已经学习了德摩根定理。德摩根定理有两种表达形式。第一种形式:(A OR B) NOT 等价于 NOT A AND NOT B。这意味着补码的和。我们在最开始学过二进制补码。一个和的补码——这是一个和,A OR B 是一个和——和的补码等价于补码的积:A 的补码乘以 B 的补码。这是第一种形式。

Second is the complement of a product. Here you have the product first: A times B, A AND B. And then you apply the bar. This is equivalent to the sum of the complements. This is complement, this is complement—you add them together, you get the sum. These two forms of De Morgan's theorem represent the duality.

第二是乘积的反演。这里先有乘积:A 乘以 B,即 A 与 B。然后加上反演符号(上划线)。这等于各反演之和。这是反演,这也是反演——将它们相加,就得到和。德摩根定理的这两种形式体现了对偶性。

We have also learned the lambda gate. We call it a universal lambda gate. Universal means generally applicable. This means we can use only lambda gates to represent all the remaining gates. You can use the lambda gate to express NOT. You can use the lambda gate to express AND.

我们还学习了Lambda门。我们称之为通用Lambda门。通用意味着普遍适用。也就是说,我们可以仅使用Lambda门来表示所有其余的门电路。你可以用Lambda门来表达NOT。你可以用Lambda门来表达AND。

Similarly, we can use the NAND to express OR and NOR. Now we want to learn the second universal gate. Apart from the NAND gate, here is the second universal gate, which is the NOR gate. The universal NOR gate. Similarly, we can use the NOR gate to express all the remaining gates. So this is the symbol of NOR: OR first, and then NOT.

类似地,我们可以用与非门来表示或门和或非门。现在我们来学习第二种通用门。除了与非门之外,第二种通用门就是或非门。同样地,我们可以用或非门来表示所有其余的门电路。这就是或非门的符号:先是或运算,再取非。

For the first example, consider the NOT gate. If you still remember, the NOT gate outputs either V or F. Then we apply the log function. The first symbol represents this expression, and you get log A.

第一个例子,考虑非门。如果你还记得,非门的输出要么是 V,要么是 F。然后我们施加对数函数。第一个符号代表这个表达式,得到 log A。

For the OR gate, we have to apply the NOT gate twice. This is the NOT gate, and then you apply it twice, which means this will be A here.

对于或门,我们需要使用两次非门。这就是非门,然后对它使用两次,这意味着这里就是A。

If you apply De Morgan's laws twice and simplify, the two NOT functions can be removed, leaving A and B.

如果应用德摩根定律两次并化简,两个非运算可以被消除,只剩下 A 和 B。

Times AND these AND. So you get the OR gate finally. And also, you can use the NOT gate to express the AND gate. You can find the number of the NOT gate is increasing, right? The first one—

乘以这些与门。这样你最终得到或门。此外,你还可以用非门来表示与门。你会发现非门的数量在增加,对吧?第一个——

For the first statement, we just use one input to represent NOT. For OR, you have to use two. For AND, use three. For NAND gate, use four. Now, there is a small error here. A student just sent me a message pointing it out. Here should be AB, not just A.

第一个语句中,我们只用一个输入来表示非门。对于或门,需要使用两个输入。对于与门,使用三个。对于与非门,使用四个。这里有一个小错误,一位同学刚给我发了消息指出来。这里应该是AB,而不是仅仅写A。

Similarly, here should be A, B. Let's work through the initial values together. We know A₀ is a₀. The first one is a₀, and B here is b₀. Then we apply—

类似地,这里应该是 A、B。我们一起来处理初始值。已知 A₀ 等于 a₀,第一个是 a₀,而这里的 B 是 b₀。然后我们应用——

This will be the final form using De Morgan's series. You can finally get A B. So this should be A and B, not A or B. There is more error here. Similarly, there is more error here.

这就是使用德摩根定律得到的最终形式。你最终可以得到A B。所以这里应该是A与B,而不是A或B。这里还有更多错误。类似地,这里也有更多错误。

I found something interesting. For the logits, if you want to express the loss, you use the logits once. If you compare this with lambdas, for lambdas you also use them just once, and you land an ECF—you get a loss.

我发现了一个有趣的现象。对于 logits,如果你想表达损失函数,你只需要使用一次 logits。如果将其与 lambdas 进行比较,对于 lambdas 你也只需使用一次,然后得到一个 ECF——你就得到了一个损失。

This is the commonality for both cases. Either you use the NAND gate or you use the NOT gate; finally, you just use one symbol on qubit A0. This is the NAND gate, or you use the NOT gate. But actually, the circuit has varied input, which means the input...

这是两种情况的共同点。无论你使用NAND门还是NOT门,最终都只是在量子比特A0上使用一个符号。这是NAND门,或者你使用NOT门。但实际上,该电路具有可变输入,这意味着输入……

The input is not always high or not always low. Instead, the input sometimes has very high voltage, sometimes has very low voltage. This is defined as pulsed operation. Like everybody has pulses, right? So it's like sometimes it's high, sometimes it's low, sometimes high, sometimes low. It's not always high, not always low.

输入并不总是高电平,也不总是低电平。相反,输入有时具有非常高的电压,有时具有非常低的电压。这被定义为脉冲工作。就像每个人都有脉搏一样,对吧?所以它有时是高电平,有时是低电平,有时高,有时低。它不总是高电平,也不总是低电平。

The circuit we have analyzed so far has had constant input levels. It is common for the input level to vary in your parser. But the logic we have learned before is still applicable. However, the output must be calculated for every stage in the input waveform. This means, for example, the x-axis should be the time, and the y-axis is the voltage. Here is high, which is one; here is low, zero.

我们目前分析的电路具有恒定的输入电平。在实际设计中,输入电平通常会发生变化。但我们之前学过的逻辑仍然适用,只是输出必须在输入波形的每个阶段进行计算。例如,x轴表示时间,y轴表示电压。这里为高电平,即1;这里为低电平,即0。

With increasing time, sometimes you get one, sometimes you get zero as input. Because the input is changing, if you use this gate, the output is also changing. The key point in this slide is that you should always consider how the output will change based on the input.

随着时间增加,有时输入为1,有时输入为0。因为输入在变化,如果使用这个门电路,输出也会随之变化。这张幻灯片的关键点在于:始终要考虑输出如何随输入而变化。

We have an example to parse input. Here is A: high, low, high, low, high; and B: low, high, low, high, low. So we have a parsed input. If we have this circuit, A and B are the inputs. How can we compute the output X?

我们有一个解析输入的示例。A 的值为:高、低、高、低、高;B 的值为:低、高、低、高、低。这样我们就得到了一个已解析的输入。如果我们有这个电路,A 和 B 是输入端。我们如何计算输出 X?

We should first analyze what this circuit means. Here is the AND gate, right? A AND B. Here is the NOT gate — the triangle plus one small circle is a NOT gate. Let's write the expression together. For the gate above, it's an AND gate: A AND... And for the...

我们首先应该分析这个电路的含义。这里是与门,对吧?A与B。这里是非门——三角形加一个小圆圈就是非门。让我们一起写出表达式。对于上面的门,它是一个与门:A与……而对于……

First, we apply the NOT function to A and B. You will get A NOT and B NOT, and they are ANDed together. And finally, there is an OR logic gate. So the circuit represents this equation: NOT(A AND B) equals NOT A OR NOT B.

首先,我们对A和B施加NOT运算,得到A非和B非,然后将它们进行AND运算。最后,还有一个OR逻辑门。因此该电路表示如下等式:NOT(A AND B) 等于 NOT A OR NOT B。

Now we can draw the truth table. For example, with columns A, B, and A. When A is zero, zero.

现在我们可以画真值表。例如,列为 A、B 和 A。当 A 为零时,零。

If A is zero and B is zero, what is the output? It should be one, right? Because this is zero, this is one. And if A is zero and B is one?

如果A为零,B为零,输出是什么?应该是一,对吧?因为这里是零,这里是一。那么如果A为零,B为一呢?

This is the truth table. We can draw the figure like this. This is the input of A, how it changes with time. And this is the input of B, how it changes with time. For this time step, you get A is high.

这是真值表。我们可以画出这样的图。这是输入A随时间的变化,这是输入B随时间的变化。在这个时间步,A为高电平。

When A is high and B is low, you get clear. For this small interval, A is low and B is low too, so you get high. Based on the truth table, you can finally determine what the output form should look like. Any questions?

当A为高电平、B为低电平时,输出为低。在这个小时间间隔内,A为低电平且B也为低电平,因此输出为高。根据真值表,你最终可以确定输出波形应该是什么样子。有问题吗?

Any questions? Just raise your hand. If there are no issues, we will go back to the lecture.

有问题吗?请举手。如果没有问题,我们继续讲课。

We will put the tutorial together for this lecture. You can download the PDF from Canvas. This is the second tutorial. Let's first focus on the first two questions.

我们将为本次课程整理教程。你们可以从Canvas上下载PDF文件。这是第二份教程。我们先来关注前两个问题。

[Students work silently on the assigned problems. No instructor speech is present in this segment.]

【学生安静地完成布置的题目。本段无教师讲授内容。】

And this is not a function, right? Not a function. So we have P not OR C. We have P not OR C, right? And finally, they are AND together. So this is the first expression.

这不是一个函数,对吧?不是函数。所以我们有 P非 或 C。我们有 P非 或 C,对吧?最后,它们用 AND 连接在一起。这就是第一个表达式。

This is the equation for the first circuit. This is A. And B — this is a NAND gate. So you have first... A is not correct.

这是第一个电路的方程。这是A。而B——这是一个与非门。所以首先……A是不正确的。

The last gate is an AND gate. Yes, great, thanks for pointing that out. So this is the correct solution for question eight. Let's have a look at the next one.

最后一个门是AND门。很好,感谢指出。这就是第八题的正确解法。我们来看下一题。

Look at Question B. You have a NAND gate, a NOR gate, and a NAND gate again. For the first NAND gate, you have inputs A and B, producing NOT. This is the first NAND gate. Then you have the NOR gate, with P as one input here. And finally, you have the second NAND gate with C.

来看B题。这里有一个与非门、一个或非门,再一个与非门。第一个与非门的输入是A和B,输出取反。这是第一个与非门。然后是或非门,P是它的一个输入。最后是第二个与非门,输入包含C。

This will be the expression for the second logical circuit. For question two, similarly, we will write the logical expressions for the following circuit. This is OR.

这就是第二个逻辑电路的表达式。对于第二题,类似地,我们将为以下电路写出逻辑表达式。这是一个或门。

You have A or B, and below you have C or D. Then they are ANDed together.

你有 A 或 B,下方有 C 或 D,然后将它们进行 AND 运算组合在一起。

For question B, first we have the NAND gates. A and B are NAND gates. C is another NAND gate here. Now, this is not a NOT function. The NOT function is a triangle plus a small circle. This is just a load, which means these two branches both use C.

对于问题B,首先我们有与非门。A和B是与非门。C是这里的另一个与非门。注意,这不是非门函数。非门函数是一个三角形加一个小圆圈。这只是一个负载,意味着这两条分支都使用C。

And we have CD. Below we have CD NAND again. And finally, there is a NOR gate.

这里有CD。下面是CD NAND门。最后是一个NOR门。

Is there a final solution for question B? Yes. Any questions on the handout? The first question is about determining the truth table for the first expression. Once you have the expression here, you draw the table and put zeros and ones.

问题B有最终解了吗?是的。讲义上还有问题吗?第一个问题是关于如何确定第一个表达式的真值表。一旦你得到了这里的表达式,你就画出真值表,填入零和一。

For example, take variables A, B, and C. If A is zero, you have C as well. So there will be many combinations. You have eight combinations, right? Eight. Because each variable has two options, and you have three variables, so totally we have eight combinations.

例如,取变量 A、B 和 C。如果 A 为零,你还有 C。所以会有很多组合。一共有八种组合,对吧?八种。因为每个变量有两个取值,而你有三个变量,所以总共有八种组合。

For the first question, the first expression: you have three variables, and every variable has two options, and finally you get eight combinations.

对于第一个问题中的第一个表达式:你有三个变量,每个变量有两个取值,最终得到八种组合。

If A is 0, B is 0, C is 0, what is the final solution for this one? It should be 0, right? Yes. If A is 0, B is 0, C is 1, it should be 0 as well. The next one should be 1.

如果 A 为 0,B 为 0,C 为 0,这一项的最终结果是什么?应该是 0,对吧?是的。如果 A 为 0,B 为 0,C 为 1,结果也应该是 0。下一项的结果应该是 1。

We want zero, one, one. This is the truth table.

我们要填入零、一、一。这就是真值表。

For expression A, and similarly for expression B, just draw this table. It still has three variables. Just list all the combinations, and replace the variable with concrete values. One is the output. Do you have time for this question?

对于表达式A,类似地对于表达式B,只需画出这个表。它仍然有三个变量。只需列出所有组合,并将变量替换为具体值。一个是输出。你们有时间回答这个问题吗?

I'm unable to process this request because no audio content was provided for the 2104.0–2111.1 second segment. Please share the audio file or a raw transcript so I can clean and format it as requested.

无法处理此请求,因为未提供 2104.0–2111.1 秒时段的音频内容。请分享音频文件或原始转录文本,以便我按要求进行清洗和格式化。

课程总结

课程概览

本次课程是“电子电气工程导论”9月23日第一节。教师首先回顾上节课学习过的数字逻辑基础:六种逻辑符号及其真值表、三条布尔代数定律、德摩根定理,以及通用逻辑门。随后引入“脉冲操作”和输入波形分析,说明当输入不再恒定为高电平或低电平时,输出需要按照输入波形的每个阶段重新计算。课程后半段使用 Canvas 上第二份 tutorial 的前两题进行练习:从给定电路图写逻辑表达式,再根据表达式列真值表。课堂中多名学生指出幻灯片中的小错误,教师确认并纠正。最后教师安排约 10 分钟休息。

本节课的主线是:逻辑门与真值表 → 布尔代数定律与德摩根定理 → 通用逻辑门 → 输入变化时的输出波形分析 → tutorial 练习与纠错。

主要内容

一、六种逻辑符号与真值表复习

教师回顾上节课学过的六种逻辑功能:NOT、AND、OR、NAND、NOR、XOR。每个功能都对应一个逻辑符号和一张真值表。真值表用于列出所有输入组合及其对应输出。

  1. NOT function,非函数/非门

    • 符号:一个三角形加一个小圆圈。
    • 功能:输出与输入相反。
    • 课堂例子:当 A 为 0 时,NOT A 为 1;当 A 为 1 时,NOT A 为 0。
    • 教师特别补充:这个表叫做 truth table,真值表。
  2. AND function,与函数/与门

    • 符号:教师展示 AND 逻辑符号。
    • 功能:只有所有输入都为 1 时,输出才为 1。
    • 课堂例子:A 为 0,B 为 0 时,A AND B 为 0。
  3. OR function,或函数/或门

    • 符号:教师展示 OR 逻辑符号。
    • 功能:只要有一个输入为 1,输出为 1。
    • 课堂说明:同样用真值表和符号表示。
  4. NAND function,与非函数/与非门

    • 定义:先做 A AND B,再取 NOT。
    • 符号:AND 符号加一个小圆圈,表示“与之后取反”。
    • 教师称其为组合符号/组合门。
  5. NOR function,或非函数/或非门

    • 定义:先做 A OR B,再取 NOT。
    • 符号:OR 符号加一个小圆圈。
    • 教师提问:当 A 为 0、B 为 0 时,NOR 的输出是什么?用于引导学生查真值表。
  6. XOR function,异或函数/异或门

    • 全称:exclusive OR。
    • 定义:
      [ A \oplus B = (A \land \lnot B) \lor (\lnot A \land B) ] 也就是:A AND NOT B,或者 NOT A AND B。
    • 真值表特点:当两个输入不同时,输出为高电平 1;输入相同时,输出为 0。
    • 课堂例子:A=0,B=1,二者不同,所以输出为 1;A=1,B=0,二者不同,所以输出为 1。
    • 教师展示 XOR 的对应符号,但文字稿没有详细描述符号几何形状。

按课堂定义整理六种门的真值表如下:

A B NOT A A AND B A OR B A NAND B A NOR B A XOR B
0 0 1 0 0 1 1 0
0 1 1 0 1 1 0 1
1 0 0 0 1 1 0 1
1 1 0 1 1 0 0 0

二、布尔代数三条定律

教师复习了三条重要定律,用来对逻辑表达式进行等价变形。

  1. 交换律,commutative law

    • OR: [ A \lor B = B \lor A ]
    • AND: [ A \land B = B \land A ]
    • 含义:两个变量的位置可以交换,逻辑结果不变。
  2. 结合律,associative law

    • OR: [ (A \lor B) \lor C = A \lor (B \lor C) ]
    • AND: [ (A \land B) \land C = A \land (B \land C) ]
    • 含义:括号可以移动,先算哪一组不影响最终结果。
    • 教师强调:顺序不重要。
  3. 分配律,distributive law

    • 课堂重点形式可整理为: [ A \land (B \lor C) = (A \land B) \lor (A \land C) ]
    • 含义:A 与“B 或 C”的结果,等价于“A 与 B”以及“A 与 C”分别计算后再 OR。
    • 教师还提到由这些定律可以推出一些基本布尔等式,但实时字幕没有完整列出所有具体公式,因此本节不逐一展开。

三、德摩根定理,De Morgan's theorem

教师强调德摩根定理有两种形式。

  1. 和的补码 / 或运算取反 [ \lnot(A \lor B) = \lnot A \land \lnot B ]

    • 教师解释:complement of a sum,即“和的补码”。
    • 一个 OR 表达式整体取反,等价于各变量先取反,再做 AND。
    • 注意:这里的 complement 是逻辑取反,不是算术中的二进制补码。
  2. 积的补码 / 与运算取反 [ \lnot(A \land B) = \lnot A \lor \lnot B ]

    • 教师解释:complement of a product,即“积的补码”。
    • 一个 AND 表达式整体取反,等价于各变量先取反,再做 OR。

教师用“sum 的补码变成 product 的补码”“product 的补码变成 sum 的补码”帮助学生记忆。课堂中还把逻辑补码与之前学过的二进制补码作类比,但两者含义不同:二进制补码是算术表示法,逻辑补码是布尔取反。

四、通用逻辑门,universal logic gate

教师复习了通用逻辑门的概念:只用一种门就可以实现所有其他逻辑功能。

课堂材料中多处出现 “AND gate”“land gate”“lambda gate” 等转写,但结合上下文可知,教师实际讲的是 NAND gate 是通用逻辑门。随后教师又介绍第二种通用门:NOR gate 也是通用逻辑门。

  1. NAND 是通用门

    • 可以用 NAND 表示 NOT: [ \lnot A = A \text{ NAND } A ]
    • 可以用 NAND 表示其他门,例如借助德摩根定理实现 OR: [ A \lor B = (\lnot A) \text{ NAND } (\lnot B) ] 其中 (\lnot A) 和 (\lnot B) 也可以由 NAND 实现。
    • 教师课堂中特别提到:用 NAND 表示 NOT 时,只需要一个符号;把 A 输入同一个 NAND 门,就能得到 NOT A。
    • 课堂中发现幻灯片有小错误。学生发消息指出某处应该写成 AB,而不是只写 A 或其他形式。教师确认:“very good”,并说这里确实有小错误。
  2. NOR 是第二通用门

    • 教师说明:除了 NAND 之外,NOR 也是通用逻辑门。
    • NOR 的符号就是:先 OR,再 NOT。
    • 类似地,可以用 NOR 表示所有其他门。
    • 课堂提到用通用门表示其他门时,所需门数会增加,字幕中出现 1、2、3、4 等递增说法;但具体对应关系受转录影响较大,复习时应以课件图纸和教师最终更正为准。
  3. 通用门的核心意义

    • 在芯片制造和电路设计中,如果某一类门特别容易制造,就可以只生产这种门,再用它搭建所有逻辑功能。
    • NAND 和 NOR 因此被称为 universal logic gate。

五、脉冲操作与输入波形分析

教师从“恒定输入”转向“变化输入”。

  1. 恒定输入与变化输入

    • 之前分析的电路常假设输入一直为高或一直为低。
    • 实际电路中,输入电压会随时间变化:有时高电平,有时低电平。
    • 这种输入不总是高、不总是低的情况,教师称为 pulsed operation,脉冲操作。
    • 高电平通常对应逻辑 1,低电平对应逻辑 0。
  2. 逻辑仍然适用,但输出要逐段计算

    • 教师强调:之前学过的逻辑仍然适用。
    • 但因为输入变化,输出也会变化,必须按照输入波形的每个阶段分别计算。
    • 时间轴通常作为 x 轴,电压作为 y 轴。
    • 课堂要求:看到输入波形时,要始终考虑输出如何随输入变化。
  3. 课堂示例电路 教师给出一个由 A、B 输入的电路:

    • 上面是一个 AND 门:A AND B。
    • 下面先对 A、B 分别取 NOT,再做 AND:NOT A AND NOT B。
    • 最后两部分进入 OR 门。
    • 因此表达式为: [ X = (A \land B) \lor (\lnot A \land \lnot B) ]
    • 这个电路的真值表为:
    A B X
    0 0 1
    0 1 0
    1 0 0
    1 1 1
    • 教师现场提问:如果 A=0,B=0,输出是什么?应为 1;如果 A=0,B=1,输出为 0。
    • 随后根据 A、B 的高低电平波形,逐段确定输出波形。
    • 注意:精修稿中有一处把该电路误写成德摩根形式 ( \lnot(A \land B)=\lnot A \lor \lnot B )。根据实时字幕和电路结构,教师该例实际是 ((A \land B)\lor(\lnot A \land \lnot B))。

六、Tutorial 练习与课堂问答

教师要求从 Canvas 下载第二份 tutorial 的 PDF,先关注前两个问题。

  1. 练习目标

    • 根据给定电路图写出逻辑表达式。
    • 根据表达式画真值表。
    • 用具体 0/1 值替换变量,得到输出。
  2. 三变量真值表的组合数

    • 教师强调:三个变量各有 2 种取值,所以总共有: [ 2^3 = 8 ] 种组合。
    • 学生需要列出全部 8 行,不能遗漏。
  3. 课堂核对示例

    • 对于某个三变量表达式,教师带学生核对:
      • A=0,B=0,C=0,输出为 0。
      • A=0,B=0,C=1,输出也为 0。
      • 下一行输出应为 1。
      • 课堂还出现 0、1、1 等组合的讨论。
    • 由于实时字幕不完整,本节不伪造完整八行真值表,复习时应以课件和教师板书为准。
  4. 问题纠错与易错点

    • 学生指出某个门的判断错误,教师确认“最后一个门是 AND 门”。
    • 教师指出:NOT 函数的符号是三角形加一个小圆圈,不是任意带小圆圈的线。
    • 图中某些线条分叉不是逻辑函数,而是 load / branch,负载/分支,表示同一个信号 C 被送到两个地方使用。
    • 问题 2a 中,教师带写表达式为: [ X = (A \lor B) \land (C \lor D) ] 即 A OR B,与 C OR D,再 AND。
    • 问题 2b 涉及多个 NAND 门和一个 NOR 门,并有 C 信号分叉。具体完整表达式受字幕限制,复习时以 PDF 图纸为准。

关键知识点与详细解释

  1. 真值表

    • 真值表列出所有可能输入组合及对应输出。
    • n 个二值变量共有 (2^n) 种组合。
    • 两个变量有 4 行,三个变量有 8 行。
  2. 六种逻辑门的核心区别

    • NOT:取反。
    • AND:全 1 才为 1。
    • OR:有 1 就为 1。
    • NAND:AND 后取反。
    • NOR:OR 后取反。
    • XOR:输入不同为 1,相同为 0。
  3. 布尔代数三定律

    • 交换律:变量位置可交换。
    • 结合律:括号位置可变化。
    • 分配律:AND 对 OR 分配,例如 (A \land (B \lor C) = (A \land B) \lor (A \land C))。
  4. 德摩根定理

    • (\lnot(A \lor B)=\lnot A \land \lnot B)
    • (\lnot(A \land B)=\lnot A \lor \lnot B)
    • 记忆口诀:取反后,OR 变 AND,AND 变 OR,同时每个变量取反。
  5. 通用逻辑门

    • NAND 和 NOR 都是 universal logic gate。
    • 只用 NAND 或只用 NOR,都可以搭建 NOT、AND、OR 等所有基本逻辑。
    • 课堂材料中 “AND gate”“land gate”“lambda gate” 应结合上下文识别为 NAND 的转录误差。
  6. 脉冲操作

    • 输入不是恒定的 0 或 1,而是随时间高低变化的波形。
    • 输出必须按时间段逐段计算。
    • 分析步骤:识别电路 → 写逻辑表达式 → 列真值表 → 对照输入波形逐段求输出。
  7. 易错点

    • 不要把 (\lnot(A \land B)) 写成 (\lnot A \land \lnot B);正确应为 (\lnot A \lor \lnot B)。
    • 不要把 (\lnot(A \lor B)) 写成 (\lnot A \lor \lnot B);正确应为 (\lnot A \land \lnot B)。
    • NOT 符号是三角形加小圆圈;普通分叉线不是 NOT。
    • 三变量真值表必须写满 8 行。
    • 课堂示例电路 ((A \land B)\lor(\lnot A \land \lnot B)) 不是德摩根第二形式,而是“同或”逻辑,输出在 A=B 时为 1。

课堂示例与问题

  1. 六种门真值表复习

    • 教师逐一展示 NOT、AND、OR、NAND、NOR、XOR 的真值表和符号。
    • 特别提问 NOT:A=0 时 NOT A 是多少?A=1 时 NOT A 是多少?
    • 特别提问 NOR:A=0、B=0 时输出是什么?
  2. 德摩根定理练习

    • 教师说之前已经做过练习,因此只快速过幻灯片。
    • 两种形式都必须掌握。
  3. NAND 通用门推导中的课堂纠错

    • 学生发消息指出幻灯片小错误。
    • 教师确认某处应写 AB,而不是只写 A。
    • 教师还确认最终某处应为 AND,而不是 OR。
  4. 脉冲输入示例

    • 输入 A、B 为高低变化波形。
    • 电路为:A AND B,以及 NOT A AND NOT B,最后 OR。
    • 输出表达式: [ X=(A \land B)\lor(\lnot A \land \lnot B) ]
    • 真值表:
      • 00 → 1
      • 01 → 0
      • 10 → 0
      • 11 → 1
    • 课堂中根据输入波形逐段判断输出。
  5. Tutorial 问题

    • 题 1:根据电路写逻辑表达式,并确定真值表。
    • 题 2a:两个 OR 门输出再 AND: [ X=(A \lor B)\land(C \lor D) ]
    • 题 2b:包含多个 NAND、一个 NOR,以及 C 的分叉。教师强调分叉不是 NOT 门。
    • 三变量真值表有 8 种组合。
    • 教师给出部分核对结果,例如 A=0、B=0、C=0 输出为 0;A=0、B=0、C=1 输出为 0;后续行输出为 1 等。

AI 延伸解释

以下内容是为了帮助理解而补充,并非教师原话。

  1. 教师示例电路等价于 XNOR,同或门

    • 教师给出的电路: [ X=(A \land B)\lor(\lnot A \land \lnot B) ] 在数字逻辑中通常称为 XNOR,同或门。
    • 它的输出规律是:A 与 B 相同则为 1,不同则为 0。
    • 这与 XOR 正好相反。
  2. NAND 实现其他门的标准数量

    • 若只用 NAND 门:
      • NOT:1 个 NAND,( \lnot A = A \text{ NAND } A )。
      • AND:2 个 NAND,( A \land B = (A \text{ NAND } B) \text{ NAND } (A \text{ NAND } B) )。
      • OR:3 个 NAND,( A \lor B = (A \text{ NAND } A) \text{ NAND } (B \text{ NAND } B) )。
      • NOR:4 个 NAND。
    • 若只用 NOR 门:
      • NOT:1 个 NOR,( \lnot A = A \text{ NOR } A )。
      • OR:2 个 NOR。
      • AND:3 个 NOR。
      • NAND:4 个 NOR。
    • 课堂字幕中“1、2、3、4”的递增说法可能与此有关,但具体对应关系应以课件为准。
  3. 逻辑补码与二进制补码不同

    • 布尔代数中的 complement 指逻辑取反:0 变 1,1 变 0。
    • 二进制补码是算术中表示有符号整数的方法。
    • 两者都翻译为“补码”,但应用场景不同,不能混淆。
  4. 波形分析的一般步骤

    • 先写出输出表达式。
    • 再列真值表。
    • 然后把时间轴分成若干区间,在每个区间读取 A、B 等输入值。
    • 最后查真值表或代入表达式得到该区间输出。
    • 这属于组合逻辑电路的波形分析。若电路中存在存储元件,则还需考虑状态和时序,但本节没有涉及。
  5. 关于转写误差的提醒

    • 材料中 “land gate”“lambda gate”“AND gate universal” 等多处结合上下文应理解为 NAND。
    • 复习时遇到明显不符合布尔逻辑的句子,应优先依据电路图、真值表和前后定义判断。

英语术语学习表

English term 中文含义 课堂语境与用法 Example sentence
NOT function 非函数/非门 用三角形加小圆圈表示,输出与输入相反 A NOT function changes 0 to 1 and 1 to 0.
AND function 与函数/与门 只有输入全为 1 时输出为 1 In an AND function, A AND B is 1 only when both inputs are 1.
OR function 或函数/或门 只要有一个输入为 1,输出为 1 The OR function gives 1 when at least one input is 1.
NAND function 与非函数/与非门 先 AND,再 NOT NAND is the opposite of AND.
NOR function 或非函数/或非门 先 OR,再 NOT NOR gives a high output only when all inputs are low.
XOR / exclusive OR 异或/异或门 输入不同时输出为 1 XOR outputs 1 when the two inputs are different.
truth table 真值表 列出所有输入组合及输出 We can use a truth table to check the circuit output.
commutative law 交换律 变量位置可以交换 The commutative law says A OR B equals B OR A.
associative law 结合律 括号位置可以改变 The associative law allows us to regroup variables.
distributive law 分配律 AND 对 OR 分配,或 OR 对 AND 分配 The distributive law expands A AND (B OR C).
De Morgan's theorem 德摩根定理 描述 OR/AND 取反后的等价关系 De Morgan's theorem turns NOT(A AND B) into NOT A OR NOT B.
universal logic gate 通用逻辑门 只用这一种门就能实现所有基本逻辑 NAND and NOR are universal logic gates.
NAND gate 与非门 通用门之一,课堂中多次用于表示其他门 You can build a NOT gate with one NAND gate.
NOR gate 或非门 第二种通用门 A NOR gate can also be used as a universal gate.
pulsed operation 脉冲操作 输入电压随时间高低变化 In pulsed operation, the input is not always high or low.
input waveform 输入波形 表示输入随时间变化的电压波形 We calculate the output for each part of the input waveform.
logic expression 逻辑表达式 用逻辑运算描述电路功能 Write the logic expression before drawing the truth table.
complement 补码/逻辑取反 在德摩根定理中指 NOT 运算 The complement of A is NOT A.
sum 和/OR 项 德摩根定理中把 OR 称为 sum De Morgan's theorem deals with the complement of a sum.
product 积/AND 项 德摩根定理中把 AND 称为 product The complement of a product becomes a sum of complements.
load / branch 负载/分支 教师说明分叉线不是 NOT 门,只是同一信号送到多处 The branch means signal C is used in two places.

复习提纲

一、基础逻辑门

  1. 能画出并识别 NOT、AND、OR、NAND、NOR、XOR 的符号。
  2. 能默写六种门的两变量真值表。
  3. 能说清 NAND 与 AND、NOR 与 OR、XOR 与 XNOR 的关系。
  4. 能解释为什么 XOR 在输入不同时输出 1。

二、布尔代数与德摩根定理

  1. 掌握交换律、结合律、分配律的公式。
  2. 能用分配律展开 (A \land (B \lor C))。
  3. 熟记德摩根两种形式:
    • (\lnot(A \lor B)=\lnot A \land \lnot B)
    • (\lnot(A \land B)=\lnot A \lor \lnot B)
  4. 能区分逻辑补码和二进制补码。

三、通用逻辑门

  1. 知道 NAND 和 NOR 都是 universal logic gate。
  2. 能用 NAND 实现 NOT: [ \lnot A = A \text{ NAND } A ]
  3. 能用 NAND 和德摩根定理实现 OR。
  4. 了解用 NAND 或 NOR 实现其他门时,门数会变化。
  5. 注意课堂材料中 land、lambda、AND 等转写在上下文中通常指 NAND。

四、波形与脉冲操作

  1. 理解 pulsed operation:输入随时间高低变化。
  2. 知道高电平对应 1,低电平对应 0。
  3. 能按步骤分析输出:
    • 识别电路;
    • 写表达式;
    • 列真值表;
    • 逐段读取输入;
    • 求每段输出。
  4. 能分析课堂示例电路: [ X=(A \land B)\lor(\lnot A \land \lnot B) ] 并知道它在 A=B 时输出 1。

五、Tutorial 与易错点

  1. 能从电路图写逻辑表达式。
  2. 能从表达式列真值表。
  3. 三变量真值表要写满 (2^3=8) 行。
  4. 不要把分叉线误认为 NOT 门;NOT 是三角形加小圆圈。
  5. 不要把德摩根形式写反。
  6. 不要把教师示例电路误写成 (\lnot(A \land B)=\lnot A \lor \lnot B)。
  7. 复习时以 Canvas 第二份 tutorial 的 PDF 和教师最终更正为准。

需要掌握的核心问题

  1. 六种逻辑门的符号和真值表分别是什么?
  2. 德摩根定理的两种形式是什么?各举一个例子。
  3. 为什么 NAND 和 NOR 被称为通用逻辑门?
  4. 如何只用 NAND 实现 NOT、AND、OR?
  5. 当输入是脉冲波形时,如何逐段求输出?
  6. 三变量真值表为什么有 8 行?
  7. 课堂示例电路 ((A \land B)\lor(\lnot A \land \lnot B)) 在哪些输入下输出为 1?
  8. 从电路图写逻辑表达式时,如何避免把分叉线误认为逻辑门?

通过你的捐助帮助此项目持续运行

这个项目完全免费,赞助不是强制的,也不会影响任何功能的使用。实时转录会持续产生模型服务费用,软件开发和服务器维护也需要长期投入,由个人一直承担这些成本有些困难。如果这个项目对你有帮助,希望你愿意赞助一两块钱;不需要很多,大家的一点支持就足以让它运行很久。

支付宝

请使用支付宝扫码

微信

请使用微信扫码