1章 ブール理論(番外編)
★回路図
・Or8Way
CHIP Or8Way {
IN in[8];
OUT out;
PARTS:
Or(a=in[0], b=in[1], out=a);
Or(a=in[2], b=in[3], out=b);
Or(a=in[4], b=in[5], out=c);
Or(a=in[6], b=in[7], out=d);
Or(a=a, b=b, out=ab);
Or(a=c, b=d, out=cd);
Or(a=ab, b=cd, out=out);
}
・Mux4Way16
CHIP Mux4Way16 {
IN a[16], b[16], c[16], d[16], sel[2];
OUT out[16];
PARTS:
Mux16(a=a, b=b, sel=sel[0], out=out1);
Mux16(a=c, b=d, sel=sel[0], out=out2);
Mux16(a=out1, b=out2, sel=sel[1], out=out);
}
・Mux8Way16
CHIP Mux8Way16 {
IN a[16], b[16], c[16], d[16],
e[16], f[16], g[16], h[16],
sel[3];
OUT out[16];
PARTS:
Mux16(a=a, b=b, sel=sel[0], out=out0);
Mux16(a=c, b=d, sel=sel[0], out=out1);
Mux16(a=e, b=f, sel=sel[0], out=out2);
Mux16(a=g, b=h, sel=sel[0], out=out3);
Mux16(a=out0, b=out1, sel=sel[1], out=out4);
Mux16(a=out2, b=out3, sel=sel[1], out=out5);
Mux16(a=out4, b=out5, sel=sel[2], out=out);
}
・DMux4Way
CHIP DMux4Way {
IN in, sel[2];
OUT a, b, c, d;
PARTS:
DMux(in=in, sel=sel[0], a=out0, b=out1);
DMux(in=out0, sel=sel[1], a=a, b=b);
DMux(in=out1, sel=sel[1], a=c, b=d);
}
・DMux8Way
CHIP DMux8Way {
IN in, sel[3];
OUT a, b, c, d, e, f, g, h;
PARTS:
DMux4Way(in=in, sel=sel[0..1], a=s0, b=s1, c=s2, d=s3);
DMux(in=s0, sel=sel[2], a=a, b=b);
DMux(in=s1, sel=sel[2], a=c, b=d);
DMux(in=s2, sel=sel[2], a=e, b=f);
DMux(in=s3, sel=sel[2], a=g, b=h);
}
Next
2章 ブール算術
Back
1章 ブール理論
・Twitter
https://twitter.com/tango3564
・Instagram
https://www.instagram.com/tango3690/