Octal to Binary (with code from Old Pedant)
Happy 2013 all-
I'm a hardware guy. I can plug an oscope in and show you code in the form of data pulses, I can trace it through comparators and registers through ALUs and shift registers, but I cannot tell you a thing about what it does.
The hardware I work on has a 24 bit data bus. It runs periodic checks on itself and reports back in octal. The octal words reported look like this: (they could be any octal value, as long as they are in a group of eight digits)
04572100 00356001 00012000 00000000 00000001 00000540 00230000 05460000
The first octal word would be the following in binary:
000 100 101 111 010 001 000 000
which is 24 bits wide. I have to start counting at zero and end at 23, so my second task is to find the ones and note their positions. In this case, bits 3, 6, 8, 9, 10, 11, 13 and 17 are "high" and I have to chase these guys as voltages through schematics because they are faulted, swap the faulty component and test again.
I decided to build a PDF form that could break the octal down to binary because I get PAGES of octal values and what follows is what was generously provided from O. P. :
If you know of a fix, please advise.
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.
|All times are GMT +1. The time now is 11:54 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.