BitVector Type
Represents a bit vector, which is a sequence of bits. This type internally
uses two different representations to represent a bit vector depending on
its size. The numeric value of the bit vector is stored in little-endian
order. For those with less than or equal to 64 bits, it uses uint64.
For those with more than 64 bits, it uses bigint. This is to avoid
the overhead of using bigint for small numbers as most CPU operations
are in 64 bits or less.
Constructors
| Constructor |
Description
|
|
|
Full Usage:
BitVector(bi, bitLen)
Parameters:
bigint
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns a BitVector from a bigint value. We assume that the given bitLen is big enough to hold the given bigint. Otherwise, the resulting BitVector may contain an unexpected value.
|
Full Usage:
BitVector(i32, bitLen)
Parameters:
int32
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns a BitVector from an int32 value.
|
Full Usage:
BitVector(u32, bitLen)
Parameters:
uint32
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns a BitVector from a uint32 value.
|
Full Usage:
BitVector(i64, bitLen)
Parameters:
int64
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns a BitVector from an int64 value.
|
Full Usage:
BitVector(u64, bitLen)
Parameters:
uint64
bitLen : int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns a BitVector from a uint64 value.
|
Instance members
| Instance member |
Description
|
Full Usage:
this.IsFalse
Returns: bool
|
Returns
|
Full Usage:
this.IsNegative
Returns: bool
|
Returns
|
Full Usage:
this.IsOne
Returns: bool
|
Returns
|
Full Usage:
this.IsPositive
Returns: bool
|
Returns
|
Full Usage:
this.IsSignedMax
Returns: bool
|
Returns
|
Full Usage:
this.IsSignedMin
Returns: bool
|
Returns
|
Full Usage:
this.IsTrue
Returns: bool
|
Returns
|
Full Usage:
this.IsUnsignedMax
Returns: bool
|
Returns
|
Full Usage:
this.IsZero
Returns: bool
|
Returns
|
|
Returns the bit length of the BitVector.
|
Full Usage:
this.ToBigInt
Returns: bigint
|
Returns the value of the BitVector as a
|
Full Usage:
this.ToInt32
Returns: int32
|
Returns the value of the given BitVector as an
|
Full Usage:
this.ToInt64
Returns: int64
|
Returns the value of the given BitVector as an
|
Full Usage:
this.ToUInt32
Returns: uint32
|
Returns the value of the given BitVector as a
|
Full Usage:
this.ToUInt64
Returns: uint64
|
Returns the value of the given BitVector as a
|
Full Usage:
this.ToValueString
Returns: string
|
Returns the string representation of the BitVector without the type suffix.
|
Static members
| Static member |
Description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns a BitVector representing a false (1-bit zero) value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns a BitVector representing the maximum unsigned 16-bit value.
|
|
Returns a BitVector representing the maximum unsigned 32-bit value.
|
|
Returns a BitVector representing the maximum unsigned 64-bit value.
|
|
Returns a BitVector representing the maximum unsigned 8-bit value (255).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
BitVector.SignedMax(rt)
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns a BitVector representing the maximum signed integer of the given RegType.
|
Full Usage:
BitVector.SignedMin(rt)
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns a BitVector representing the minimum signed integer of the given RegType.
|
|
|
|
Returns a BitVector representing a true (1-bit one) value.
|
Full Usage:
BitVector.UnsignedMax(rt)
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns a BitVector representing the maximum unsigned integer of the given RegType.
|
|
|
|
|
Full Usage:
BitVector.Zero(t)
Parameters:
int<MeasureProduct<rt, MeasureOne>>
Returns: BitVector
|
Returns zero (0) of the given bit length.
|
B2R2