# Binary Language Query



## Trinity (Sep 13, 2005)

Hi â€¦this I m learning nitty gritty of computers & in the process I came across this para which I cudnâ€™t follow muchâ€¦can u plz elaborate & explain in a little less technical manner, it wud be kind of u to do so.

-------In the decimal system, each digit position represents a value of 10 to the position's power. For example, the number 345 means: 
3 three 100s (10 to the 2nd power) 
plus 
4 four 10s (10 to the first power) 
plus 
5 five 1s (10 to the zeroth power) 
In the binary system, each digit position represents a value of 2. For example, the binary number 1011 equals: 
1 one 8 (2 to the 3rd power) 
plus 
0 zero 4s (2 to the 2nd power) 
plus 
1 one 2 (2 to the first power) 
plus 
1 one 1 (2 to the zeroth power) 
So a binary 1011 equals a decimal 11.

-------Because computers use the binary number system, powers of 2 play an important role. This is why everything in computers seems to come in 8s (2 to the 3rd power), 64s (2 to the 6th power), 128s (2 to the 7th power), and 256s (2 to the 8th power). 

-------Programmers also use the octal (8 numbers) and hexadecimal (16 numbers) number systems because they map nicely onto the binary system. Each octal digit represents exactly three binary digits, and each hexadecimal digit represents four binary digits.

The site I read this was webopedia 

Thanx


----------



## rkb2005 (Sep 14, 2005)

*Binary is easy and fun!!*

*"There are 10 types of people in this world-one who understands binary and the other who dont!"*  

Now, lets get to the real thing:-
Every number system has a base for eg Decimal no. system is of base 10.
So when we say 365 its actually
3*100+6*10+5 = 3*10^2+6*10^1+5*10^0. (Here 10 is the base)
Note: ^ denotes power.
        10^0=1
Decimal system is of base 10 also means it will have 10 diff digits viz.
0,1,2,3,4,5,6,7,8,9.

Now,lets get to the binary thing. Computer can only understand binary.
The base of a binary no is 2. ie when you say *10* in binary its actually
1*2^1+0*2^0 = 2. (  See the quote above!)

It also means that all the binary nos will be a combination of the two digits possible ie 0,1 (yes, as you guessed!)

eg 110011 in binary is 

  1      1     0     0     1     1     <---face value
  |       |     |      |     |      |
 5th   4th   3rd 2nd  1st   0th   <---place value

since the base of binary no is 2,we have

The base ie 2     
    |
1*2^5+1*2^4+0*2^3+0*2^2+1*2^1+1*2^0 = 32+16+0+0+2+1= 51
        |
the corresponding place value

So it comes out that the actual value of a number in any number
system is:
Sumation of [(face value)*(base)^(place value)]

Now I think you can try out examples by yourself. I'm pretty sure you'll find it very interesting as i did!


----------



## rkb2005 (Sep 14, 2005)

I think the formatting of the text has gone haywire because of the space thing...should have used  I suppose. Anyway if you are unable to understand I'll post it again!


----------



## aadipa (Sep 15, 2005)

*Re: Binary is easy and fun!!*

I just reformatted the above with proper tags.

[ code ] ... [ /code ] are proper tags needed to put code without loosing the formatting.



			
				rkb2005 said:
			
		

> *"There are 10 types of people in this world-one who understands binary and the other who dont!"*
> 
> Now, lets get to the real thing:-
> Every number system has a base for eg Decimal no. system is of base 10.
> ...


----------



## rkb2005 (Sep 15, 2005)

Thanks dude!! This is exactly what I wanted!


----------

