Midterm Solutions 2013

D no relevance to a series of direct access to memory

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: resentations they should be interpreted as, which of the following is the correct ordering of least to greatest? i . 0xC0700000 in floating point ii. 0xFFFFFFFC in two’s complement iii. 0xFF800000 in floating point (a) i, ii, iii (b) iii, ii, i (c) iii, i, ii (d) i, iii, ii (e) ii, i, iii 22. Flipping all of the bits in ones complement is the same as: (a) Adding one to the number. (b) Subtracting one from the number. (c) Subtracting the number from 2n- 1, where n is the number of bits. (d) Dividing the number by negative one. (e) Multiplying the number by negative one, then subtracting one. 23. What is the smallest positive integer 32 bit IEEE floating point cannot represent? (a) 1 (b) 224 + 1 (c) 2128 - 1 (d) 2127 + 2126 + 2125 + … + 2104 + 1 (e) 2128 + 2127 + 2126 + … + 2105 + 1 24. Give the result of adding the following binary numbers in two’s complement. Assume we are working with 4 bit binary numbers only: 1010 + 1110 (a) - 8ten (b) 4ten (c) - 4ten (d) Overflow (e) Underflow 25. Executing the following C code: #include <stdio.h> int a = 11; if (0x2a == 42 && a) { printf(“The cat is a cat cat.”); } will: (a) Print the sentence (b) Error when it gets to the third line (c) It doesn’t actually compile (d) Error when it gets to the fourth line (e) None of the above 7 CS61C Fall 2013 Midterm Section VI: Memory Hierarchy 26. Which of the following best describes an action likely to require fewer clock cycles than loading a whole cache line from memory. (a) Loading a subset of the cache line from memory. (b) Writing to a subset of the cache line with a write- thro...
View Full Document

Ask a homework question - tutors are online