Can someone explain this easier?
The binary representation of 170 is 0000 0000 1010 1010 . The binary representation of 75 is 0000 0000 0100 1011 . Performing the bitwise AND operation on these two values ββleads to the binary result 0000 0000 0000 1010 , which is decimal 10.
0000 0000 1010 1010 0000 0000 0100 1011 ------------------- 0000 0000 0000 1010
This will make me click as soon as I know what is being done. I have a basic understanding of binaries and know a little from the top of my head ... for example, 1, represented in binary format, will be 00000001 , and 2 will be 00000010 , and 3 will be 00000011 , and 4 will be 00000100 and 5 will be 00000101 , and 6 will be 00000110 . Therefore, I understand what happens when you get a number every time.
I also understand what happens when this sql developer subtracts, but something is missing when she uses t-sql code to find the answers ... regarding what is indicated in this link.
http://sqlfool.com/2009/02/bitwise-operations/
binary
user1700358
source share