Here we understand the method of converting Binary numbers to Decimal form.
First, write down the position numbers starting from the right hand side beginning with 0.
Next, find 2 to the power of positions, i.e. 1, 2, 4,8,16,32,64,128 and so on....
Next, multiply these results with the corresponding bits in the binary number which are in the same positions.
Now add all the results and you will have the decimal number.
See Bit Manipulation Interview Preparation Series here:
• Bit Manipulation Interview Series
You could follow us on Facebook and Instagram:
Facebook : / firmwarecode
Instagram : / firmwarecode
#BitManipulation #BitAlgorithms