subject

2.81: we are running programs on a machine where values of type int are 32 bits. they are represented in two's complement, and they are right shifted arithmetically. values of type unsigned are also 32 bits. we generate arbitrary values x and y, and convert them to unsigned values as follows: /* create some arbitrary values */ int x = random(); int y = random(); /* convert to unsigned */ unsigned ux = (unsigned) x; unsigned uy = (unsigned) y; for each of the following c expressions, you are to indicate whether or not the expression always yields 1. if it always yields 1, describe the underlying mathematical principles. otherwise, give an example of arguments that make it yield 0. (x < y) == (-x > -y) ((x + y) < < 4) + y - x == 17*y + 15*x ~x + ~y + 1 == ~(x+y) (ux - uy) == -(unsigned) (y - x) ((x > > 2) < < 2) < = x

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 13:30, ReaLily
1. technician a says horsepower information can be used by consumers to compare the power of different automobile engines. technician b says that manufacturers will often list the horsepower output of their engines in the online service information. who is right?
Answers: 2
image
Computers and Technology, 22.06.2019 23:30, lexirandall19
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
image
Computers and Technology, 23.06.2019 11:30, kyraj21
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
image
Computers and Technology, 23.06.2019 13:50, mrfishyyyy
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
You know the right answer?
2.81: we are running programs on a machine where values of type int are 32 bits. they are represent...

Questions in other subjects:

Konu
Mathematics, 24.08.2019 09:10
Konu
Mathematics, 24.08.2019 09:10