For quite a while I have been trying to come up with a way to explain how the binary number system works, because its not really an intuitive way of dealing with numbers. If counting numbers is so easy why make such a complex way of dealing with them in a computer?? the answer is its easy to represent something in terms of ON or OFF than to have 10 different levels for representing the numbers.
So, in this way we can say:
0 + # = # and,
# + # = @
this also means that adding zeros to the right of the numbers doubles the numbers i.e.
From a very young age we are taught about numbers and how to count them. But learning that we have just accepted certain rules such as,
Zero is written as, '0'
One is written as, '1'
Two is written as, '2'
Three is written as, '3'
and so on....
If you think about it, these are just arbitrary symbols given to numbers from zero '0' to nine '9'. We have gotten used to calling these symbols as numbers that we don't realize this fact.
In our number System we have symbols from '0' to '9' i.e. ten symbols for ten numbers. Hence its called the decimal number system (its not the same as a decimal point, that's different) or, a number system in BASE 10.
So, in short we follow a number system that has a total of 10 symbols, the decimal number system.
Now, suppose we start counting in this system. Initially its easy and convenient, give each number a symbol. But as soon as you reach the number nine '9' you come across a problem!
The problem is that you have run out of symbols to assign...
I want to write ten but I don't have a symbol for that....hmmm.......
Oh! I know! I will just write a zero '0' and write a one '1' to my left.
This one on the left is just a single digit number that tells me how many times I've run out of symbols for numbers on my right...!
AND THAT..... is the crux.... '10' is not a representation of the number ten, it tells us how many times we have run out of symbols to write a number.
Suppose we made our own unique number system with just three symbols i.e. BASE 3:
say,
zero is written as '0',
one is written as '#',
two is Written as '@',
So, in this way we can say:
0 + # = # and,
# + # = @
so if we started counting, we would get:
zero 0
one #
two @
three # 0 (ran out of symbols so did a carry #..)
four # #
five # @
six @ 0 (ran out of symbols again, did a carry # again...)
seven @ #
eight @ @
nine # 0 0 (ran out of numbers again..., so carry # over twice!)
ten # 0 #
eleven # 0 @
twelve # # 0 (ran out of numbers again.... carry again......)
thirteen # # #
So,
in base ten...... ten is 10 and hundred is 100 and thousand is 1000
in base three... three is #0 and nine is #00 and twenty-seven is #000
See the pattern here??
In BASE 10 adding zeroes to numbers shifts the numbers in powers of 10...i.e. 101,
102, 103 and so on....
In BASE 3 adding zeroes to the numbers shifts the numbers in powers of 3...i.e. 31,
32, 33 and so on...
So by changing the number of symbols we change how numbers are written...
Let's Talk Binary:
In digital computers we follow a binary number system i.e. BASE 2.
so,
zero is 0
one is 1
two is 10
three is 11
four is 100
five is 101
six is 110
seven is 111
eight is 1000
this also means that adding zeros to the right of the numbers doubles the numbers i.e.
10 is two i.e. 21
100 is four i.e. 22
1000 is eight i.e. 23
10000 is sixteen i.e. 24
and so on...
each digit is called a BIT
(Binary digIT)....
One might also notice that as we reduce the BASE , the number of digits to write a number increase significantly,
for eg. writing in BASE 10 nine is; 9
but in our hypothetical BASE 3 nine is; # 0 0,
and in binary or BASE 2 nine is; 1 0 0 1,
When working with computers at the machine level we need a system that makes it easier to write numbers since the numbers we will be dealing with will be really large in terms of a binary number. So, to make notation easy we can use a number system that has a base that is a power of 2 make conversions of numbers easy. But, let me tell you all about it some other post ;P
till then.......
One might also notice that as we reduce the BASE , the number of digits to write a number increase significantly,
for eg. writing in BASE 10 nine is; 9
but in our hypothetical BASE 3 nine is; # 0 0,
and in binary or BASE 2 nine is; 1 0 0 1,
When working with computers at the machine level we need a system that makes it easier to write numbers since the numbers we will be dealing with will be really large in terms of a binary number. So, to make notation easy we can use a number system that has a base that is a power of 2 make conversions of numbers easy. But, let me tell you all about it some other post ;P
till then.......
Got any queries???
E-Mail me at: shashwath.sundar@gmail.com
Comments
Post a Comment