You posted this in the wrong forum.
But in any case, I think you need to show how you attempted to integrate that basic code into your PDF page.
Where are you getting the octal string from? How do you want to display the binary string?
There aren't tons of Adobe LiveScript users around here, though. I know I've never used it. But the more info you can supply about how you tried to fit the basic code in place, the more likely somebody will be able to help you.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.