powered by
toBinary(n, k = ceiling(logb(n+1,base=2)))
toBinary(63) toBinary(64) #sometimes we want to pad result with 'leading' 0's toBinary(63, k=20) toBinary(64, k=20)
Run the code above in your browser using DataLab