Bitwise operator
&: if a&1 then last digit of a will always same as in previous a. a^1= compliment (a), a^0=a, (diff bit =a) a^a=0, (same bit =0) coversion : Decimal --> n base = keep divide by base exp : (17)D = ()2 = ....... n base --> decimal = multiply each digit with the power of base and add them. exp: 1* 2^3 + 0*2^2 + 0 * 2*1+ 1*2^0=.. Left shift : a<<b = a* (2^b) Right shift : a>>b = a/(2^b) unique no. in duplicate array : xor all elements find ith bit of a no. n = n & (1<<n-1) set ith bit = n | (1<<n-1) reset ith bit= !(1<<n-1) Find position of rightmost set bit negative no. in binary= 1st bit (MSB) = if 0 (+ve), id 1(-ve) neg no. by 2's compliment : find compliment of no. ..then add +1 1 byte range = -128 to 127 (total 256 no. can be stored..2^7) because we ignore 1st bit formula of range = -2^(n-1) to 2^(n-1) -1 find uniq no. in odd repeating no. array find nth magic no. find no. of digit in...