Data Units
Smallest digital data unit is 'bit'. It can only store data but it has no space to store his own address / identification.group of 8 bit is known as 1 byte. further units are already well known.
Optimum use
Consider a page with capacity of writing 10 digits only. We need to put multiple pages together and make a book. Each page should have space for data and space for page number.
And length of data + length of page number =10 as stated before.
consider following cases
- 9 digits for data and 1 digit for page number:- here we are getting big space for data but very small space for page number i.e. address. So we can go for page no 0 to 9 (total 10). Even if we make a book, it will have maximum 10 pages only.
- 1 digit for data & 9 digits for page number:- in this case we can put 10^9 pages in book. but each page has capacity to store only 1 digit data.
Same thing happen with storage. If you want more number of data units , you have to spend more on addressing.
lower the address length, bigger but less in number the data units.
Addressing types
Big endian
This is in our general life example. we write most significant number to the left and least to the right.
Similarly most significant part of the data is written first then system writes least significant part.
"Is your cell no starts with 9405 ?"
Little endian
Here least significant part is written first then most significant part. You can say system writes data in reverse order.
"Is your cell no ends with 57?"
Both systems has there pros and cons as compare to each other.