Converts binary number to decimal