In computers, we store data in a binary number system consisting only of 0 and 1, also called the base 2 number system. The decimal number system we use in our daily lives consists of 0-9, also called as base 10 number system.
Each 0 or 1 is stored in the memory of the system as a bit. A bit can either store 0 or 1. To be able to store more data apart from 0 and 1, we combine a few bits typically 8 bits which is called a byte. Now this byte can store any data type with restricted data value. For example: - A byte can store a numerical value between 0 and 255 or between -127 and 127 if we are considering the negative numbers too.
Computer memory is typically byte addressed – each byte has a unique address.
All the electronic data i.e. number, string, boolean, array, object, image, video, etc. are stored in the memory as bits and bytes at the low level.
There are different mediums we to store memory -
SSD uses electronic switches to represent 0 and 1, while HHD has magnetic strips which are polarized, depending upon the direction of the polarity it represents 0 and 1. And in CD/DVD/Blu-ray there are sections which are either pits or land, depending upon which again they are represented as 0 and 1.