This function is intended primarily for internal use by the big* Boolean functions. Its job is to take an input in any base, in almost any class (numeric, character, etc) and generate the binary form of the same value.
buildBinaries(x, y= NULL,inBase, inTwosComp = FALSE, binSize = 32)
A vector of numeric ones and zeroes representing the binary form of x
A vector of numeric ones and zeroes representing the binary form of y. If the input is NULL, a single value of 0 is returned.
The values to be converted. Typically these are the x,y values provided to one of the Boolean functions in this package. If only x is input, y defaults to NULL
The base (2 thru 36) of the input values.
When the input inBase is 2, this specifies whether the input is positive unless a negative sign is present, or 2's complement format .
The minimum number of bits to use for the output binary data. If insufficient for the size of the input(s), this will be increased to the next 4*N size. When there are two inputs, both outputs are set to the same number of bits. ~
Author and Maintainer:Carl Witthoft carl@witthoft.com
buildBinaries(73,-73,inBase=10)
Run the code above in your browser using DataLab