Decimal to Binary conversion:
key idea- Divide the decimal number by 2 until quotient is zero; the remainder is the LSB of binary number.
example: convert 6810 to binary 68/2= 32 34/2= 17 17/2= 8.5 8/2= 4 4/2= 2 2/2= 1 1/2= .5
so this would be 10001002 in binary notation.
Binary to decimal conversion:
key idea- Multiply each bit of the binary number by it corresponding bit weighting factor, Sum up all the products in step to get the decimal number.
example: convert 01101012 to decimal
0 1 1 0 1 0 1
2^6 2^5 2^4 2^3 2^2 2^1 2^0
0 +32+16+ 0+ 4 + 0 + 1= 5310
key idea- Divide the decimal number by 2 until quotient is zero; the remainder is the LSB of binary number.
example: convert 6810 to binary 68/2= 32 34/2= 17 17/2= 8.5 8/2= 4 4/2= 2 2/2= 1 1/2= .5
so this would be 10001002 in binary notation.
Binary to decimal conversion:
key idea- Multiply each bit of the binary number by it corresponding bit weighting factor, Sum up all the products in step to get the decimal number.
example: convert 01101012 to decimal
0 1 1 0 1 0 1
2^6 2^5 2^4 2^3 2^2 2^1 2^0
0 +32+16+ 0+ 4 + 0 + 1= 5310