Problem 1 ========= 17. This answer was given at the very start of class as a reward to those students who had showed up ontime. Problem 2 ========= Expression decimal binary hex -------------------------------------------- Zero | 0 | 0000 0000 | 00 --- | -3 | 1111 1101 | fd i | -11 | 1111 0101 | f5 i >> 4 | -1 | 1111 1111 | ff ui | 245 | 1111 0101 | f5 s | -2 | 1111 1110 | fe s ^ 7 | -7 | 1111 1001 | f9 us | 14 | 0000 1110 | 0e TMax | 127 | 0111 1111 | 7f TMin | -128 | 1000 0000 | 80 Problem 3 ========= Description Binary M E V --------------------------------------- -- 0 010 010 5/4 -1 5/8 2 3/8 0 100 010 5/4 1 5/2 -infinity 1 111 000 - - - most neg norm 1 110 111 15/8 3 -15 smal pos dnrm 0 000 001 1/8 -2 1/32 Problem 4 ========= func1 Problem 5 ========= scooby -> X dooby -> 1,4 doo -> 3 scrappy-> 2 Problem 6 ========= 1. 0xbfffb30c 2. 68 fc b2 ff bf c3 xx xx xx xx xx xx pq rs tu vw fc b2 ff bf 00 where xx can be anything except 00, and pqrstuvw can be any valid hexademical values which aren't zeros 3. 0xvwturspq (matching the pqrstuvw above) Problem 7 ========= #define M 11 //two points for each index #define N 3 int arr1[M][N]; int arr2[M][N]; int moo(int x) { int i; for(i = 0; i < M; i++) //1 point for this line { arr1[i][0] = arr2[i][2]+4*x; //a point for each index, plus 2 for the product } return i; //1 point for this line } Problem 8 ========= A. 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ID |XXXXX| weight |components |mom |XXXXX| | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ B. typedef struct { double weight; double *components; short momentum; char ID[2]; } Modified; C. 16