BCD Encoding?

Alastair Dallas awd at dbase.A-T.COM
Sat Apr 14 03:53:08 AEST 1990


BCD numbers, in general, are "packed"--that is, two decimal digits are stored
in a byte.  A hex dump of the number 123 might look like:

		12 30      

(Note that a hex dump is as good as a decimal BCD dump.)
Other information stored with each number is the sign (+/-), the exponent
(so you know where the decimal point goes--some implementations are fixed
point, however, and don't need this) and the exponent and the sign of the
exponent.

Hope that helps--I'm just not at liberty to describe our .mem file format.
BCD numbers are not proprietary, but there are a lot of different formats
for BCD and I can't discuss specific nuances.

/alastair/

Disclaimer> No corporate, just programmer-a-programmer :-)



More information about the Comp.lang.c mailing list