Description Usage Arguments Details Author(s) References Examples
Utilities to convert things to binary
1 2 3 4 
n 
Integer, to be converted to binary by function 
len 
Length of the binary vector returned by function

bin 
Binary: a vector of 
comp 
A composition 
check 
Boolean, with default 
use.C 
Boolean, with default 
These functions are not really intended for the end user; they are
used in nextcomposition()
.
Function tobin()
converts integer n
to a binary
string of length len
Function todec()
converts a binary string to decimal,
so todec(tobin(n,i))==n
, provided i
is big enough
Function comptobin()
converts a composition to binary
Function bintocomp()
converts a binary string to a
composition
Robin K. S. Hankin
Wikipedia 2008. “Composition (number theory) — Wikipedia, The Free Encyclopedia”, http://en.wikipedia.org/w/index.php?title=Composition_(number_theory)&oldid=243080178; Online; accessed 3February2009
1 2 3 4 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.