Bitwise

Execute bitwise operations with accuracy and speed.

Bitwise functions are indispensable for low-level programming and hardware design. Calcul.io offers a range of bitwise operations such as AND, OR, XOR, NOT, shifts, and rotations. These functions allow you to manipulate individual bits within an integer, which is fundamental for tasks like cryptography, data compression, and error detection.

With our bitwise functions, you can perform precise bit manipulation with ease. Whether you are developing embedded systems, optimizing performance, or working on algorithmic challenges, Calcul.io provides the tools necessary to execute bitwise operations efficiently and accurately.

bitAnd

Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0

bitNot

Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.

bitOr

Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.

bitXor

Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.

leftShift

Bitwise left logical shift of a value x by y number of bits.

rightArithShift

Bitwise right arithmetic shift of a value x by y number of bits.

rightLogShift

Bitwise right logical shift of a value x by y number of bits.

All functions