Now I understand. You wanted to trim the "0" from the left side. There is an easy way to have an string with exact length of a binary. Try this: SIZE$=BIN$(VAL("&B"+SIZE$)) ? LEN(SIZE$) The code above is used to get the string without the 0 at the left side. The text &B at the begining of the argument is used to identify the string as a binary.