Utils
fromTwos
Convert value
from a twos-compliment representation of width
bits to its value.
If the highest bit is 1
, the result will be negative.
Parameters
Parameter | Type | Description |
---|---|---|
_value | BigNumberish | The value to convert. |
_width | Numeric | The width of the value in bits. |
Returns
bigint
The value.
Throws
If the value is too large for the width.
Source
Was this page helpful?