| num2Bits {BiCausality} | R Documentation |
num2Bits function
Description
Given a natural number and number of bits, the function provides an n-dimensional vector of bits that represents num.
The ith bits of binary vector represents the ith bit of num.
For example, if vec<-num2Bits(num=2,n=4), the first bit vec[1] is 0 and the second bit vec[2] is 1.
Usage
num2Bits(num, n = 32)
Arguments
num |
is a natural number. |
n |
is a number of bits representing |
Value
This function returns an n-dimensional vector of bits that represents num.
Examples
num2Bits(num=10,n=4)
[Package BiCausality version 0.1.4 Index]