Try this:

---
/d2b {
%d2b = $strip($1-)
unset %bin
while ( %d2b ) {
if $asc(%d2b) = 32 { set %bin $+(%bin,$chr(160)) }
else { set %bin $+(%bin,$base($asc(%d2b),10,2,8)) }
%d2b = $mid(%d2b,2)
}
return %bin
}
---
//echo binary: $d2b(Hello with spaces)

will produce:
binary: 0100100001100101011011000110110001101111 01110111011010010111010001101000 011100110111000001100001011000110110010101110011

If you don't want spaces, then remove that line that checks for ascii value 32, or change the 160 at the end to 32.
Easy to make it the way you want.
smile
Have fun