Logical Operations |
AND |
Notation: Ɩ. Performs a bitwise AND operation between the bits of the left and right operands. For each bit position, the result is 1 if both corresponding bits are 1, otherwise returns 0. 0011 0101 Ɩ 0011 1010 ➜ 0011 0000 |
OR |
Notation: Ɨ. Performs a bitwise OR operation between the bits of the left and right operands. For each bit position, the result is 1 if at least one of the corresponding bits is 1, otherwise returns 0. 0011 0101 Ɨ 0011 1010 ➜ 0011 1111 |
XOR |
Notation: Ƙ. Performs a bitwise XOR operation between the bits of the left and right operands. For each bit position, the result is 1 if the corresponding bits are different (one is 1 and the other is 0), otherwise returns 0. 0011 0101 Ƙ 0011 1010 ➜ 0000 1111 |
NOT |
Notation: ƙ. Performs a bitwise NOT operation on the value of the operand. Bit operation: inverts each bit, turning each 1 into 0 and each 0 into 1. ƙ 1001 1100 ➜ 0110 0011 |
NAND |
Notation: ƚ. Performs a bitwise NAND operation between the bits of the left and right operands. Bit operation: returns 0 only if both corresponding bits are 1, otherwise returns 1. 0011 0101 ƚ 0011 1010 ➜ 1100 1111 |
NOR |
Notation: ƛ. Performs a bitwise NOR operation between the bits of the left and right operands. Bit operation: returns 1 only if all corresponding bits are 0, otherwise returns 0. 0011 0101 ƛ 0011 1010 ➜ 1100 0000 |
XNOR |
Notation: Ƨ. Performs a bitwise XNOR operation between the bits of the left and right operands. Bit operation: returns 1 if the corresponding bits are the same (both 0 or both 1), otherwise returns 0. 0011 0101 Ƨ 0011 1010 ➜ 1111 0000 |
Bitwise operations |
SHL |
Notation: Ɯ. Performs a bitwise SHL (Shift Left) operation on the operand, shifting the bits to the left by one position. Zeros are shifted in from the right to fill the vacated bit. This operation effectively doubles the operand's value for unsigned integers. The Most Significant Bit (MSB) is not specifically preserved in SHL as it shifts all bits left, potentially changing the sign for signed integers. shl 0001 0111 ➜ 0010 1110 |
SHLn |
Notation: ƞ. Performs a bitwise SHLn (Shift Left by n) operation on the operand, shifting the bits to the left by a specified number of positions n. Zeros are shifted in from the right to fill the vacated bits. This operation multiplies the operand's value by 2n for unsigned integers. This action potentially changes the sign of the Most Significant Bit (MSB) for signed integers. 0001 0111 << 10bin ➜ 0101 1100 |
SHR |
Notation: Ɲ. Performs a bitwise SHR (Shift Right) operation on the operand, shifting the bits to the right by one position. For unsigned integers, zeros are shifted in from the left. For signed integers, the Most Significant Bit (MSB), which determines the sign, is replicated to preserve the number's sign. This operation effectively divides the operand's value by 2 for unsigned integers, taking into account the sign for signed integers. shr 1001 1000 ➜ 1100 1100 |
SHRn |
Notation: Ɵ. Performs a bitwise SHRn (Shift Right by n) operation on the operand, shifting the bits to the right by a specified number of positions n. For unsigned integers, zeros are shifted in from the left to fill the vacated bits. For signed integers, the Most Significant Bit (MSB), which determines the sign, is replicated to fill the vacated bits on the left, preserving the number's sign. This operation effectively divides the operand's value by 2n for unsigned integers, taking into account the sign for signed integers 1001 1000 >> 11bin ➜ 1111 0011 |
+SHR |
Notation: ơ. Performs a bitwise +SHR (Logical Right Shift) operation on the operand, shifting the bits to the right by one position. Unlike the arithmetic right shift (SHR), the Logical Right Shift always shifts in zeros from the left, regardless of the number's sign. This operation does not consider the Most Significant Bit (MSB) for determining the sign of the result. This effectively divides the operand's value by 2, disregarding any sign. ushr 1001 1000 ➜ 0100 1100 |
+SHRn |
Notation: Ơ. Performs a bitwise +SHRn (Logical Right Shift by n) operation on the operand, shifting the bits to the right by a specified number of positions n. Zeros are shifted in from the left to fill the vacated bits. This operation is suitable for treating the operand as an unsigned integer, as it does not preserve the sign of the original number. The Logical Right Shift by n effectively divides the operand's value by 2n , disregarding any sign. 1001 1000 >>> 11bin ➜ 0001 0011 |
ROL |
Notation: ƣ. Performs a bitwise ROL (Rotate Left) operation on the operand, shifting the bits to the left circularly. The leftmost bit that is shifted out is wrapped around and filled into the rightmost bit's position. This operation ensures that no information is lost, as the bit that exits on one end of the operand is reintroduced at the other end. It's a circular shift operation, maintaining the original bit pattern but changing the positions of bits. rol 1010 0110 ➜ 0100 1101 |
ROLn |
Notation: ƥ. Performs a bitwise ROLn (Rotate Left by n) operation on the operand, shifting the bits to the left circularly by a specified number of positions n. The leftmost bits that are shifted out are wrapped around and filled into the rightmost bit positions. This operation ensures that no bit is lost, as the bits that exit on one end of the operand are reintroduced at the other end. It's a circular shift operation, maintaining the original bit pattern but changing the positions of bits based on the specified shift amount. 1010 0110 ƥ 3 ➜ 0011 0101 |
ROR |
Notation: Ƥ. Performs a bitwise ROR (Rotate Right) operation on the operand, shifting the bits to the right circularly by one position. The rightmost bit that is shifted out is wrapped around and filled into the leftmost bit position. This operation ensures that no bit is lost, as the bit that exits on one end of the operand is reintroduced at the other end. It's a circular shift operation, maintaining the original bit pattern but changing the positions of bits. ror 1010 0110 ➜ 0101 0011 |
RORn |
Notation: Ʀ. Performs a bitwise RORn (Rotate Right by n) operation on the operand, shifting the bits to the right circularly by a specified number of positions n. The bits that are shifted out from the right end are wrapped around to the left end of the operand. This circular shift operation ensures that no bit of information is lost, as each bit that exits on one end is reintroduced at the opposite end. 1010 0110 Ʀ 3 ➜ 1101 0100 |
General |
MAX |
Constant that contains the highest value for the current base within the defined bit range. |
BITS |
Constant indicating the total number of bits for the current base as configured in the calculator's settings. |