Name: 1CSE 240 Autumn 2006Due: Fri. 15 September 2006Intro. to Computer Architecture Homework 1Write your answers on these pages. Additional pages may be attached (with staple) if necessary. Please ensure thatyour answers are legible and show your work. Write your name at the top of each page. Due at the beginning of class.Total points: 58.1. [12 Points] Basic Conversions.(a) Convert the binary number 01110000 to decimal.(b) Convert the decimal number 42 to an 8-bit unsigned binary representation.(c) Convert the 8-bit 2’s complement binary number 10110110 to decimal.2(d) Convert the decimal number -117 to an 8-bit 2’s complement binary representation.(e) Convert the 8-bit unsigned binary number 10110010 to hexadecimal.(f) Convert the unsigned hexadecimal number BEAD to unsigned 16-bit binary.Name: 32. [12 Points] Binary Arithmetic and Logical Operations. Let A = 00100110 and B = 11010011 be 2’s comple-ment integers. Compute the following, giving your answers in both 8-bit 2’s complement and decimal. Use afixed width of 8 bits (i.e., your answers must be 8 bits). As always, show your work.(a) A + B(b) A OR B(c) A AND B4(d) B − A(e) A − B(f) A + B + 1Name: 53. [7 Points] Logical Operations. Complete the following truth tables.(a)A A A OR A A AND A0 11 0(b)A B C (A OR B) AND C (A AND C) OR (B AND C)0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1(c)A B (A AND B) (A OR B)0 00 11 01 14. [8 Points] Floating Point.(a) Give an example of a number that has a 32-bit floating point representation (as in Figure 2.2 in the text-book) and cannot be represented as a 32-bit 2’s complement integer. Explain why this number cannot berepresented as an integer.(b) Give an example of a number that can be represented as a 32-bit 2’s complement integer but cannot berepresented exactly as a 32-bit floating point. Explain why this number cannot be represented as a floatingpoint.65. [8 Points] Limitations of Fixed-Width Arithmetic. Consider the following 8-bit 2’s complement numbers:A = 01111111, B = 00000101, and C = 10001011. Assume that only 8 bits are available to represent values.Show your work.(a) Evaluate A + B. Give your answer as an 8-bit 2’s complement number. Convert this number to decimal.Why doesn’t this represent the sum of A and B?(b) Evaluate C − A. Give your answer as an 8-bit 2’s complement number. Convert this number to decimal.Why doesn’t this represent the difference of C and A?6. [10 Points] Multiple Interpretations of Bits. Consider the following sequence of 16 bits: 1100 0110 0011 0001.These bits can be interpreted in many different ways.(a) If we interpret these bits as a 16-bit unsigned binary integer, what is the decimal value represented by thebit sequence?(b) If we interpret these bits as a 16-bit 2’s complement integer, what is the decimal value represented by thebit sequence?Name: 7(c) If we interpret the low-order 8 bits as an ASCII character (see Appendix E in your textbook), what is thischaracter?(d) If we interpret these bits as a floating point number, what is the decimal value represented by the bitsequence. Assume that the floating point representation devotes 1 bit to the sign, 5 bits to the exponent,and 10 bits to the fraction (similar Figure 2.2 in your textbook). Give the answer in the following form:A × 2B, where A and B are decimal numbers.(e) If we interpret these bits as an Red-Green-Blue (RGB) color, what is the color represented by the bitsequence? Assume the high-order bit is always 1, the next 5 bits represent red, the next 5 bits representgreen, and the low-order 5 bits represent blue.7. [1 Point] Last and Most Important Question! Give us your feedback.(a) How many hours did you spend on this assignment?(b) On a scale of 1-5, how difficult did you find this assignment? (1-easiest, 5-most difficult)(c) Do you have any other comments on your experience completing this assignment? What are
View Full Document