Before discussing variables, let us take a look at Memory and its structure:
![](https://static.packt-cdn.com/products/9781788470940/graphics/assets/e2d36a12-455d-4958-b9bb-aa7547f5e192.jpg)
Memory consists of millions of memory Cells and each memory cell stores data in the form of 0s and 1s (binary digits). Each cell has a unique address, and by using this address, the cell can be accessed:
![](https://static.packt-cdn.com/products/9781788470940/graphics/assets/2a2219bc-00b4-4ed9-ae8b-a1047bda5726.png)
When data is stored in memory, its content gets split into further smaller forms (binary digits). As shown in the preceding diagram, 2 bytes of data consists of several memory cells.
A variable is the name that is given to a particular chunk of memory cells or simply a block of memory and is used to hold data.
You can declare any desired name and create a variable to store the data.
It is recommended, however, that we use meaningful variable names. For example, if we wish to create a variable to store the name of a person, then we should declare
Name: Andy
It is a good practice...
Name: Andy
It is a good practice...