Review Sections 2.1.6 through 2.1.9 of the Byrant/O\'Hallaron text then, Suppose
ID: 3880844 • Letter: R
Question
Review Sections 2.1.6 through 2.1.9 of the Byrant/O'Hallaron text then, Suppose that x = 0x66 and y=0x39, respectively. Fill in the following table with hexadecimal values that indicate the values of each of the following C expressions Remember that logical expressions have values of 0 and 1 only. Expression Left Side Right Side Expression Value 54 x & y 0x66 0x39 55 x | y 0x66 0x39 56-57 ~x | ~y 0x99 58-60 x & !y 61-63 x && y 64-66 x || y 67-69 !x || !y 70-72 x && ~y Complete the table below showing the effects of the different shift operations: Logical Arithmetic x x<<2 x>>2 x>>2 Hex Binary Hex Binary Hex Binary Hex Binary 73-79 0xC6 80-86 0x7B 87-93 0x87 94-100 0xB2 Review Sections 2.1.6 through 2.1.9 of the Byrant/O'Hallaron text then, Suppose that x = 0x66 and y=0x39, respectively. Fill in the following table with hexadecimal values that indicate the values of each of the following C expressions Remember that logical expressions have values of 0 and 1 only. Expression Left Side Right Side Expression Value 54 x & y 0x66 0x39 55 x | y 0x66 0x39 56-57 ~x | ~y 0x99 58-60 x & !y 61-63 x && y 64-66 x || y 67-69 !x || !y 70-72 x && ~y Complete the table below showing the effects of the different shift operations: Logical Arithmetic x x<<2 x>>2 x>>2 Hex Binary Hex Binary Hex Binary Hex Binary 73-79 0xC6 80-86 0x7B 87-93 0x87 94-100 0xB2Explanation / Answer
Please find the anwer below;
The hexadecimal number 66 in decimal is 102.
The hexadecimal number 39 is decimal is 57.
Result of x & y in hex is 20 and in decimal is 32
The hexadecimal number 66 in decimal is 102.
The hexadecimal number 39 is decimal is 57.
Result of x | y in hex is 7f and in decimal is 127
The hexadecimal number 66 in decimal is 102.
The hexadecimal number 39 is decimal is 57.
Value of ~x and ~y in hex is 99 c6
Result of ~x | ~y in hex is df and in decimal is 223
The hexadecimal number 66 in decimal is 102.
The hexadecimal number 39 is decimal is 57.
Value of x and !y in hex is 66 0
Result of x & ~y in hex is 0 and in decimal is 0
The hexadecimal number 66 in decimal is 102.
The hexadecimal number 39 is decimal is 57.
Value of x and y in hex is 66 39
Result of x && y in hex is 1 and in decimal is 1
The hexadecimal number 66 in decimal is 102.
The hexadecimal number 39 is decimal is 57.
Value of x and y in hex is 66 39
Result of x || y in hex is 1 and in decimal is 1
The hexadecimal number 66 in decimal is 102.
The hexadecimal number 39 is decimal is 57.
Value of !x and !y in hex is 0 0
Result of !x || !y in hex is 0 and in decimal is 0
The hexadecimal number 66 in decimal is 102.
The hexadecimal number 39 is decimal is 57.
Value of x and !y in hex is 66 0
Result of x && !y in hex is 0 and in decimal is 0
c6
binary = 1100 0110
after x<<2
binary = 0011 0001 1000
Result in hexadecimal 318
after x>>2
binary = 0011 0001
Result in hexadecimal 31
7B
binary = 0111 1011
after x<<2
binary = 0001 1110 1100
Result in hexadecimal 1ec
after x>>2
binary = 0001 1110
Result in hexadecimal 1e
87
binary = 1000 0111
after x<<2
binary = 0010 0001 1100
Result in hexadecimal 21c
after x>>2
binary = 0010 0001
Result in hexadecimal 21
B2
binary = 1011 0010
after x<<2
binary = 0010 1100 1000
Result in hexadecimal 2c8
after x>>2
binary = 0010 1100
Result in hexadecimal 2c
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.