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 fun1 w fun2 w 0x00000076 0x00000076 0x00000076 0x00CDEFEF 0x000000ef 0xffffffef 0x1234569C 0x000... 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
-
The following selected financial information was obtained from the 2012 financial reports of Robotranics, Inc. and Technology, Limited: Assume that total assets, total liabilities, and total...
-
The following information is for Polo Limited for 2014: Net income for the year ................................................................................. $2,300,000 8% convertible bonds...
-
Last year, there were 24,584 age-discrimination claims filed with the Equal Employment Opportunity Commission. Assume there were 260 working days in the fiscal year for which a worker could file a...
-
The sequence of seven LDI instructions in the register-number program with the pipeline execution pattern given on page 540 is fetched and executed. Manually simulate the execution by giving, for...
-
Lauras Dress Delivery operates a mail-order business that sells clothes designed for frequent travelers. It had sales of $800,000 in December. Because Lauras Dress Delivery is in the mail-order...
-
Raven Corporation is considering an investment opportunity with the expected net cash inflows of $400,000 for five years. The residual value of the investment, at the end of five years, would be...
-
A compound has a molecular formula of C8H14O4, and its infrared spectrum contains an intense peak at 1730 cm -1. The 1H NMR spectrum of the compound is shown in Figure 20.11. What is its structure?...
-
Demonstrate that Bohr's model of the hydrogen atom is well approximated by a classical particle model (classical physics) in the case of very large quantum numbers (while ignoring Maxwell's system of...
-
In Problem given a normal distribution with mean -15 and standard deviation 10, find the number of standard deviations each measurement is from the mean. Express the answer as a positive number. 6.4
-
In Problem consider the normal distribution with mean 60 and standard deviation 12. Find the area under the normal curve and above the given interval on the horizontal axis. [48, 60]
-
Scholastic Aptitude Tests (SATs) are scaled so that the mean score is 500 and the standard deviation is 100. What percentage of students taking this test should score 700 or more? Assume a normal...
-
In Problem given a normal distribution with mean 25 and standard deviation 5, find the area under the normal curve from the mean to the indicated measurement. 23.9
-
In Problem consider the normal distribution with mean 60 and standard deviation 12. Find the area under the normal curve and above the given interval on the horizontal axis. [57, 63]
-
One month ago, an investor entered into a forward agreement to sell a bond in three months' time at a price of $100. The current spot price for the bond is $101.50. Suppose the term structure of...
-
Refer to the data for problem 13-36 regarding Long Beach Pharmaceutical Company. Required: Compute each division's residual income for the year under each of the following assumptions about the...
-
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.
-
Why did soybean prices fall in 2015? Draw graphs to show the soybean market and the cost and revenue curves of a soybean farmer at the start and end of 2015. Show the change in the soybean farmers...
-
Compute the current in the 23- resistor of Fig. 4-11(a) by applying the superposition principle. With the 200-V source acting alone, the 20-A current source is replaced by an open circuit, Fig....
-
The force applied to an object moving in the x direction varies according to F= 12/x 2 (N). (a) Find the work done in the interval 1 m x 3 m. (b) What constant force acting over the same interval...
Study smarter with the SolutionInn App