Data Representation is a large topic within GCSE Computer Science and extends further than simply understanding what binary is and how to convert it. Binary is the representation of the language that your computer speaks – in fact, instead of 1s and 0s your computer uses a pattern of on and off electrical signals that it can then translate into numbers
An important thing to remember about computers is that they are actually very simple when you look at them closely – all they can do is count to 2, add, and shift numbers along.
So, how can they possibly hold that word-processed document that you’re typing? Or the photos from your phone? It’s all about combining very simple tasks into something more complex.
Before we start, it’s worth looking at our own number system. Since you started school (and probably before), you’ve been counting from 1 to 10 using a system called Denary. Den in latin means ten, and we have ten digits in our number system ranging from 0 to 9. So it makes sense that Bi meaning 2, would have two digits ranging from 0 to 1.
So binary if binary means to count to the second digit, then to make bigger numbers we just need more columns. In the example below, we can count up to 10:
But how does this actually work?
Binary uses powers of 2 to convert from Denary (base 10) to Binary (base 2):
128 64 32 16 8 4 2 1
0 0 1 0 1 0 1 0
In the table above, we’ve converted the number 42 into binary by placing the powers of 2 in different columns and placing a 1 under the numbers that you would use to add up to 42. So in this case: 32 + 8 + 2 = 42
We can use this process in reverse to convert a binary number back into denary by writing the powers of 2 over each digit and adding up the columns with a 1 in. If your binary number is longer than 8 digits (bits) just keep doubling the numbers in the columns!