Consider the following C functions: int fun1 (unsigned word) { return (int) ((word < < 24)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
w fun1w fun2w 0x00000076 0x00000076 0x00000076 0x00CDEFEF 0x000000ef 0xffffffef 0x1234569C 0x0... View the full answer
Related Book For
Posted Date:
Students also viewed these accounting questions
-
Fill in the following table of values: 6 4 3 23 6 tan sec
-
Your portfolio had the values in the following table for the 4 years listed. Calculate your average return over the 4-year period. Beginning Value ($) 50,000.00 55,000.00 58,000.00 65,000.00 Year...
-
Fill in the blanks in the following table of GDPstatistics: 2005 2006 2007 13,843 Nominal GDP 12,434 Real GDP 11,003 11,319 GDP deflator 116.6 119.7
-
Please graphically demonstrate the effects on the level of prices and the value of money if consumers increase their spending due to stock market boom and therefore make more transactions. On the...
-
How can a country's tax system affect the manner in which an operation in that country is financed by a foreign investor?
-
(a) What is the direction of the force on a wire carrying a current due east in a location where the Earth's field is due north? Both are parallel to the ground. (b) Calculate the force per meter if...
-
What will be the change in temperature of a \(0.2 \mathrm{~kg}\) iron bar if \(400 \mathrm{~J}\) of energy is transferred into it as heat? \(\left(C_{P} ight.\) for iron \(\left.=450 \mathrm{~J} /...
-
Strategic analysis of operating income. Halsey Company sells womens clothing. Halseys strategy is to offer a wide selection of clothes and excellent customer service and to charge a premium price....
-
1. How much would be in your savings account in 11 years after depositing $150 today if the bank pays 7% per year? 2. A deposit of $350 earns the following interest rates: (a) 8% in the first year,...
-
When Serena was dismissed without cause from her position as vice president, she received only her entitlements under the Employment Standards Act, 2000. Her compensation package was variable so, as...
-
It is March. A Canadian farmers' cooperative that is based in Quebec expects to sell 275,000 bushels of soybeans at the end of July 2019. Because of a recent diplomatic issue between Canada and...
-
Memo to the Manager: Summarize your findings in a clear, concise manner. Explain how each scenario impacts the income statement and what that could mean for the company's financial health.
-
What are Contingent Liabilities?Give an example. What are the factors that determine the reason for Contingent Liabilities?
-
Posey's Pet Emporium Sales Forecast July August September Quarter Budgeted sales volume $32,000.00 $35,200.00 $35,000.00 $102,200.00 Budgeted selling price $4.99 $4.99 $4.99 $4.99 Budgeted sales...
-
In what way do legal systems have an impact on global business?
-
Company A's balance sheet shows $400 million in debt, $75 million in preferred stock, and $325 million in total common equity. Company A's tax rate is 30%,rd = 7%,rps = 6.2%, andrs = 15%. If A has a...
-
What are the roles of economic, social, and political perspectives on cultural groups?
-
Proposals have been made to ?sail? spacecraft to the outer solar system using the pressure of sunlight, or even to propel interstellar spacecraft with high-powered, Earth-based lasers. Sailing...
-
During the 1980s, the size of the federal government debt became so large that servicing the interest payments became a significant portion of total federal expenditure. In response, many...
-
Using Figures 17-2 and 17-3 as a guide, assume a price-setting monopolist firm with no fixed costs and constant marginal cost (MC0) of $3.00 faces an original demand curve P = 10 - 0.1Y. In Figures...
-
Discuss how the Feds monetary policy from 200204 fueled the housing bubble and how its change in policy from mid-2004 to mid-2006 contributed to the bursting of the housing bubble.
-
Kodak has developed an important brand name through its advertising, innovation, and product quality and service. Suppose Kodak sets up a network of exclusive dealerships, and one of the dealers...
-
The Justice Department sued several universities for collectively setting the size of scholarships offered. Explain why the alleged price fixing on the part of universities might be harmful to...
-
Some airline executives have called for reregulation. Why might an executive of an airline prefer to operate in a regulated environment?
Study smarter with the SolutionInn App