IntegerBitsΒΆ
random.spad line 109 [edit on github]
This package provides functions to lookup bits in integers.
- bitCoef: (Integer, NonNegativeInteger) -> Integer
bitCoef(n, m)
returns the coefficient of 2^m in two complement representation ofn
.
- bitTruth: (Integer, NonNegativeInteger) -> Boolean
bitTruth(n, m)
returnstrue
if coefficient of 2^m in two complement representation ofn
is 1.