Flip-Flops

   . A type of circuit that has two states (0 or 1).
  . Formed using logic gates which in turn made of transistors.
  . Basic building blocks in memory of electronic devices.
  First flip-flop was built by William Eccles, F.W. Jordan in 1918.

Logic gates:

  . Electronic circuit having one or more than one input and only one output.
  . Relation between input and output is based on some logic.
  . Types of logic gates: OR, AND, NOR, NAND, NOT, XOR, XNOR.                       

Types of Flip-Flops:

   . Flip-Flops are divided into SR (Set- Reset), D (data or delay), T (toggle) and JK.
   . Depending on characteristics of each flip-flop, they can be used in various applications.

  1.S-R Flip-Flop

  2. D Flip-Flop

 3. J-K Flip-Flop

4. T Flip-Flop:

Use of Flip-Flops:

  . Each flip-flop store one bit of data.
  . Computers and calculators use flip-flops for their memory.
  . Used in Registers for data storage.  Used in Counters to count events. 
  . JK flip-flip with both inputs 1 can be used as Frequency divider as follows:

Registers:

  . Used to store data.
  . Formed by flipflops.
  . Each flipflop store 1 bit, so by cascading n flipflops, we can store n bits of information which is called n-bit register.
  
  . Used by CPU for performing operations.
  . 64 bit processor has 64 bit register size.
  . When we give any instruction to computer, it is first stored in registers.
  . After processing, it is stored in register and we get output.
  . Types of registers:
RegisterDescription
Memory Address RegisterHolds address of memory where CPU wants to read or write.
Memory Data RegisterIt acts like buffer and holds anything for process to use it.
AccumulatorFor storing results produced by system.
Program CounterHolds address of next instruction to be performed.
Data RegisterUsed to store data transmitted to or from peripheral devices.
Instruction RegisterIf any instruction is fetched, it is stored here.