Write out the results of the following logical operations as

Write out the results of the following logical operations, assuming the variables are all int\'s (16-bit integers). Also assume that the variable \"Port\" is equal to 0x0055 for each line. (4) Port & 0xfffo; Port 15: Port = Port^0x0005; Port = (port &~(0x000f)|0x0020);

Solution

Hi buddy, for making the problem easier, convert hexa decimal numbers into binary.

0x00055 = (1010101)2

0xfff0 = (1111111111110000)2

0x0005 = (101)2

0x000f = (1111)2;

0x0020 = (100000)2

Bitwise operations will be much easier to do in binary.

A. 80
B. 95
C. 80
D. 112

 Write out the results of the following logical operations, assuming the variables are all int\'s (16-bit integers). Also assume that the variable \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site