powered by
Takes an integer and returns an unsigned vector bits representing the same value
convert_dec2bin(x,len=32)
Integer
Number of bits to represent integer with. Will crop most significant bits if insufficient length.
Vector of bits with MSB first
# NOT RUN { convert_dec2bin(10) convert_dec2bin(10,8) # }
Run the code above in your browser using DataLab