This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
i don't understand the question... What do you mean by 'convert 1 into 0'?
if you are trying to convert it into a decimal number, each position represents a power of 2, just like decimal each position is a power of 10.
So the rightmost digit is 2^0, the next is 2^1, the next is 2^2, etc. you just add up the values where there is a 1. so if i had a four digit binary like "0111", i'd add up 2^0 + 2^1 + 2^2, which totals 7.
Does that help?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors