First, Scanner has the useRadix(int radix) method. If you used this, the conversion binary-to-decimal would be a "breeze" and I guess this is not the goal of the exercise.
So if you input a number...