Instructables user Teslaling built 3 bits of RAM because he didn’t have enough transistors, resistors, and breadboards for 8! His proof-of-concept uses 8 NPN transistors and 8 resistors for each bit.
The basis of the circuit is the SR Flip Flop. This flip flop circuit uses 2 inputs, Set and Reset, to control 2 outputs, Q and ~Q (not Q). When the Set line goes high, Q will go high and stay high even after Set goes low. If, however, Reset goes high, then Q will go low and ~Q will go high.
Now the question becomes how do we make all of this happen with only one input? We do this by connecting the data line to the Set input and connecting it to the Reset line through an inverter.
So far, when Data is high, Set is high and Reset is low so Q is high. If Data goes low, then Set goes low and Reset goes high making Q go low and ~Q go high. Now we have another problem. The register changes states when the Data does, it doesn’t latch like we want it to. How do we fix this? By adding a Write Enable. We can do this by adding a gated buffer. It acts as a switch so if the switch line goes high or low the buffer will either turn off or on, respectively. Now, even when the data line can change states, the data can remain the same.
ADVERTISEMENT