Question: Consider the following C functions: int fun1 (unsigned word) { return (int) ((word < < 24) > 24); } int fun2(unsigned word) { return

Consider the following C functions: int fun1 (unsigned word) { return (int) ((word < < 24) > 24); } int fun2(unsigned word) { return ((int) word < < 24) 24%3; } Assume these are executed on a machine with a 32-bit word size that uses two's- complement arithmetic. Assume also that right shifts of signed values are per- formed arithmetically, while right shifts of unsigned values are performed logically. Fill in the following table showing the effect of these functions for several example arguments. You should input your answers using hexadecimal representation including any leading zeros (e.g. Ox00...). w fun1(1) fun2(w) Ox000000c9 OXEDCBA987
Step by Step Solution
There are 3 Steps involved in it
w fun1w fun2w 0x00000076 0x00000076 0x00000076 0x00CDEFEF 0x000000ef 0xffffffef 0x1234569C 0x0... View full answer
Get step-by-step solutions from verified subject matter experts
