Bit Manipulation on variable

Is there any operator or serve as that can be utilized to do particular bit manipulation, eg:

int a = 1;

a.<1> = 1; // instance to control bit-1 and set into 1 from 0

print(“$a”); // it must confirmed as 3 as a substitute of one, as a result of we manipulate the bit-1 above so the binary turn out to be 0000 0011 as a substitute of 0000 0001

View Reddit via adimarthaView Supply

You may also like...

WP2Social Auto Publish Powered By :