Write a single c statement that sets to one bits 7 9 and 11


For the questions below assume that N is an integer variable that occupies two or more bytes of memory (the exact number of bytes is unknown, so your solution should work for any number of bytes.) You may not use conditionals (if statements) or loops in your answers.

a) Write a single C statement that sets to 1 the sign (most significant) bit of N, leaving the remaining bits unchanged. You may use the sizeof operator in your answer.

b) Write a single C statement that clears (sets to zero) the least significant 4 bits of N, leaving the remaining bits unchanged.

c) Write a single C statement that sets to one bits 7, 9 and 11 of N, leaving the remaining bits unchanged. (Bit 0 is the least significant bit.)

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a single c statement that sets to one bits 7 9 and 11
Reference No:- TGS02910967

Expected delivery within 24 Hours