Cast your float to int64 and use
https://nim-lang.org/docs/strutils.html#toBin%2CBiggestInt%2CPositive