## Introduction: DIY SR Latch Out of Transistors

An SR latch is a kind of circuit that is called "bistable." Bistable circuits have two stable states, hence the name BI-stable. One of the simpler versions of this kind of circuit is the SR latch, which stands for "Set/Reset Latch." The SR latch is most notably used for memory, because after you select a value, it is 'latched' so if there is no change in input, or the inputs turn off, the outputs stay the same.

## Step 1: Design

On the highest level of design we have two NOR gates hooked up with their outputs tied to one of the others' inputs. Let's think through this: If the output is already that Q is 0, then we activate the S input, then the output of the NOR gate would be 0 (because the output of a regular OR gate is 1 if one, the other, or both of the inputs are high) which, if R is off, would turn the other NOR gate on, and pull the Q output high. In this state where Q is high, if we activate S nothing happens to the output state, because the bottom NOR gate is already active and the top is unaffected. But if, in this state, we activate the Reset input, the same thing that already happened would happen mirrored and the Q output will turn off.

To make a NOR gate out of transistors, we can build a regular OR gate (with the transistor Collectors and emitters in parallel), and just tie the emitters to ground, and the output to a pull-up resistor.

The next step is to just tie those types of NOR gates in the organization of an SR latch. Since a transistor is a current controlled switch, we need to make some considerations about the resistors we are using. The main thing we have to keep in mind is that our outputs split into parallel loads, one driving the output LED, and the other driving the gate of the other NOR gate. I drew up a simplified schematic of this output circuit in order to choose resistor values, assuming we want our base current to be 0.0001 Amperes, and our LED current to be 0.01 Amperes. I encourage you to take a look at the schematic and see if you can come to the same conclusion as I did, and if you come to a different conclusion about the resistor values give it a try in your circuit, and let me know how it goes!

## Step 2: Initial Board Setup

The power rails should be tied together and the whole thing should be powered with some sort of 5V power source, such as an Arduino or lab bench power supply. Whatever you choose, try to get a current limited source so you don't burn anything up on accident.