1 0 1 0 1 1 1 1 0 1 0 0 1 0
When you learned to count you were taught 1,2,3,4,5,6,7,8,9,10,11,12,13 etc.
How about if I told you there were 4 different number systems:Binary (the one computers use to store data); Decimal (the one we use); Octal and hexadecimal.
If I told you that “1010″ in binary represents the same value as “10″ in decimal would you believe me?
For you to understand how binary works you need to understand how number systems works.
Let’s just have a quick look 125 in decimal :
NB!! Look at it as if every digit is in a column.
NOTE: When a value is to the power 0 it equals 1
125 in decimal is representing : 1 x 100(10^2), 2 x 10(10^1) and 5 x 1(10^0),
Thus (1 x 100) + (2 x 10) + (5 x 1) = 125
The base of a number system:
Every number system has a base.
The base of the decimal system is 10. The biggest digit that you can have in any column is 9.
The base of the binary system is 2. The biggest digit that you can have in any column is 1.
The base of the octal system is 8. The biggest digit that you can have in any column is 7.
The base of the hexadecimal system is 16. The biggest digit that you can have in any column is 15 (15 is represented by “F” in hexadecimal).
Get it? The biggest digit that you can have in any column is 1 less than the base of the number system.
The base is one of the key concepts of understanding number systems.
- Every digit in every column is a representation of a multiplication of the base to a certain power.
- The base minus 1 is the maximum digit that you can have in a column
Here is an example for every number system where every column contains the maximum digit possible : 999 (decimal), 111(binary), 7777(octal), FFFF(hexadecimal)
Let’s analyze the process of adding 1 to 9 giving you 10 in decimal:
What happens when you add 1 to 9.? You get ten right?
The question you must ask yourself is: Why do I write ten as “10″?
Take the image to the right. I added 1 to 9 in the first column which equals 10(the base) . I then
subtracted 10 again from the first column and added 1 to the second column. 10 is representing
that you have 1 x 10^1 and 0 x 10^0.
The value ten is represented different in every number system: In decimal it is represented by “10”(1 x 10^1 + 0 x 10^0), in binary it is represented by “1010”(1 x 2^3 + 0 x 2^2 + 1 x 2^1 + 0 x 2^0) , in octal it is represented by “12”( 1 x 8^1 + 2 x 8^0) and in
hexadecimal it is represented by “A”(10 x 16^0).
Here is an demonstration of the process of adding 
1 to 99 in decimal.
You add 1 to the first column and then it adds up
to ten(base). Thus you carry 1 over to the next column and then subtract ten
again from the first column. The same process happens in the second column.
Now let’s get to binary.
Lets analyze the binary pattern “1011”:
Remember that the base of binary is 2.
1011 in binary is representing that there is 1 x 8(2^3), 0 x 4(2^2), 1 x 2(2^1) and
1 x 1(2^0)
Thus (1 x 8 ) + ( 0 x 4 ) + ( 1 x 2 ) + ( 1 x 1 ) = 11 in decimal representation
Here is an demonstration of the process of adding
1 to 1011(11 in decimal) in binary.
Look at the next image. Every time you get 2 in a column you subtract
the 2 again from that column and add 1 to the next column.
Is it starting to make any sense yet?
Lets look at counting in the different number systems:
( When you are counting you are adding 1 every time )
Decimal: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 (Every time you get to ten in a column you carry 1 over and start again at 0)
Octal: 1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,20,21,22 (Every time you get to 8 in a column you carry 1 over and start again at 0)
Hexidecimal: 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,10,11,12,13,14,15,16,17,18,19,1A,1B,1C,1D,1E,1F,20 (Every time you get to 16 in a column you carry 1 over and start again at 0)
A = 10 B = 11 C =12 D = 13 E = 14 F = 15 in hexadecimal
Binary: 1,10,11,100,101,110,111,1000,1001,1010,1011,1100 (Every time you get to 2 in a column you carry 1 over and start again at 0)
In binary there are a lot of carry over ‘s because the base is so small. Look at the above binary count line marked in bold. When you added 1 to 111 to get to 1000 there were 3 carry overs: The process looks something like this: 111+1 = 112(not a valid binary value yet – carry 1 over subtract 2 from the first column) = 120 (not a valid binary value yet – carry 1 over subtract 2 from the second column) = 200 = (not a valid binary value yet – carry 1 over subtract 2 from the third column) = 1000 (valid binary – no column has a value that is equal or greater than the base)
It is quite a complex concept to understand , but wants you have got it, it is easy!
Here is a formula for converting a decimal number into binary:
Lets take 46 for an example:
46/2 = 23 remainder 0
23/2 = 11 remainder 1
11/2 = 5 remainder 1
5/2 = 2 remainder 1
2/2 = 1 remainder 0
½ = 0 remainder 1
This process continues until the quotient is 0.
Thus 46 in decimal = 101110 in binary.
And back to decimal again (0 x 1) + (1 x 2) + (1 x 4) + (1 x 8 ) + (0 x 16) + (1 x 32) = 2 + 4 + 8 + 32 = 46
Next time somebody asks your age and you don’t want to give it away you give it to them in binary!



South Africa premier PTC site. Get paid to click on ads! 

