🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #2329

Re: Fast conversions, another urban myth?

#2329
From: Peter da Silva
Date: Mon, 25 Sep 1989 12:12
28 lines
1681 bytes
In article <832@dms.UUCP>, albaugh@dms.UUCP (Mike Albaugh) writes:
about blowing off BCD operations and just converting BCD to binary when you
need to do math on it (well, he said "when read in and written out", but
that's a little more restrictive than we need):

> Realistic guesses are more like
> 10 additions to pay for conversion.

I'll buy that.

> When all those numbers like SSN and
> part-number that are not really arithmetic at all get averaged in,

Non-arithmetic values don't need to be converted. They can be stored as
binary or manipulated as BCD. About the most you need to do on them is
sort them, and it just so happens that BCD values can be profitably
sorted with binary operations.

> 	So, where did I go wrong, or should I say, where do I find
> that blazing Binary->BCD routine? :-)

Assuming that conversion always needs to be done. Now you just need that
ideal binary-value cache.
-- 
Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation.
Biz: peter@ficc.uu.net, +1 713 274 5180. Fun: peter@sugar.hackercorp.com. `-_-'
"That is not the Usenet tradition, but it's a solidly-entrenched            U
 delusion now." -- brian@ucsd.Edu (Brian Kantor)
Technical Details
Message-ID: <6285@ficc.uu.net>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!sun-barr!texsun!texbell!nuchat!sugar!ficc!peter
References: <832@dms.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!sun-barr!texsun!texbell!nuchat!sugar!ficc!peter
From: peter@ficc.uu.net (Peter da Silva)
Newsgroups: comp.arch,comp.lang.misc
Subject: Re: Fast conversions, another urban myth?
Keywords: BCD, radix-conversion, COBOL
Message-ID: <6285@ficc.uu.net>
Date: 25 Sep 89 12:12:54 GMT
References: <832@dms.UUCP>
Organization: Xenix Support, FICC
Lines: 28