| 243 | | * **need conversions between bit vectors and integers** |
| | 243 | * `bit_shiftl(a,n)` : left shift of a bit vector |
| | 244 | * `a` is a bit vector, i.e., array of boolean |
| | 245 | * `n` has integral type and is nonnegative |
| | 246 | * exception if `n` is greater than the length of `a` |
| | 247 | * new spaces created are filled in with `false` |
| | 248 | * `bit_shiftr(a,n)` : right shift of a bit vector |
| | 249 | * `int_to_bitv(len, val)` : returns a bit-vector (array of boolean) of length `len` from `val` |
| | 250 | * `val` must be a non-negative integer value from an integral type |
| | 251 | * `len` must be large enough to contain the base-2 expansion of `val` |
| | 252 | * `bitv_to_int(a,t)` : converts a bit vector to an integer |
| | 253 | * `a` is a bit vector, i.e., an array of boolean |
| | 254 | * `t` has type `Dytype` and evaluates to an integral type large enough to hold the result of converting `a` to a non-negative integer |