Sunday 12 February 2012

How BITs and BYTEs works?

BIT stands  for Binary Digits. To understand it, lets first understand how decimal number works. Decimal numbers are combination of few digits. A digit is a single place that can hold numerical values between 0 and 9.
For example in the four digit number 3427, 7 fills the "1s place", while 2 fills the "10s place", 4 fills the "100s place and 3 fills the "1000s place". So we can express the number 3427 as :
(3*1000)+(4*100)+(2*10)+(7*1)=3000+400+20+1=3427

We can also express it in the powers of 10 as 
(3*10^3)+(4*10^2)+(2*10^1)+(7*10^0)=3000+400+20+1=3427:
Decimal number are therefore " base-10 number systems".

Computer operates on "base-2 number system" and it is also known as "binary number system" as it has only two possible values "0 and 1" unlike decimal numbers having values "0 till 9". Each is called as bits.

For the 1110 binary number we can find the corresponding decimal number in the way we did for 3427 as:
(1*2^3)+(1*2^2)+(1*2^1)+(0*2^0)=8+4+2+0=14.