Information Representation (Binary) 0️⃣1️⃣0️⃣1️⃣
How do computers represent and store data?
At a fundamental level, to store data, computers use binary (base 2). This is simply just the digits '0' and '1'.
In our day to day lives, we use denary. This is the digits from '0' through to '9' (base 10)
In a similar way to how we can represent any number using denary, computers can represent any piece of data or number with just binary.
Think of how we have the 'units', 'tens', 'hundreds' (and so on...) columns. Binary uses a 'ones', 'twos', 'fours', 'eights' (and so on...) columns. Just as the denary columns increase by a power of ten, the columns in binary increase by a power of two.
An example 8 binary digit binary number (01100101) and what each digit means in denary:
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
0 1 1 0 0 1 0 1
To convert from binary (bottom line) to denary, add up all of the corresponding denary values for each binary digit which holds a value of '1'.
Binary values have a 'character' equivalent, which is how computers store text. All text and characters can be represented by binary values.
Hexadecimal (base 16) is also commonly used in computers. It works with the same logic as binary and denary.