Learn R Programming

QuantumOps (version 3.0.1)

convert_dec2bin: convert_dec2bin

Description

Takes an integer and returns an unsigned vector bits representing the same value

Usage

convert_dec2bin(x,len=32)

Arguments

x

Integer

len

Number of bits to represent integer with. Will crop most significant bits if insufficient length.

Value

Vector of bits with MSB first

Examples

Run this code
# NOT RUN {
 convert_dec2bin(10)
 convert_dec2bin(10,8)
# }

Run the code above in your browser using DataLab