*Notes to a video lecture on http://www.unizor.com*

__Implementation of Electronic__

Flip Flop (Latch)

Flip Flop (Latch)

In the beginning of computer era one of the first problem was to be able to store information. And the first step was to design a circuit that can store one bit of information, 1 or 0.

A digital

**flip-flop**or

**latch**is such a one bit storage, an electronic device that

(a) has two states (1 and 0);

(b) can be set to one of these two states by a proper impulse;

(c) retains the state after an impulse is gone.

The main component of a design we will discuss in this lecture is a combination of a binary logical operation

**and a unary logical operation**

*OR***, both of which were discussed in previous lectures.**

*NOT*Let's recall the implementation of the logical

**circuit that involves diodes.**

*OR*The implementation of the

**logical operation that involves triodes was suggested as follows**

*NOT*Combining them sequentially, we first implement

**and then**

*OR***of the result of**

*NOT**, thus implementing the binary logical operation*

**OR****as follows**

*NOR*

*NOT(A OR B) = ¬(A|B)*The logical

*operation is denoted by the following symbol*

**NOR**The table below denotes the results of

*operation for all pairs of input values of arguments*

**NOR**

**¬(0|0) = ¬0 = 1**

**¬(0|1) = ¬1 = 0**

**¬(1|0) = ¬1 = 0**

**¬(1|1) = ¬1 = 0**Using the

*gate, we will implement a circuit that can serve as a one bit memory cell.*

**NOR**Consider the following schema of a circuit called

**SR flip-flop**or

**SR latch**.

Here terminals

*(Reset) and*

**R***(Set) are controlling terminals, using which we store information.*

**S**Information is stored in a pair of terminals

*and its opposite*

**Q***in a way that either*

**NOT(Q)=¬Q***(and*

**Q=1***) or*

**¬Q=0***(and*

**Q=0***).*

**¬Q=1**These two states are stable in a sense that, after we send a positive impulse at terminal

*, while*

**S***, the*

**R=0***will be equal to*

**Q***irrespective of its prior value, the*

**1***will be equal to*

**¬Q***irrespective of its prior value, and they both will retain the same values*

**0***and*

**Q=1***after the impulse at*

**¬Q=0***is gone (that is when*

**S***).*

**S=0**Similarly, after we send a positive impulse at terminal

*, while*

**R***, the*

**S=0***will be equal to*

**Q***irrespective of its prior value, the*

**0***will be equal to*

**¬Q***irrespective of its prior value, and they both will retain the same values*

**1***and*

**Q=0***after the impulse at*

**¬Q=1***is gone (that is when*

**R***).*

**R=0**Let's examine the work of this SR latch in detail.

*Set*

**Q=1**and**¬Q=0**Assume, we set the voltage at terminal

*to a positive value, keeping terminal*

**S***at zero potential. It means in logical sense that*

**R***and*

**S=1***.*

**R=0**The

*connected to terminal*

**NOR gate***, irrespective of its second connection to it, will produce a signal*

**S***as an output. Indeed, the*

**0***operation between*

**OR***and any other signal produces*

**S=1***and*

**1***.*

**NOT(1)=0**This immediately sets

*and send zero potential to the*

**¬Q=0***connected to terminal*

**NOR gate***that has zero potential. So, both inputs to*

**R***connected to*

**NOR gate***terminal are at zero potential. The logical*

**R***of two zeroes is zero. Subsequent*

**OR***converts the signal to*

**NOT***that sets terminal*

**1***.*

**Q=1**So, raising the potential at terminal

*to a positive value, keeping terminal*

**S***at zero potential switches terminals*

**R***and*

**Q***to, correspondingly, values*

**¬Q***and*

**1***.*

**0**Let's see what happens when the positive impulse at terminal

*is gone, so*

**S***, while terminal*

**S=0***is still at zero potential, terminal*

**R***and*

**Q=1***.*

**¬Q=0**The

*connected to terminal*

**NOR gate***has one input from terminal*

**S***, while the other input is from terminal*

**S=0***that was set to*

**Q***on a previous step. The output from this*

**1***will be zero, since the logical*

**NOR gate***between*

**OR***and*

**0***gives*

**1***, and subsequent logical*

**1***converts it to*

**NOT***.*

**0**This sets

*, but this terminal already had this value, so*

**¬Q=0***does not change and remains at*

**¬Q***.*

**0**From there the value

*goes to the input of the*

**¬Q=0***connected to terminal*

**NOR gate***that still has zero potential. Both input to this*

**R***are zero, so the output is 1, which sets*

**NOR gate***, which it already has. So*

**Q=1***does not change and remains at*

**Q***.*

**1**As we see, the positive impulse on terminal

*sets terminals*

**S***and*

**Q***to stable values*

**¬Q***and*

**1***correspondingly, which they retain after the impulse is gone.*

**0**In other words, the positive impulse on terminal

*sets a*

**S****flip-flop**to a stable state

*and*

**Q=1***.*

**¬Q=0***Reset*

**Q=0**and**¬Q=1**Notice how symmetrical is the circuit of our flip-flop.

Sending a positive impulse to terminal

*, while keeping zero potential on terminal*

**R***is fully analogous to a previous case, except now the flip-flop will be in a stable state*

**S***and*

**Q=0***.*

**¬Q=1**

**Conclusion****The flip-flop presented above can serve as a memory bit**, since we can set its value to

*(*

**1***and*

**Q=1***) by sending a positive impulse to terminal*

**¬Q=0***or to*

**S***(*

**0***and*

**Q=0***) by sending a positive impulse to terminal*

**¬Q=1***.*

**R**An important detail about this design is that we should never have a situation when both

*and*

**S=1***. The reason is, the state of a flip-flop in this cases is unpredictable, it will constantly change the values on its output terminals. So, this situation of both input terminals being equal to*

**R=1***must be avoided.*

**1**Allowed are only positive impulse (that is, an electric potential jumps to some positive value, after which it goes down to zero) on terminal

*, keeping*

**S***, which sets the value of a flip-flop to*

**R=0***(that is,*

**1***and*

**Q=1***) or positive impulse on terminal*

**¬Q=0***, keeping*

**R***, which sets the value of a flip-flop to*

**S=0***(that is,*

**0***and*

**Q=0***).*

**¬Q=1**