Binary to Decimal Conversion Problem

100110 does not fit in an int, or indeed in an unsigned int