---------------------------------------- ** On paper portion. Points: 20 points total, 10 points for #1, 10 points for #2 Last Name: First Name: Section (start time of your class): 1) Do the conversion. Show your work. No credit if you don't show some work. 1a) Convert 99 decimal to binary. 1b) Convert 99 decimal to hex. 1c) Convert 1101100 binary to hex. 1d) Convert 1101100 binary to decimal. 2) Be the computer. For each, keep track of the values of all the variables as the code runs - as we did in class. 2a) basic arithmetic. // code int x = 30, y = 11; float z = x * y; x = x - y * 2; y = y * 3 + y; y = (x + y) % 3; z = z / 10.0; // variable values. // // x: // // y: // // z: // 2b) 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); // variable values. // // x: // // f: // 2c) Loops. // code int i; int total=0; for(i=5; i < 10; i += 2) { total = total + i; } // variable values. // // i: // // total: //