Instead of using
binary = scan.nextInt(), use
binaryString = scan.next(). This will get you the necessary binaryString to convert to decimal. It's also unnecessary to have the binary variable....