powered by
Provides a (reversed) binary representation of a decimal integer
AsBinary(x)
Decimal integer to be converted to binary bits
An array corresponding to binary digits 1, 2, 4, 8, 16, ...
'Leading zeros' are not included.
Provides an array corresponding to binary digits 1, 2, 4, 8, 16, ...
Binary number 0100 (= decimal 4) will be represented as 0 0 1.
# NOT RUN { AsBinary(4) # 0 0 1 AsBinary(10) # 0 1 0 1 # }
Run the code above in your browser using DataLab