/ *
Write a function setBits (X, P, N, Y), which returns the result value after the following operation:
Set the N binary bits starting from the first P- in X to the value of the rightmost N bit in Y, the remaining points of X remain unchanged.
* /
Int sets (int X, int p, int N, int y)
{
/ *
X = 11011001, P = 3, n = 3, y = 00110111 ---> x = 11 111 001
* /
Return (~ (~ 0 << n) << p) | ((~ (~ 0 << n) & y) << p);
}