Bits
Join
join a list of digits into a number
Calling Sequence
Parameters
Description
Examples
Join(digits)
Join(digits, sbits)
digits
-
a list of base 2^sbits positive digits
sbits
positive integer number of bits to join on
The Join command joins the input list of integers, least significant first, into a number base 2^sbits (sbits defaults to 1), using only the first sbits bits of each digit.
The most common usage of this command would be for conversion of a list of bits to a number.
The reverse operation, converting the number to digits, is accomplished using the Split command.
Convert from binary
with⁡Bits:
Join⁡1,1,1,1,1,1,1,1
255
Higher bits are ignored
Join⁡3,3,3,3,3,3,3,3
Convert from base-4 - 2 bits
Join⁡3,3,3,3,3,3,3,3,2
65535
To number, then back to bits
Join⁡0,1,1,0,1,1,1,1,0,1,1,1,1,0,0,1,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,1,0,1
395718860534
Split⁡395718860534
0,1,1,0,1,1,1,1,0,1,1,1,1,0,0,1,0,1,1,1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,1,1,1,0,1
See Also
Split
Download Help Document