Join - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Bits

  

Join

  

join a list of digits into a number

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

Join(digits)

Join(digits, sbits)

Parameters

digits

-

a list of base 2^sbits positive digits

sbits

-

positive integer number of bits to join on

Description

• 

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.

Examples

Convert from binary

withBits:

Join1,1,1,1,1,1,1,1

255

(1)

Higher bits are ignored

Join3,3,3,3,3,3,3,3

255

(2)

Convert from base-4 - 2 bits

Join3,3,3,3,3,3,3,3,2

65535

(3)

To number, then back to bits

Join0,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

(4)

Split395718860534

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

(5)

See Also

Bits

Split