Say you have two binary values
001011
001111
How can you get the number of different bits in MySQL? I tried
SELECT BIT_COUNT(BINARY 001011 ^ BINARY 001111)
This returns 6, while I need a solution that returns 1 in this example.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1 Answer