Both are server side scripts !
The Bitmask fields are BigInt datatype in SQL Server, if I use parseInt() in javascript, integer variables overflow and do not give the required results.
How do we parse BigInt datatypes in javascript?
There are some 3rd party BigInt javascript libraries available on internet, but not sure if bitwise operations are possible using them.