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
So
if ( number < 0 ) printf( "1" ); else printf( "0" );
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