Forget all that TCP/IP stuff. Let’s get really basic.
How do computers talk?
They talk with digits.
And that’s why it’s known as digital.
How Do Computers Talk?
In this article, I’m going to explain how this talking works.
I’ll take what some might regard as complex, and make it as simple as I can.
But don’t worry if you don’t get it straight away. Jump right to the conclusion and it’ll all make sense.
Digital is lots of ones and noughts.
Yes, the good old fashioned number 1. And the number 0.
1 is ‘on’.
So guess what 0 is.
Correct. It’s ‘off’. Go to the top of the class.
And all those strings of ones and noughts is known as binary.
Remember that word binary, ‘cos it’s important.
It looks something like this:
Does that look like gobbledegook?
If you were a computer, you’d understand it.
But because you’re a human, it looks a bit gobbledegook.
Fortunately, we can change it into a more readable format for us humans.
Digital That Humans Can Understand
Everything on a computer is given a value.
Let’s take colours, for example.
At some time in your life, I bet you’ve seen colours expressed as values such as
#00ff00 or #98fb98
Those are green and pale green, by the way.
That’s simply our human way of interpreting binary.
And that way is called hexadecimal.
That pale green colour you saw just above, by the way… the #98fb98 one…
That has a binary value of 100110001111101110011000.
Why Do We Need Binary and Hexadecimal?
Because computers understand binary.
You know… the ‘on-off-on-off’ ones and noughts language.
But so that humans can understand that computer-speak, we display it as hexadecimal.
I’d hate to have to read all those ones and noughts, wouldn’t you?
But I can just about manage something like 98fb98.
Getting from Hexadecimal to Binary
It might be hard to imagine how 98fb98 and 100110001111101110011000 can be the same.
But they are.
Here’s the slightly techie bit. So go and make yourself a brew first.
Binary is to base 2.
What does that mean, David?
It means that 1 is 1.
OK. I get that.
But when you get to 2, it’s shown as 10.
Let’s compare it with something we use every day: our beloved decimal counting system.
Decimal is to base 10.
That means that when we get to 10, we show it as 10.
In other words: we count up to 9, and then the next number is a one and a nought.
Similarly, with binary, we count up to 1. And the next number is a one and a nought.
Still with me?
Don’t worry. Go back and read those last few lines, and then we’ll move on.
You’ll get it. It’ll make sense.
Here’s a little table showing a few decimal numbers and their binary equivalents.
See if you can work it out.
|Decimal (base 10)||Binary (base 2)|
An Easier Way to See Binary
If you’re still not quite with me, here’s another way of looking at it.
My wife got it when I showed her this, so take heart.
Let’s take, as an example, the decimal number 13.
It’s made up of an 8, a 4 and a 1.
So it’ll look like this…
Can you see how a decimal 13 becomes 1101 in binary?
Binary and Decimal
“So why doesn’t a computer convert binary to decimal for us humans?” I hear you ask.
It does when it’s spewing out the final product.
That’s nice and clear.
It even produces a nice page full of…
- Decimal numbers
But remember… when computers talk to each other, that’s in binary.
Why use Hexadecimal Then?
Hexadecimal is the nearest thing to binary.
And hexadecimal is to base 16.
Yes, you guessed it…
With hexadecimal, we count up to what would be 15; then the next number is 10.
But to avoid confusion, obviously we can’t use the equivalent of decimal number 15, so we call it something else.
Here’s how we count up to 16 in hexadecimal.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10.
Go on, count ’em. You’ll find that F is equivalent to what would be 15 in the good old decimal system.
Binary vs Hexadecimal
So let’s now go back and take a look at that pale green colour again.
Remember, in hexadecimal, it’s 98fb98.
And in binary it’s 100110001111101110011000.
So how do we get one from t’other?
Well, let’s grab the first two digits of that hexadecimal number I just mentioned.
So we get a binary value of 10011000.
The next two digits are FB.
I’ll make it a bit easier by also showing the decimal equivalent.
But I’m sure you can remember that hexadecimal F is the same as decimal 15.
So FB = 11111011.
Therefore 98 FB 98 is 10011000 11111011 10011000.
Summed Up Simply
Don’t worry if that was a bit deep.
All you need to know if that when something is digital, it means it’s just a load of ones and noughts.
So if you select the pale green option on the paint pallet, that will send this long string of digits to the computer:
Or if you prefer, you can tell the computer yourself… using its hexadecimal equivalent.
Computer or Human?
So now you know.
Computers use binary – which is lots of digits – to talk to each other.
Imagine it as strings of ones and noughts.
And that can easily be translated into hexadecimal.
We can use hexadecimal to instruct a computer – such as telling the computer what a certain colour is.
Thankfully, when it’s finished its job, the computer will pop the result out in a language we can all understand…
- Real decimal numbers
So the next time you pop a photo onto your computer, remember that it won’t know that it’s a photo of you on holiday in Torquay with lots of colourful yachts and jet-skis in the marina.
But it will know it as an unbelievable number of ones and noughts.
Which leaves me with one conclusion:
I’m glad I’m human.