In C++, why check negative number with "&1" : just ran into this question when I tried to refactor my code for a LeetCode problem. It's basically checking the sum of two integers is negative or not:

    if(A+B<0)
This is how I would do it, where **A** is a positive integer no exceeding 1000 and **B** can be any 32-bit integer. However, I saw others whose performance is faster than mine does this:

    if(A+B &1)
I could not explain this to myself and switching to the second version does bring a little improvement to my solution. 

Can anyone explain a little bit? Any help would be appreciated.
Thanks