Flip flop is the basic memory unit of any system. This is the D-type flip flop.The output follows the input only at the rising edge of the clock and it stores that value forever.If the input changed to the other state, the output follows the input at the next rising edge of the clock.