helpers ¤
Functions:
-
to_signed
–Returns the signed number associated with the two's-complement binary representation of
unsigned
-
logical_shift_left
– -
logical_shift_right
–n
is truncated to the width ofbit_width
before the operation takes place. -
rotate_right
–n
is truncated to the width ofbit_width
before the operation takes place. -
arithmetic_shift_right
–This returns the value represented by the two's-complement binary representation of the final result.
to_signed ¤
Returns the signed number associated with the two's-complement binary representation of unsigned
logical_shift_right ¤
n
is truncated to the width of bit_width
before the operation takes place.
rotate_right ¤
n
is truncated to the width of bit_width
before the operation takes place.
arithmetic_shift_right ¤
This returns the value represented by the two's-complement binary representation of the final result. This means the result could be negative (if the top bit of the input is negative)
n
is truncated to the width of bit_width
before the operation takes place.