Question: Question 1 (1 point) Suppose a = 010101 , b = 110001 Which one of the following would be ~b ? Question 1 options: none

Question 1 (1 point)

Question 1 (1 point) Suppose a = 010101 , b = 110001

Suppose a = 010101 , b = 110001

Which one of the following would be ~b ?

Question 1 options:

none of these

100001

101011

001110

110101

Save

Question 2 (1 point)

Which one of the following would be ~b ? Question 1 options:

Suppose a = 010101 , b = 110001

Which one of the following would be a & b ?

Question 2 options:

100001

none of these

101001

110101

111011

Save

Question 3 (1 point)

none of these 100001 101011 001110 110101 Save Question 2 (1 point)

Suppose a = 010101 , b = 110001

Which one of the following would be a | b ?

Question 3 options:

111011

110101

100000

101001

none of these

Save

Question 4 (2 points)

Suppose a = 010101 , b = 110001 Which one of the

Consider the C statements below. Assume x has been assigned a value.

int mask = 0xFF000000; y = x ^ mask;

Which one of the following best describes the value computed for variable y?

Question 4 options:

y contains the most significant byte of x complemented, with the rest of the bits unchanged

y contains the most significant byte of x unchanged, with the rest of the bits 0

y contains the most significant byte of x unchanged, with the rest of the bits 1

y contains the most significant byte of x zeroed, with the rest of the bits unchanged

none of these

Save

Question 5 (2 points)

following would be a & b ? Question 2 options: 100001 none

Consider the C statements below. Assume x has been assigned a value.

int mask = 0x000000FF; y = x & mask;

Which one of the following best describes the value computed for variable y?

Question 5 options:

y contains the least significant byte of x, with all other bits set to 0

y has all bits set to 1

y contains the least significant byte of x, with all other bits set to 1

y has all but the least significant byte zeroed, with the least significant byte complemented

none of these

Save

Question 6 (2 points)

of these 101001 110101 111011 Save Question 3 (1 point) Suppose a

Determine x, as a logical value, after the statements below. See the hint for a note about 'logical'.

int a = 4, b = 3, x; x = !a;

Question 6 options:

True
False

= 010101 , b = 110001 Which one of the following wouldHide hint for Question 6

logical means we could use x in an if statement: if ( x )

so would x be considered True or False?

Save

Question 7 (3 points)

be a | b ? Question 3 options: 111011 110101 100000 101001

Determine x, as a logical value, after the statements below. See the hint for a note about 'logical'.

int a = 0, b = 2, x; x = !( !a && !b)

Question 7 options:

True
False

none of these Save Question 4 (2 points) Consider the C statementsHide hint for Question 7

logical means we could use x in an if statement: if ( x )

so would x be considered True or False?

Save

Question 8 (2 points)

below. Assume x has been assigned a value. int mask = 0xFF000000;

Suppose the variable x has the value shown. Determine the result of the indicated left shiftoperation(s) as a single byte in hexadecimal.

int x = 0xC5; x  

Question 8 options:

0x8A

0xD6

none of these

0x62

0x14

y = x ^ mask; Which one of the following best describesHide hint for Question 8

suggestion: convert to binary, do the shift, convert back to hex

Save

Question 9 (2 points)

the value computed for variable y? Question 4 options: y contains the

Suppose the variable x has the value shown. Determine the result of the indicated right logical shift operation(s) as a single byte in hexadecimal.

int x = 0xF6; x >> 2

Question 9 options:

none of these

0xD6

0xD4

0xE5

0x3D

most significant byte of x complemented, with the rest of the bitsHide hint for Question 9

suggestion: convert to binary, do the shift, convert back to hex

Save

Question 10 (2 points)

unchanged y contains the most significant byte of x unchanged, with the

Suppose the variable x has the value shown. Determine the result of the indicated right arithmetic shift operation(s) as a single byte in hexadecimal.

int x = 0xCA; x >> 2;

Question 10 options:

0xFE

0x32

0xA8

0x65

none of these

rest of the bits 0 y contains the most significant byte ofHide hint for Question 10

suggestion: convert to binary, do the shift, convert back to hex

Save

Question 11 (2 points)

x unchanged, with the rest of the bits 1 y contains the

The largest unsigned value that may be represented using 6 bits is 63.

Question 11 options:

True
False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!