ABSTRACT

This chapter discusses the algorithms and functions used in performing fundamental arithmetic operations on packed Binary-Coded Decimals numbers. The Intel mathematical coprocessor and math units are indeed powerful calculating tools. These devices store and manipulate floating-point numbers according to the formats defined in the American National Standards Institute (ANSI)/Institute of Electrical and Electronics Engineers (IEEE) 754 standard. C and C++ use these standards in representing floating point numbers. The C/C++float type corresponds to ANSI/IEEE single format and the C/C++ double type to ANSI/IEEE double format. On March 12, 1987, the Standards Board of the Institute of Electrical and Electronic Engineers approved the IEEE Standard for Radix-Independent Floating-Point Arithmetic. This project was sponsored by the Technical Committee on Microprocessors and Microcomputers of the IEEE Computer Society. The document was approved by the ANSI on September 10, 1987. Computer algorithms for multi-digit arithmetic on binary coded decimal numbers are often derived from longhand methods.