By ronen ariely on
Bitwise Operators performs "wise" "bit by bit" manipulations between two expressions of types integers or binaries (binary, bit, int, smallint, tinyint, varbinary, bigint). There are three Bitwise Operators in T-SQL which includes: & (Bitwise AND), | (Bitwise OR), ^ (Bitwise Exclusive OR). In this short post we will explain the behavior of each of these operators by following a simple practical examples.
** This post include several accessories, which you can use in other cases. For example A function to convert integers base ten number into base two number (without using any direct loop).