Problem 66 solution pg 306 the solution is a

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: ort pointer arithmetic, but the C compiler often uses it as a way to perform multiplication by small constants. For each value of , we can compute two multiples: can compute multiples 1, 2, 3, 4, 5, 8, and 9. Problem 2.22 Solution: [Pg. 65] We have found that students find this exercise looks difficult when working directly with assembly code. Formulating it in the manner we have shown in optarith can help clarify the behavior. We can see that M is 15; x*M is computed as (x<<4)-x. We can see that N is 4; a bias value of 3 is added when y is negative, and the right shift is by 2. Problem 2.23 Solution: [Pg. 68] Understanding fractional binary representations is an important step to understanding floating-point encodings. This exercise lets you try out some simple examples. Fractional Value ½ ¿ ¾¿ ½ ¿¾ ½½ ¾ (when b is 0) and ¾ ·½ (when b is a. Thus, we Binary Rep. ¼ ¼½ ¼ ¼½½ ½ ¼½½½ ½¼ ½½¼½ ½ ¼½½ ½¼½ ½¼½ Decimal Rep. ¼¾ ¼¿ ½ ¾ ½¿ ¾ ¿¼ ¾ ¿ ¼¾ ½ ½½ ¼¼¼½ One simple way to think about fractional binary representations i...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online