---------------------------------------- ** On paper portion. Points: 22 points total, 6 points #1, 6 points #2, 4 points #3, 6 points #4 Last Name: First Name: 1) Do the conversion. Show your work. No credit if you don't show some work. 1a) Convert 105 decimal to binary. ... 1b) Convert 1011001 binary to decimal. 1011001 = 64 + 16 + 8 + 1 = 89 2) Answer the questions about C/C++ syntax and data types. For each write exactly what you would type in your program (including correct spelling and capitalization). 2a) List 4 different data types that can be used for numbers, and say what is different about each. int - 32 bit, signed integer long int - 64 bit, signed integer double - 64 bit, floating point, with decimal point float - 32 bit, floating point short int - 16 bit integer char - 8 bit integer In general, 2^(# bits) - 1. 2b) List the 6 comparison operators. < <= == != >= > 2c) List the 3 boolean operators. && || ! and not or - those are not correct because that's not what you type in C 3) Memorize program. Write down the code for the validInput2.cpp program. It should ask the user for a number between 0 and 100 and check that what they typed is between 0 and 100. If they typed something outside of the range 0 to 100, the program should tell them "Invalid input..." AND ask them again. The program should keep asking again until they have typed a number between 0 and 100. 4) Be the computer. For each, keep track of the values of all the variables as the code runs - as we did in class. 4a) basic arithmetic. // code int x = 3, y = 2; float z = x * y; x = x + y * 3; y = y / 3 + y; y = (x + y) % 4; z = z / 4.0; cout << x << endl << y << endl << z << endl; // variable values. // // x: // // y: // // z: // // printed on screen: 4b) Boolean logic, conditionals. // code int x = 21; float f = 3.14; if (x < 0 && x > 10) { if (f <= 3.14 ) x = x / 2; else x = x - 2; f = f - 1.0; } else { if (f < 3.0) x = x / 2; else x = x - 2; f = f - 1.0; } x = (f <= 3.14 && x > 100) || (f > 0 && x > 0); cout << x << endl << f << endl; // variable values. // // x: // // f: // // printed on screen: 4c) Loops. // code int i = 1; int total=1; while (i < 4) { total = total * i; i = i + 1; cout << total << endl; } cout << i << endl << total << endl; // variable values. // // i: // // total: // // printed on screen: