Binary to Decimal Conversion Problem