Description Usage Arguments Value Note Author(s) See Also Examples
j is a binary representation of a integer number. The add_1 function adds 1 to the binary number j. The input is j and the output is j+1 in binary representation.
1 | add_1(j)
|
j |
a binary representation |
j+1 is returned in binary form
This function requires the binary representation to be read in backwards!
E.g 1 in binary representation is 000001 2 in binary representation is 000010 3 in binary representation is 000011 4 in binary representation is 000100 5 in binary representation is 000101 6 in binary representation is 000110 However add_1(c(1,0,0,0,0,0)) = rev(000010)
Hannah Lennon
c(1, 0, 1, 0, 0, 0) is 5 backwards so the result is 6 = 000110 backwards
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.