Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.help Subject: Re: Help with BCD conversion Date: Sat, 18 Feb 2012 08:24:26 -0800 Organization: A noiseless patient Spider Lines: 23 Message-ID: References: <92b642e7-0aa8-4e1a-9e4e-9418bfcc8123@k40g2000yqf.googlegroups.com> <8motj7ljbcapmd0i3kho2g7een4egail5m@4ax.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 18 Feb 2012 16:24:27 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="23381"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+nMuo1GQg5f3DlujxRQXE5P6Pf9v9nme4=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Cancel-Lock: sha1:UGB03VBASgXGU7MbfgSMrXU5qBo= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.help:1580 On 2/17/2012 3:47 PM, HarishD wrote: > I am converting number strings to IBM 360-style BCD as you stated but > without the sign encoded. The behavior of the > two test strings is different. I am unable to figure out why. You might want to explain what IBM 360 style BCD is, for those of us who aren't intimately familiar with it. Where do you expect the the least significant digit and the most significant digit to appear? What does the final array format look like? (I'm pretty sure the original IBM BCD didn't use Java arrays). Explain where the digits go in an array for each of the following test cases: 1 12 123 1234 Where is the length of the BCD indicated?