The output screen should look like this after the program has run:

Enter a number between -128 and +127: 26 The number 26 in decimal equals 0001 1010 binary Its one's complement is 1110 0101 Its two's complement is 1110 0110

- Use a char data type for the number being converted.
- Note that the most significant digit of a positive number
is zero, and that of a negative is one.
So

if ( number < 0 ) printf( "1" ); else printf( "0" );

- Shift left and do it again seven more times.

The program prompts the user to enter eight ones or zeros and the program calculates and prints the decimal equivalent.

Type in an eight bit binary number: 01010101 01010101 = 85 decimal