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?
-
2\$\begingroup\$ You can put two flops next to each other to store two bits. Or is the question "is there a single element that stores more than one bit", in which case the answer might be "google for MLC (multilevel cell) flash" \$\endgroup\$– pjc50Mar 27, 2013 at 14:25
-
\$\begingroup\$ Hey, I wanted to create a simple circuit for saving 2 bit using NAND Gates. By searching MLC I get really really advanced things.. :/ \$\endgroup\$– Mohammed FawzanMar 27, 2013 at 15:04
-
1\$\begingroup\$ Save one bit using a D type flip flop from this page: en.wikipedia.org/wiki/Flip-flop_%28electronics%29 To save two bits, build two of them. To save 4 bits, build 4 of them. \$\endgroup\$– pjc50Mar 27, 2013 at 15:14
1 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:
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.