Digital Signal Processing Reference
In-Depth Information
the MSB is 1. To perform multiplication, we use 2's complement to convert M 2 to its positive value,
010100011011, and note that the multiplication result is negative. We multiply two positive mantissas and
truncate the result to 12 bits to give
010100011111 010100011011 ¼ 001101010100
Now we need to add a negative sign to the multiplication result with the 2's complement operation. Taking the 2's
complement, we have
M ¼ 110010101100
Hence, the product is achieved by cascading the 4-bit exponent and 12-bit mantissa as
0011110010111100
Converting this number back to the decimal number, we verify the result to be
0:408203125 2 3 ¼3:265625:
Next, we examine overflow and underflow in the floating-point number system.
Overflow
During an operation, overflow will occur when a number is too large to be represented in the floating-
point number system. Adding two mantissa numbers may lead to a number larger than 1 or
less than 1; and multiplying two numbers causes the addition of their two exponents so that the sum
of the two exponents could overflow. Consider the following overflow cases.
Case 1. Add the following two floating-point numbers:
0111 011000000000 þ 011101000000000
Note that the two exponents are the same and they are the biggest positive number in 4-bit 2's
complement representation. We add two positive mantissa numbers as
0 : 11000000000
þ
0 : 10000000000
1 : 01000000000
The result for adding mantissa numbers is negative. Hence the overflow occurs.
Case 2: Multiply the following two numbers:
0111 011000000000 0111 01100000000
Adding the two positive exponents gives
0111 þ 0111 ¼ 1000 ð negative ;
the overflow occurs Þ
Multiplying the two mantissa numbers gives
0 : 11000000000 0 : 1100000000 ¼ 0 : 10010000000 ð OK! Þ
Search WWH ::




Custom Search