Name: CENG 252 Midterm I 2008 Each question is 10 points. Every wrong answer will be punished by 2.5 points. Duration of the exam is 90 minutes. There are 10 multiple-choice questions in this exam. If you don’t give any meaningful explanation or don’t show your work, you will get zero point for that question. 1. What are the values of X, Y and Z. Show your work in empty spaces! (677)10 = (X)5 (1518)10 = (Y)7 (4401)10 = (Z)9 a) X=10202, Y=6642, Z=6630 b) X=20201, Y=6642, Z=6620 c) X=20201, Y=4266, Z=6630 d) X=11202, Y=4266, Z=3066 e) X=10202, Y=4266, Z=6630 2. Convert the fractional decimal number 194.03125 to binary with a maximum of six places to the right of the binary point. Show your work in empty spaces! a) 01000010.00001 b) 01000010.00001 c) 11000011.10001 d) 11000010.00001 e) 1100001.000001 3. Represent the decimal number 117 in binary using 8-bit signed magnitude, one's complement and two's complement form. Show your work in empty spaces! a) Signed magnitude 1110101 One’s complement 1110101 Two’s complement 1110101 Name: CENG 252 Midterm I 2008 b) Signed magnitude 11110101 One’s complement 11110101 Two’s complement 11110101 c) Signed magnitude 11101010 One’s complement 11101010 Two’s complement 11101010 d) Signed magnitude 01110101 One’s complement 10001010 Two’s complement 10001011 e) Signed magnitude 00101011 One’s complement 00110100 Two’s complement 00110101 4. Generalize the range of values in decimal that can be represented in any given x number of bits using signed magnitude, one's complement and two's complement form? Show your work in empty spaces! a) Signed magnitude from -(2x-1-1) to +(2x-1-1) One’s complement from -(2x-1-1) to +(2x-1-1) Two’s complement from -(2x-1-1) to +(2x-1-1) b) Signed magnitude from -(2x-1-1) to +(2x-1-1) One’s complement from -(2x-1-1) to +(2x-1-1) Two’s complement from -(2x-1) to +(2x-1) c) Signed magnitude from -(2x-1-1) to +(2x-1-1) One’s complement from -(2x-1) to +(2x-1) Two’s complement from -(2x-1) to +(2x-1-1) d) Signed magnitude from -(2x-1) to +(2x-1) One’s complement from -(2x-1-1) to +(2x-1-1) Two’s complement from -(2x-1) to +(2x-1-1) e) Signed magnitude from -(2x-1) to +(2x-1) One’s complement from -(2x-1) to +(2x-1) Two’s complement from -(2x-1) to +(2x-1) Name: CENG 252 Midterm I 2008 5. Given a (very) tiny computer that has a word size of 6 bits, what are the smallest negative numbers and the largest positive numbers that this computer can represent in one’s complement form? Show your work in empty spaces! a) Smallest Negative: (011111)2, Largest Positive: (100000)2 b) Smallest Negative: (000000)2, Largest Positive: (111111)2 c) Smallest Negative: (111111)2, Largest Positive: (0111111)2 d) Smallest Negative: (100000)2, Largest Positive: (011111)2 e) Smallest Negative: (0000001)2, Largest Positive: (1111111)2 6. A 15-bit floating point number has 1 bit for the sign of the number, 5 bits for the exponent and 9 bits for the mantissa (which is normalized). Numbers in the exponent are in two’s complement representation. No bias is used and there are no implied bits. Show the representation for the smallest positive number this machine can represent. Show your work in empty spaces! a) 011111100000000 b) 111111100000000 c) 000000100000000 d) 000000000000001 e) 010000100000000 7. Given that the ASCII code for the character "A" is 1000001, the ASCII code for "I" would be? Show your work in empty spaces! a) 1010101 b) 1110101 c) 1000100 d) 1001000 e) 1001001 Name: CENG 252 Midterm I 2008 8. A text file that is stored by using ASCII character coding system occupies 100 Kbytes. How much space is required for another text file that contains exactly the same characters but uses Unicode character coding system? a) 300 Kbytes b) Because Unicode character system is newer and more advanced than ASCII coding system, it requires much less space. Text file with Unicode character coding system requires 50 Kbytes. c) Since they have exactly the same characters, text file with Unicode character coding system requires the same space. It requires 100 Kbytes. d) 200 Kbytes. e) Unicode system uses different storage mechanism so it does not occupy any space. 9. Given the 8-bit binary number: 1 0 0 1 1 1 0 1 What decimal number does this represent if the computer uses signed magnitude, one's complement and two's complement form. Show your work in empty spaces! a) -29(signed magnitude), -98(one's complement), -99(two's complement) b) 157(signed magnitude), 98(one's complement), 99(two's complement) c) 157(signed magnitude), -99(one's complement), 99(two's complement) d) -29(signed magnitude), -100(one's complement), -99(two's complement) e) -29(signed magnitude), 98(one's complement), 99(two's complement) Name: CENG 252 Midterm I 2008 10. The 7-bit ASCII code for the character "4" that is encoded by using Phase modulation is shown below. What is the frequency modulation encoding for the same character (character "4")? Explain. a) b) c) d) e)