Binary to decimal 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 a decimal digit is binary bits and 1 decimal digit is 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 binary bits into decimal digits from which the binary bits were encoded for efficient storage, such that the decimal digits can be decoded and used comprising:
A system for converting binary bits into decimal digits comprising:
A computer program product for converting binary bits into decimal digits comprising program instructions when executed by a machine causing the machine to perform the steps of:
Dependencies are inferred from the claim text.