I can understand binary operation 11 & x, for example if x = 1011, the operation will take out 10 from x and left x to be 11. However, when it comes to hexadecimal, I am very confused. What is the math and reasoning behind the similar effect of 0xff & x? I can only understand this if I convert them all to binary.
I can understand binary operation 11 & x , for example if x =
Share
0xFF & 0xABCD = 0xCD… why?As with most things, once you work with hex for a while, you’ll learn some tricks for remembering the values.