Module expr_fn

Module expr_fn 

Source

Functions§

bit_count
Returns the number of bits set in the binary representation of the argument.
bit_get
Returns the value of the bit (0 or 1) at the specified position.
bitwise_not
Returns the result of a bitwise negation operation on the argument, where each bit in the binary representation is flipped, following two’s complement arithmetic for signed integers.
shiftleft
Shifts the bits of the first argument left by the number of positions specified by the second argument. If the shift amount is negative or greater than or equal to the bit width, it is normalized to the bit width (i.e., pmod(shift, bit_width)).
shiftright
Shifts the bits of the first argument right by the number of positions specified by the second argument (arithmetic/signed shift). If the shift amount is negative or greater than or equal to the bit width, it is normalized to the bit width (i.e., pmod(shift, bit_width)).
shiftrightunsigned
Shifts the bits of the first argument right by the number of positions specified by the second argument (logical/unsigned shift). If the shift amount is negative or greater than or equal to the bit width, it is normalized to the bit width (i.e., pmod(shift, bit_width)).