1. Engineering
  2. Computer Science
  3. f consider this declaration int x y w write...

Question: f consider this declaration int x y w write...

Question details

F. Consider this declaration: int x, y , w; Write a single C statement that assigns to variable w the following content: its leftmost 16 bits will have inverted values of corresponding bits in variable x (ls to Os, Os to 1s), and its all odd numbered rightmost 16 bits will be set to ls and its all even numbered rightmost 16 bits will have values of corresponding odd numbered leftmost 16 bits in variable y (i.e. w14-y31, w12-y29,... w2-y19, w0-y17) Hint: Bits of w are numbered as follows (from left to right): w31,w30,w29, w16,w15,..w2,wl,wo WZ,WI,WO

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution