Unformatted text preview: p;& ˜y Value 0x01 0x01 0x00 0x01 That is xˆy will be zero if and only if every bit of x matches the corresponding bit of y. We then exploit the ability of ! to determine whether a word contains any nonzero bit. There is no real reason to use this expression rather than simply writing x == y, but it demonstrates some of the nuances of bitlevel and logical operations. Problem 2.11 Solution: [Pg. 40] This problem is a drill to help you understand the different shift operations. x 0xF0 0x0F 0xCC 0x55 Problem 2.12 Solution: [Pg. 43] In general, working through examples for very small word sizes is a very good way to understand computer arithmetic. The unsigned values correspond to those in Figure 2.1. For the two’s complement values, hex digits 0 through 7 have a most signiﬁcant bit of 0, yielding nonnegative values, while while hex digits 8 through F, have a most signiﬁcant bit of 1, yielding a negative value. x << 3 0x80 0x78 0x60 0xA8 x >> 2 (Logical) 0x3C 0x03 0x33 0x15 x >> 2 (Arithmetic) 0xFC 0x03 0xF3 0x15 Ü (Hex)
0 3 8 A F Problem 2.13 Solution: [Pg. 4...
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.
 Spring '10
 Schultz
 The American, Gulliver's Travels, 2.2.5 2.2.6 2.2.7 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5

Click to edit the document details