How the heck is one bit of data saved?

in #science6 years ago

Most of us know that the Data is stored in the digital devices in the form of "Ones" and "Zeros".
But have you ever wondered how these Binary pieces of information are actually stored in the chips? The short answer is "The bits are stored using something called Flip-flops." which I will explain today, :P
So, let us begin without Further due.


[Created using imgflip.com]

A flip-flop is basically a set of electronic elements configured in such way so that it can store 1-bit of data, by utilizing the logic gates.

The "SR flip-flop" is the most common type of flip-flop used for storing the data. In SR flip-flop, there are two input one is R and another one is S with two outputs one is Q and another one is Q̅.

Basic Symbol Diagram

SR flip-flop has two different states. It gives each output depending on the different states. The states are determined by the value of Q.

If Q=1 then we can say the flip-flop is SET (S) and if the Q=0 then the latch said to be RESET (R).

This SR flip-flop or the latch can be designed either by two crosses coupled NAND gates or two crosses coupled NOR gates.

When we designed the flip-flop by using NOR gates then this flip-flop is called Active High SR flip-flop. which means that if we set S=1 then this flip-flop is can be said SET.

And if we design it using NAND Gates then this flip-flop is called *Active Low SR flip-flop. That means if we set S=0 then it will be SET.

This SR flip-flop is also known as SET-RESET flip-flop too.

Flip-flops can be classified depending on how their input and clock pulse cause transition between two states.

There are four basics types of flip-flop - SR flip-flop, JK flip-flop, D flip-flop, and T flip-flop.

A basic flip-flop circuit can be constructed by using two NAND gates or two NOR gates.

Basic flip-flop circuit with NAND gates.


What is Sequential Logic?

  • The Sequential Logic is a collection of logic gates and flip-flops.

  • The logic value which is stored in the flip-flops make the current state of the sequential logic circuit.

  • The logic values on the input in conjunction with the current state determines the next state of the sequential logic circuit after the active edge of the clock.

Designed to store memory

The flip-flop is used for storing the data in form of 0 & 1 (Binary Duh.!!).
A flip-flop is a clock controlling memory device. It differs from the latch such that it has a control signal (CLOCK) input.

Let's suppose we give the "SET" input to the flip-flop as S=1, R=0, That makes Q=0 which makes Q̅=1.
Now let's try to read the previous value.
this is where the magic happens. (The input for reading the previous value is S=1 R=1 As shown in the truth table)
so we give the inputs S=1 and R=1, now the NAND GATE 1 has two inputs as S=1 and Q̅=1 which makes Q=0. now whenever we give this flip-flop a "Read Previous" input, It will return the same value.

And BAM!!! the state is saved.

To change the state all we have to do is give the flipflop the input of RESET (S=0 & R=1).
After changing the value if we give the "Read previous" Input. We Wil get the output as "RESET".

Simple as that, wasn't it? :P


[Usage under creative commons Credit]

Applications of the flip-flop.

Flip-flop used as a Data Storage

Flip-flop is used for storing data 1 bit at a time. to store data more than one bit, the flip-flops can be connected in series and parallel known as the resister.

Flip-flop used as a Data transfer

In the electronic instruments, the flip-flop can be used for transfer data. for this purpose, we use shift resister. The data is shifted or transfer 1 bit at a time when a clock pulse applied.

Flip-flop used as a counter

Another major application of flip-flop is used as a digital counter. By connection the flip-flops in series it is used to count pulse and event. The counter can count up to 2^n. Where n is the number of flip-flops.

Flip-flops are also used for Frequency Division.



References: A Lecture on Basic Engineering Electronics by Ms. Leena Taiwade, A textbook called "Fundamentals of Electrical Engineering and Electronics" by B L Theraja, all the images in the post are self-created unless stated otherwise.



3.gif




gif Created by @foundation

Daily Fun Fact #68 -- "01011001 01101111 01110101 00100000 01100001 01110010 01100101 00100000 01100001 01110111 01100101 01110011 01101111 01101101 01100101 00100000 00111010 00101001 0001010 0001010 0001010 00101101 01000001 01110010 01110010 01001010 01100101 01111001"
More Information

-ArrJey
Sort:  

Flip Flops are a great topic, and while they are used for memory it is interesting that flip flop and static memory is no longer used in RAM circuits. While flips flops are randomly accessible in that you can address any memory location in the same amount of time, unlike sequential memory, they are used in high speed cache memory for micros and other high speed digital integrated circuits.

Static memory is not very dense, and a technique known as dynamic memory is more common in RAM chips. Dynamic RAM requires a refresh circuit and use capacitance.

I have a video on static RAM I may post soon, and your article is a great segue for my video. The circuits you mention in the article are very useful.

BTW: You mentioned sequential logic, and I mentioned sequential memory in my comment. Sequential logic as you described means the output depends on the sequence of the inputs, rather than just logic state. Sequential logic is easier to predict as the inputs are clocked and typically edge triggered.

Enjoyed the article! --3D

Congratulations @arrjey! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received
Award for the number of upvotes
Award for the number of comments
Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 61926.98
ETH 3060.91
USDT 1.00
SBD 3.79