Electronic – way to create a 2 bit / 4bit memory element using Flip Flop

circuit analysisdigital-logic

I have come across Flip-Flop memory elements & it seems really cool, So far i have only did Set, Reset Using Flip Flop, I am eager to know that Is there a way to create a 2 bit / 4bit memory element using Flip Flop? I mean using NAND/NOR gates?

Best Answer

You need to understand that a D type flip flop is a 1 bit memory element. When you give it a set signal it'll store its D input and will output it from the Q output on the fallowing cycles, until the set bit is raised again or the reset bit is set.

So, by putting 2 or more flip-flops together, with the same clock, set and reset inputs what you get is an n bit register, or n bit memory unit.

A diagram for a 2 bit register from flip-flops:

2 bit register

This is of course a volatile memory, meaning it'll lose its value once power supply is cut off.

Also, while this is the way registers are made, for example in the cpu, this is not the way that cache and RAM memories are made.