(Usage hints for this presentation)
IT Systems, Summer Term 2024
Dr. Jens Lechtenbörger (License Information)
Gate’s interface defines number of inputs
Number of inputs called fan-in
Fan-in is 2 for Nand
, And
, Or
in case of Nand to Tetris
With associative and commutative operations, gates of any fan-in work in any order of computation
Consider
\(x_1\) | \(x_2\) | \(x_3\) | \(f_2(x_1, x_2, x_3)\) |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 0 | 1 | 1 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 0 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 1 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 0 |
And16
: And for 16-bit numbers is applied bit-by-bit
And16(1100110011001100, 00001111000011110000) = 0000110000001100
And
gates in implementationOr8Way
: 8 inputs; out = 1
if at least one of them is 1
Or
gates in implementationSimplify \(f_2(x_1, x_2, x_3)\)
Simplify \(\bar{x_1}\bar{x_2}x_3 + x_1\bar{x_2}x_3 + x_1 x_2 x_3\)
\(\color{darkred}{(\bar{x_1} + x_1)\bar{x_2}x_3} + \color{darkblue}{(\bar{x_2} + x_2)x_1x_3}\)
Truth table
a | b | sel | out |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 0 | 1 | 0 |
0 | 1 | 0 | 0 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
1 | 1 | 1 | 1 |
Specification (from Mux.hdl
)
If sel==1 then out=b else out=a.
Alternative view on truth table
sel | out |
---|---|
0 | a |
1 | b |
Mux
Mux8Way16
Truth table
in | sel | a | b |
---|---|---|---|
0 | 0 | 0 | 0 |
0 | 1 | 0 | 0 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 1 |
DMux
DMux8Way
Given: Nand(a,b)
, false
a | b | Nand(a, b) |
---|---|---|
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Source files are available on GitLab (check out embedded submodules) under free licenses. Icons of custom controls are by @fontawesome, released under CC BY 4.0.
Except where otherwise noted, the work “Boolean Logic II”, © 2024 Jens Lechtenbörger, is published under the Creative Commons license CC BY-SA 4.0.