Javascript
Javascript is using 32 bit signed integers while performing bitwise operations (as Tom linked it already). Since your value is bigger than maximum value of a 32bit integer, only the lower part of the integer will be in use (this is because of overflow).
You can test it by executing a simple test: console.log(2912047312 | 0)
which will print you -1382919984
.
The two operands in the 2912047312 & 2912047312
expression will be transformed to 32 bit integers, so the actual bitwise operation will be performed on the -1382919984 & -1382919984
expression.
The range of a signed integer is −2147483648
to +2147483647
.
SQL Server
SQL Server can perform bitwise operation on any integer type operands, including bigint, so the result will be calculated on a bigger datatype, no overflow will occur.
So the difference is because the two systems are using different data types in bitwise operations, and one of them can't handle the value you provided without overflow and therefore without changing the actual value.
Edit
You can 'emulate' the overflow with a small trick:
SELECT (-2147483648 + (CAST(2912047312 AS BIGINT) & CAST(2147483647 AS BIGINT)));
The CAST(2912047312 AS BIGINT) & CAST(2147483647 AS BIGINT)
part will drop the upper part of the 64 bit integer value (the upper 32 bits are 0s, the lower 32 bits are 1s for the 2147483647 value which is the maximum value using a 32bit integer).
Then it will add the result to the minimum value of a signed 32 bit integer (-2147483648).