Peter Mawhorter
Voltage (V) equals current (I) times resistance (R).
Analog
Analog circuits like antennas or speakers have a complex balance of resistance, current, and voltage, which varies over time.Digital
We will study digital circuits, which have defined “high” and “low” voltage values; the exact numbers don’t matter so much.(Once you give a computer scientist a 1 and a 0, it’s game over.)
A | B | F |
---|---|---|
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
A and B
” or
“A && B
,” now we will write just
“”
for AND and
“”
for OR.
Here are truth tables for NOT, AND, and OR, which you are already familiar with:
NOT | |
---|---|
F = A’ | |
A | F |
0 | 1 |
1 | 0 |
AND | ||
---|---|---|
F = AB | ||
A | B | F |
0 | 0 | 0 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 1 |
OR | ||
---|---|---|
F = A + B | ||
A | B | F |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 1 |
Here are truth tables for NAND, NOR, and XOR:
NAND | ||
---|---|---|
F = (AB)’ | ||
A | B | F |
0 | 0 | 1 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
NOR | ||
---|---|---|
F = (A + B)’ | ||
A | B | F |
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
XOR | ||
---|---|---|
F = AB’ + A’B | ||
A | B | F |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 | 0 |
Aside: truth tables present information clearly, but they’re hard to read, and it’s harder to keep them in your head as you then try to apply them to each other or think through a circuit.
This class will repeatedly strain (and also develop) your ability to mentally juggle multiple steps of translation between different representations and parts of a system.
Use tools to improve your juggling skills:
A | B | F |
---|---|---|
0 | 0 | 1 |
0 | 1 | 0 |
1 | 0 | 0 |
1 | 1 | 0 |
Two functions with the same truth table are equivalent.
F = A’B’ + A’B | ||||
---|---|---|---|---|
A | B | A’B’ | A’B | A’B’ + A’B |
0 | 0 | 1 | 0 | 1 |
0 | 1 | 0 | 1 | 1 |
1 | 0 | 0 | 0 | 0 |
1 | 1 | 0 | 0 | 0 |
Q = A’ + A’B + A’B’ | |||||
---|---|---|---|---|---|
A | B | A’ | A’B | A’B’ | A’ + A’B + A’B’ |
0 | 0 | 1 | 0 | 1 | 1 |
0 | 1 | 1 | 1 | 0 | 1 |
1 | 0 | 0 | 0 | 0 | 0 |
1 | 1 | 0 | 0 | 0 | 0 |
To be able to build NOT, AND, and OR gates in a circuit, there has to be a way for voltage or current in one place to manipulate the flow of current or the difference in voltage somewhere else: a switching mechanism.
Early switches were big (vacuum tubes) but transistors represent the culmination of decades of research into making them smaller.
A modern transistor can be as small as 5 nanometers, with 10s of billions packaged on a singe chip.
A protoboard is a prototyping tool: it has places to hold wires and chips so you can put them together easily, with internal horizontal and vertical connections. It also has a power supply and things like switches and LEDs built-in.