Decimal to binary coder/decoder
AssigneeInternational Business Machines Corporation
InventorMichael Frederic Cowlishaw
Life of this patent
Estimating the term…
Loading patent…
AssigneeInternational Business Machines Corporation
InventorMichael Frederic Cowlishaw
Estimating the term…
A system and method are provided for encoding from decimal to binary and back again. The coding is based on representing 3 decimal digits as 10 binary bits and is a development of the Chen-Ho algorithm. This provides a storage efficiency of >99%, yet still allows decimal arithmetic to be readily performed. The decimal input is typically first converted to binary coded decimal (4 bits per decimal digit), before compression to 10 bits. Adopting the encoding of the present invention, if the leading (most significant) decimal digit is zero, then the first three bits of the binary output are zero; and if the first two decimal digits are zero, then the first six bits of the binary output are zero. Accordingly, the same coding can be flexibly used to code 2 decimal digits to 7 binary bits, and 1 decimal digit to 4 binary bits. This makes it particularly suitable for standard computer architectures which are based on a power of two (16-bit, 32-bit, 64-bit, etc), and therefore not directly divisible by 7 or by 10.
A method of converting decimal digits into binary, said method comprising the steps of:
A system for converting decimal digits into binary, said system comprising:
A computer program product for coverting decimal digits into binary comprising program instructions encoded in machine readable form on a medium, said instructions when executed by a machine causing it to perform the steps of:
Dependencies are inferred from the claim text.