This preview shows page 1. Sign up to view the full content.
Unformatted text preview: inary conversion. It also gets you thinking about integer and ﬂoating-point representations. We will explore these representations in more detail later in this chapter. A. Using the notation of the example in the text, we write the two strings as
0 0 3 5 4 3 2 1 00000000001101010100001100100001 ********************* 4 A 5 5 0 C 8 4 01001010010101010000110010000100 B. With the second word shifted two positions relative to the ﬁrst we ﬁnd a sequence with 21 matching bits. C. We ﬁnd all bits of the integer embedded in the ﬂoating point number, except for the most signﬁcant bit having value 1. Such is the case for the example in the text as well. In addition the ﬂoating-point number has some nonzero high-order bits that do not match those of the integer. Problem 2.4 Solution: [Pg. 33] It prints 41 42 43 44 45 46. Recall also that the library routine strlen does not count the terminating null character, and so show_bytes printed only through the character ‘F.’ Problem 2.5 Solution: [Pg. 36] This problem is a drill to help you become more fami...
View Full Document
- Spring '10
- The American