Well, the problem is: Write a program setbits(x, p, n, y); which returns x with the n bits that begin at position p set to the rightmost n bits in y, leaving the other bits unchanged.<p>I've tried to solve it.<p>To answer your questions; Yes, I understand binary representation, 
11 is 1011
12 is 1100
25 is 11001
-9 is 1001010 (where the leftmost bit is set to 1)