---------------------------------------- ** 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 87 decimal to binary. 1b) Convert 87 decimal to hex. 1c) Convert 1010101 binary to hex. 1d) Convert 1010101 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 = 3, y = 2; float z = x * y; x = x - x * y; y = y * y + 14; y = (x + y) % 7; z = z / 4.0; // variable values. // // x: // // y: // // z: // 2b) Boolean logic, conditionals. // code int x = 18; float f = 1.5; if (x > 10 || f <= 0) { if (x >= 19 ) x = x / 5; else x = 2 - x; f = f / f; } else { if (x <= 3.0) x = f * x; else x = x - f; f = f * f; } x = (f < x && x >= f) || (f > x || x > f); // variable values. // // x: // // f: // 2c) Loops. // code int i; int total=0; for(i=1; i < 12; i += 2) { total = total + i; } // variable values. // // i: // // total: //