130 likes | 254 Views
HW1 Report. Xing Wang. HW1-PR1 Question. Not Good Formatted Example. Perfect Answer. HW1-PR2. your program should read an operand, an operator as a single character +-*/, and another operand, separated by spaces. Output the results. For example: 100 + 3.14 , output 103.14
E N D
HW1 Report Xing Wang
HW1-PR2 • your program should read an operand, an operator as a single character +-*/, and another operand, separated by spaces. Output the results. • For example: • 100 + 3.14 , output 103.14 • 4 * 5, output 20
HW1-PR3 • Exercise 11 on page 86, but with the following modifications: instead of using U.S. currency, write your program for the Euro. Note that Euro coins come in different denominations from U.S. coins; there are 8 that you must account for. Report to the user the individual counts (as in the original problem) and the sum in Euros and cents (instead of dollars and cents). In addition, convert the final value to U.S. dollars using a recent exchange rate (do not worry about rounding the result, for now).
HW1-PR4 Signed Integer Max Integer : 2,147,483,647 1 0 -1 Min Integer : -2,147,483,648
The negative integer • The absolute value of negative integer is the complementary of the binary representation plus 1. -1 Complementary of -1 Absolute value of -1, Complementary of -1 plus 1
HW1-PR4-Analysis 1 • 10^10 (1001010100000010111110010000000000 )
HW1-PR4-Analysis 2 • 10^12, is a negative value as the sign bit is 1.