计算机要素--第一章 布尔逻辑(笔记,待更新...)
第一章一些笔记,附上csdn大佬的参考笔记:
https://blog.csdn.net/qq_41634283/article/details/103991353
有下面这些十五个门:

基本门:


Mux的真值表
DMux的真值表
复合门(?):

与Nand门的关系:

Xor门的内部构造和实现方式:

十六位就是诸如这样的一辆bus,从右到左输出(?):

And(与门)、And4(4位按位与门)、And4Way(4位全与门):

用Mux门构建一个新的门:

最后附上API:


介绍下硬件模拟器(HardwareSimulator)的简单使用吧:

笔者用Nand实现的的Not门和And门,And16代码如下:
Not:
/**
* Not gate:
* out = not in
*/
CHIP Not {
IN in;
OUT out;
PARTS:
// Put your code here:
Nand(a=in, b=in, out=out);
}
And:
/**
* And gate:
* out = 1 if (a == 1 and b == 1)
* 0 otherwise
*/
CHIP And {
IN a, b;
OUT out;
PARTS:
// Put your code here:
Nand(a=a, b=b, out=ab);
Not(in=ab, out=out);
}



浙公网安备 33010602011771号