7. Perform the sum of the following two decimal numbers: [10
Marks]
a. -1203.232 and -253.1398
b. -2037.4235 and 653.25
All the operation should be performed in IEEE 754 single
precision.
Solution:
Given,
=>All the operations should be performed in IEEE 754 single precision.
(a)
Given,
=>First number = -1203.232
=>Second number = -253.1398
Explanation:
Single precision frame format:
Sign(S) | Exponent(E) | Mantissa(M) |
1 bit 8 bits 23 bits
=>Normalized form = (-1)^S*(1.M)*2^(E-127)
Converting given decimal numbers to binary:
=>First number = -1203.232 in decimal
=>First number in binary = -10010110011.0011101101100100011
=>First number in normalized form = -1.00101100110011101101100*2^10
=>Second number = -253.1398 in decimal
=>Second number in bianry = -11111101.00100011110010011111
=>Second number in normalized form = -1.11111010010001111001001*2^7
Now performing addition:
=>First number in normalized form = -1.00101100110011101101100*2^10
=>Second number in normalized form = -1.11111010010001111001001*2^7
Step 1:
=>Rewrite the smaller larger such that exponent of smaller number matches with higher number
=>Second number in normalized form = -1.11111010010001111001001*2^7
=>Second number in normalized form = -0.00111111010010001111001*2^10
Step 2:
=>Add mantissa part of both the numbers
=>-1.11111010010001111001001*2^10 -0.00111111010010001111001*2^10 = -10.0011100110010000100001*2^10
Step 3:
=>Now normalizing the sum
=>-10.0011100110010000100001*2^10 = -1.00011100110010000100001*2^11
Step 4:
=>Checking overflow
=>As -126 < 11 < 127 so there is no overflow
Step 5:
=>Now converting into decimal
=>-1.00011100110010000100001*2^11 = -100011100110.010000100001
=>-100011100110.010000100001 = 2278.258056640625
=>Hence sum of -1203.232 and -253.1398 = -2278.258056640625
(b)
Given,
=>First number = -2037.4235
=>Second number = 653.25
Explanation:
=>First number = -2037.4235 in decimal
=>First number in binary = -11111110101.01101100011010101
=>First number in nomarlized form = -1.11111101010110110001101*2^10
=>Second number = 653.25 in decimal
=>Second number in binary = 1010001101.01
=>Second number in normalized form = 1.01000110101000000000000*2^9
Now performing additon:
=>First number in nomarlized form = -1.11111101010110110001101*2^10
=>Second number in normalized form = 1.01000110101000000000000*2^9
Step 1:
=>Make the exponent part of smaller number same as higher number's exponent.
=>Second number in normalized form = 1.01000110101000000000000*2^9
=>Second number = 0.10100011010100000000000*2^10
Step 2:
=>Now adding mantissa part.
=>-1.11111101010110110001101*2^10 + 0.10100011010100000000000*2^10 = -1.01011010000010110001101*2^10
Step 3:
=>Checking overflow
=>-126 < 10 < 127 hence no overflow
Step 4:
=>Normalize the summation. As summation is already normalized so no need to do that.
Step 5:
=>Convert into decimal
=>-1.01011010000010110001101*2^10 = -10101101000.0010110001101
=>10101101000.0010110001101 = -1384.1734619140625
I have explained each and every part with the help of statements attached to it.
7. Perform the sum of the following two decimal numbers: [10 Marks] a. -1203.232 and -253.1398...
1. (a) Convert the following decimal numbers into their EEE-754 single-precision (32-bit) representations. Give your answers in hexadecimal form. (12 marks) (1)-3.3125 () (11) 522240 6) Convert the following IEEE 754 single-precision numbers in hexadecimal into their decimal values accurate to 5 significant figures. (8 marks) (1) 0x800E0000 (1) Ox9FACE600
Convert the following decimal numbers to IEEE 754 single-precision format: 256 -2217.5
Please show steps EXERCICE4 The following real numbers are given in single precision (ieee-754 floating point) format. Negate each of them. Single Precision FP Inverse (negated) value in single precision FP Ox3FCO0000 OxAFC00000 0x43806000 0xC3906000 0x41200000 0xF1200000 0x3F7F0000 EXERCICE 5 Express the following real numbers (single precision ieee-754 floating point) in decimal notation Single Precision FP Value in base 10 0x3FC00000 0xBFC00000 0x43806000 0xC3806000 0x41200000 0xC1200000 0x3F7F0000
Given A = (1111 0011 1100 0011 1100 0000 0000 0000)2 and assuming A is a single precision IEEE-754 floating point number, what decimal value does A represent? Show A in normalized scientific notation: 1.X * 2Y. Convert (28.4)10 to IEEE-754 single-precision binary. Given X = (0100 0010 0000 1111 0000 0000 0000 0000)2 and Y = (0100 0001 1010 0100 0000 0000 0000 0000)2 in single precision IEEE-754 floating point numbers, perform the following operations. Show all of your...
Write a program in C++ that converts decimal numbers to IEEE Standard 754 Floating Point Single Precision. Please include code that converts to single precision and double precision as a second option.
1 please IEEE-754 Floating point conversions problems (assume 32 bit machine): 1. For IEEE 754 single-precision floating point, write the hexadecimal representation for the following decimal values: a. 27.1015625 b.-1 2. For IEEE 754 single-precision floating point, what is the decimal number, whose hexadecimal representation is the following? a. 4280 0000 b. 7FE4 0000 c. 0061 0000 3. For IEEE-754 single-precision floating point practice the following problem: Suppose X and Y are representing single precision numbers as follows: X 0100...
(2 pts) Express the base 10 numbers 16.75 in IEEE 754 single-precision floating point format. Express your answer in hexadecimal. Hint: IEEE 754 single-precision floating-point format consists of one sign bit 8 biased exponent bits, and 23 fraction bits) Note:You should show all the steps to receive full credits) 6.7510 Type here to search
please make sure the answer is clear. 3. Given X (0100 0010 0000 1111 0000 0000 0000 0000)2 and Y (0100 0001 1010 0100 0000 0000 0000 0000)2 in single precision IEEE-754 floating point numbers, perform the following operations. Show all of your work and express the final answer in single precision IEEE 754-floating point representation. 1. X+Y 2. X*Y Hint: show each value in binary normalized scientific notation prior to performing the arithmetic. This should make following the algorithms...
computer architecture The sum of the two 32 bit integers may not be representable in 32 bits. In this case, we say that an overflow has occurred. Write MIPS instructions that adds two numbers stored in registers Ss1 and Ss2, stores the sum in register $s3, and sets register Sto to 1 if an overflow occurs and to 0 otherwise. 5. (16pts) 6. Show the IEEE 754 binary representation of the number -7.425 in a single and double 7. If...
1. Convert the following decimal numbers in IEEE single-precision format. Give the result as eight hexadecimal digits. a) -69/32 (-69 divide by 32) b) 13.625 2. Convert the following floating IEEE single-precision floating-point numbers from hex to decimal: a) 42E48000 b) C6F00040