324_Book

# 50 category 1 consider a 16 bit oating point

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: most common ﬂoating point representation was deﬁned by IEEE Standard 754. It provides for several different precisions, with the most common being single (32 bits) and double (64 bits). IEEE ﬂoating point also has representations for special values ½ and not-a-number. Floating point arithmetic must be used very carefully, since it has only limited range and precision, and since it does not obey common mathematical properties such as associativity. We have seen several clever ways to exploit combinations bit-level operations and arithmetic operations. For example, we saw that with two’s complement arithmetic, ˜x+1 is equivalent to -x. As another example, suppose we want a bit pattern of the form ¼ ¼½ ½ , consisting of Û 0s followed by 1s. Such bit patterns are useful for masking operations. This pattern can be generated by the C expression (1<<k)1, exploiting the property that the desired bit pattern has numeric value ¾ ½. For example, the expression (1<<8)-1 will generate the bit pattern 0xF...
View Full Document

## This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online