Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Exercise 2-7. Write a function invert(x,p,n) that returns x with the n bits that begin at position p inverted (i.e., I changed into 0 and vice versa), leaving the others unchanged. 0
  2. Exercise 2-6. Write a function setbits(x,p,n,y) that returns x with the n bits that begin at position p set to the rightmost n bits of y, leaving the other bits unchanged. 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement