Tuesday, 9 July 2013

FLIP FLOPS

This discussion is related to one of the most important basic building block of the sequential circuits the flip flops.most of the time all that we do is cramming about these devices instead of understanding how they actually work. but its very interesting to see them working and very easy to understand the working principle behind it.
A flipflop is just a combination of AND ,OR,INVERT logic devices. but mostly we use NAND and NOR logic devices for its implementation because these are the universal logic devices that we use.


as we can see in the above picture i have used  nor gate and i have connected them  in a feedback manner now
1)  when 0 1 is the input outputis 1 0  because its a nor gate if any one input is 1 then the output will be 0 output 0 is fed  back to the upper NOR gate of the flip flop and there we get output 1
2) when 0 0 is given after this the flip flops do not change the previous value its retain the value as 10 this is called the memory state of the flip flop
3) when 1 0 will be given then the value will be changed to 01 as shown above and to retain thisvalue we again take our FF in memory state
SOME IMPORTANT POINT TO REMEMBER:
1) for NOR FFs 00 is the memory state and 11 is the not allowed state the input should never be given as 11
2)you cannot change the input directly from 01 to 10 you should have the intermediate 00 state to retain the value for sometimes and then you can change the previous value
3) this is not basically a flip flop. its a latch,flip flop are similar to latch there is simple design chage in the case of a flip flop but because this blog is for basic concept i  just want to tell how we can make a circuit with a memory the logic for the flipflop will be the same. we mostly use NAND gatefor FFs and it is designed in such a way that output for the input 01 should be 01 only it should not be 10 as in case of a latch
this is the basic design of a flipflop with NAND gates and a clock attached to it.
FUNCTION OF CLOCK:
the function of clock is to retain the input value for sometimes in a FF for example  if clock is showing 0 in that case the output will keep on showing the last output when the clock was 1 no matter whats the input we are supplying but if clock is 1 then it will keep on changing the output depending upon the input . so we can retain a particular value in the  circuit as per the requirement.