Human beings use base 10 (decimal) arithmetic
There are 10 distinct symbols, 0, 1, 2, …,9
Computers use base 2 (binary) system
There are only 0 and 1
These two binary digits are commonly referred as bits
(25)10 indicates number 25 base 10 i.e number in decimal system.
(25)2 indicates number 25 base 2 i.e number in binary system.
Conversion of Decimal number into Binary number :
Divide the decimal number by 2 repeatedly
Keep track of the remainders
Continue this process until the quotient becomes zero
Write the remainders in reverse order to obtain the binary number
Ex. Convert (25)10 to binary
Quotient Remainder
25/2 = 12 1 LSB (least significant bit)
12/2 = 6 0
6/2 = 3 0
3/2 = 1 1
1/2 = 0 1 MSB (most significant bit)
so (25)10 = (11001)2