Write each answer as two hexadecimal digits x 0xf0

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: ple, the expression a && 5/a will never cause a division by zero, and the expression p && *p++ will never cause the dereferencing of a null pointer. Practice Problem 2.9: Suppose that x and y have byte values 0x66 and 0x93, respectively. Fill in the following table indicating the byte values of the different C expressions 40 CHAPTER 2. REPRESENTING AND MANIPULATING INFORMATION Expression x&y x|y ˜x | ˜y x & !y Value Expression x && y x || y !x || !y x && ˜y Value Practice Problem 2.10: Using only bit-level and logical operations, write a C expression that is equivalent to x == y. That is, it will return 1 when x and y are equal and 0 otherwise. 2.1.10 Shift Operations in C C also provides a set of shift operations for shifting bit patterns to the left and to the right. For an operand x having bit representation ÜÒ ½ ÜÒ ¾ ܼ , the C expression x << k yields a value with bit representation ÜÒ ½ ÜÒ ¾ ܼ ¼ ¼ . That is, x is shifted bits to the left, dropping off the most significant bits and filling the le...
View Full Document

Ask a homework question - tutors are online