convert 20.085 to IEEE-754 single precision and double precision
both.
Need a lot of explanation. (Atleast 1000 words)
1)
20.085
Converting 20.085 to binary
Convert decimal part first, then the fractional
part
> First convert 20 to binary
Divide 20 successively by 2 until the quotient is
0
> 20/2 = 10, remainder is
0
> 10/2 = 5, remainder is 0
> 5/2 = 2, remainder is 1
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10100
So, 20 of decimal is 10100 in binary
> Now, Convert 0.08500000 to binary
> Multiply 0.08500000 with 2.
Since 0.17000000 is < 1. then add 0 to result
> Multiply 0.17000000 with 2.
Since 0.34000000 is < 1. then add 0 to result
> Multiply 0.34000000 with 2.
Since 0.68000000 is < 1. then add 0 to result
> Multiply 0.68000000 with 2.
Since 1.36000000 is >= 1. then add 1 to
result
> Multiply 0.36000000 with 2.
Since 0.72000000 is < 1. then add 0 to result
> Multiply 0.72000000 with 2.
Since 1.44000000 is >= 1. then add 1 to
result
> Multiply 0.44000000 with 2.
Since 0.88000000 is < 1. then add 0 to result
> Multiply 0.88000000 with 2.
Since 1.76000000 is >= 1. then add 1 to
result
> Multiply 0.76000000 with 2.
Since 1.52000000 is >= 1. then add 1 to
result
> Multiply 0.52000000 with 2.
Since 1.04000000 is >= 1. then add 1 to
result
> Multiply 0.04000000 with 2.
Since 0.08000000 is < 1. then add 0 to result
> Multiply 0.08000000 with 2.
Since 0.16000000 is < 1. then add 0 to result
> Multiply 0.16000000 with 2.
Since 0.32000000 is < 1. then add 0 to result
> Multiply 0.32000000 with 2.
Since 0.64000000 is < 1. then add 0 to result
> Multiply 0.64000000 with 2.
Since 1.28000000 is >= 1. then add 1 to
result
> Multiply 0.28000000 with 2.
Since 0.56000000 is < 1. then add 0 to result
> Multiply 0.56000000 with 2.
Since 1.12000000 is >= 1. then add 1 to
result
> Multiply 0.12000000 with 2.
Since 0.24000000 is < 1. then add 0 to result
> Multiply 0.24000000 with 2.
Since 0.48000000 is < 1. then add 0 to result
> Multiply 0.48000000 with 2.
Since 0.96000000 is < 1. then add 0 to result
> Multiply 0.96000000 with 2.
Since 1.92000000 is >= 1. then add 1 to
result
> Multiply 0.92000000 with 2.
Since 1.84000000 is >= 1. then add 1 to
result
> Multiply 0.84000000 with 2.
Since 1.68000001 is >= 1. then add 1 to
result
> Multiply 0.68000001 with 2.
Since 1.36000001 is >= 1. then add 1 to
result
> Multiply 0.36000001 with 2.
Since 0.72000003 is < 1. then add 0 to result
> Multiply 0.72000003 with 2.
Since 1.44000006 is >= 1. then add 1 to
result
> Multiply 0.44000006 with 2.
Since 0.88000011 is < 1. then add 0 to result
> Multiply 0.88000011 with 2.
Since 1.76000023 is >= 1. then add 1 to
result
> Multiply 0.76000023 with 2.
Since 1.52000046 is >= 1. then add 1 to
result
> Multiply 0.52000046 with 2.
Since 1.04000092 is >= 1. then add 1 to
result
> Multiply 0.04000092 with 2.
Since 0.08000183 is < 1. then add 0 to result
> Multiply 0.08000183 with 2.
Since 0.16000366 is < 1. then add 0 to result
> Multiply 0.16000366 with 2.
Since 0.32000732 is < 1. then add 0 to result
> Multiply 0.32000732 with 2.
Since 0.64001465 is < 1. then add 0 to result
> Multiply 0.64001465 with 2.
Since 1.28002930 is >= 1. then add 1 to
result
> Multiply 0.28002930 with 2.
Since 0.56005859 is < 1. then add 0 to result
> Multiply 0.56005859 with 2.
Since 1.12011719 is >= 1. then add 1 to
result
> Multiply 0.12011719 with 2.
Since 0.24023438 is < 1. then add 0 to result
> Multiply 0.24023438 with 2.
Since 0.48046875 is < 1. then add 0 to result
> Multiply 0.48046875 with 2.
Since 0.96093750 is < 1. then add 0 to result
> Multiply 0.96093750 with 2.
Since 1.92187500 is >= 1. then add 1 to
result
> Multiply 0.92187500 with 2.
Since 1.84375000 is >= 1. then add 1 to
result
> Multiply 0.84375000 with 2.
Since 1.68750000 is >= 1. then add 1 to
result
> Multiply 0.68750000 with 2.
Since 1.37500000 is >= 1. then add 1 to
result
> Multiply 0.37500000 with 2.
Since 0.75000000 is < 1. then add 0 to result
> Multiply 0.75000000 with 2.
Since 1.50000000 is >= 1. then add 1 to
result
> Multiply 0.50000000 with 2.
Since 1.00000000 is >= 1. then add 1 to
result
> This is equal to 1, so, stop
calculating
0.08500000000000085 of decimal is
.00010101110000101000111101011100001010001111011 in binary
so, 20.085 in binary is
10100.00010101110000101000111101011100001010001111011
20.085 in simple binary =>
10100.00010101110000101000111101011100001010001111011
so, 20.085 in normal binary is
10100.00010101110000101000111101011100001010001111011 =>
1.010000010101110000101 * 2^4
single precision:
--------------------
sign bit is 0(+ve)
exponent bits are (127+4=131) => 10000011
Divide 131 successively by 2 until the quotient is
0
> 131/2 = 65, remainder is
1
> 65/2 = 32, remainder is
1
> 32/2 = 16, remainder is
0
> 16/2 = 8, remainder is 0
> 8/2 = 4, remainder is 0
> 4/2 = 2, remainder is 0
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as
10000011
So, 131 of decimal is 10000011 in binary
frac/significant bits are 01000001010111000010100
so, 20.085 in single-precision format is 0 10000011
01000001010111000010100
Hexadecimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Use this table to convert from binary to hexadecimal
Converting 01000001101000001010111000010100 to hexadecimal
0100 => 4
0001 => 1
1010 => A
0000 => 0
1010 => A
1110 => E
0001 => 1
0100 => 4
So, in hexadecimal 01000001101000001010111000010100 is
0x41A0AE14
in hexadecimal it is 0x41A0AE14
2)
20.085
Converting 20.085 to binary
Convert decimal part first, then the fractional
part
> First convert 20 to binary
Divide 20 successively by 2 until the quotient is
0
> 20/2 = 10, remainder is
0
> 10/2 = 5, remainder is 0
> 5/2 = 2, remainder is 1
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as 10100
So, 20 of decimal is 10100 in binary
> Now, Convert 0.08500000 to binary
> Multiply 0.08500000 with 2.
Since 0.17000000 is < 1. then add 0 to result
> Multiply 0.17000000 with 2.
Since 0.34000000 is < 1. then add 0 to result
> Multiply 0.34000000 with 2.
Since 0.68000000 is < 1. then add 0 to result
> Multiply 0.68000000 with 2.
Since 1.36000000 is >= 1. then add 1 to
result
> Multiply 0.36000000 with 2.
Since 0.72000000 is < 1. then add 0 to result
> Multiply 0.72000000 with 2.
Since 1.44000000 is >= 1. then add 1 to
result
> Multiply 0.44000000 with 2.
Since 0.88000000 is < 1. then add 0 to result
> Multiply 0.88000000 with 2.
Since 1.76000000 is >= 1. then add 1 to
result
> Multiply 0.76000000 with 2.
Since 1.52000000 is >= 1. then add 1 to
result
> Multiply 0.52000000 with 2.
Since 1.04000000 is >= 1. then add 1 to
result
> Multiply 0.04000000 with 2.
Since 0.08000000 is < 1. then add 0 to result
> Multiply 0.08000000 with 2.
Since 0.16000000 is < 1. then add 0 to result
> Multiply 0.16000000 with 2.
Since 0.32000000 is < 1. then add 0 to result
> Multiply 0.32000000 with 2.
Since 0.64000000 is < 1. then add 0 to result
> Multiply 0.64000000 with 2.
Since 1.28000000 is >= 1. then add 1 to
result
> Multiply 0.28000000 with 2.
Since 0.56000000 is < 1. then add 0 to result
> Multiply 0.56000000 with 2.
Since 1.12000000 is >= 1. then add 1 to
result
> Multiply 0.12000000 with 2.
Since 0.24000000 is < 1. then add 0 to result
> Multiply 0.24000000 with 2.
Since 0.48000000 is < 1. then add 0 to result
> Multiply 0.48000000 with 2.
Since 0.96000000 is < 1. then add 0 to result
> Multiply 0.96000000 with 2.
Since 1.92000000 is >= 1. then add 1 to
result
> Multiply 0.92000000 with 2.
Since 1.84000000 is >= 1. then add 1 to
result
> Multiply 0.84000000 with 2.
Since 1.68000001 is >= 1. then add 1 to
result
> Multiply 0.68000001 with 2.
Since 1.36000001 is >= 1. then add 1 to
result
> Multiply 0.36000001 with 2.
Since 0.72000003 is < 1. then add 0 to result
> Multiply 0.72000003 with 2.
Since 1.44000006 is >= 1. then add 1 to
result
> Multiply 0.44000006 with 2.
Since 0.88000011 is < 1. then add 0 to result
> Multiply 0.88000011 with 2.
Since 1.76000023 is >= 1. then add 1 to
result
> Multiply 0.76000023 with 2.
Since 1.52000046 is >= 1. then add 1 to
result
> Multiply 0.52000046 with 2.
Since 1.04000092 is >= 1. then add 1 to
result
> Multiply 0.04000092 with 2.
Since 0.08000183 is < 1. then add 0 to result
> Multiply 0.08000183 with 2.
Since 0.16000366 is < 1. then add 0 to result
> Multiply 0.16000366 with 2.
Since 0.32000732 is < 1. then add 0 to result
> Multiply 0.32000732 with 2.
Since 0.64001465 is < 1. then add 0 to result
> Multiply 0.64001465 with 2.
Since 1.28002930 is >= 1. then add 1 to
result
> Multiply 0.28002930 with 2.
Since 0.56005859 is < 1. then add 0 to result
> Multiply 0.56005859 with 2.
Since 1.12011719 is >= 1. then add 1 to
result
> Multiply 0.12011719 with 2.
Since 0.24023438 is < 1. then add 0 to result
> Multiply 0.24023438 with 2.
Since 0.48046875 is < 1. then add 0 to result
> Multiply 0.48046875 with 2.
Since 0.96093750 is < 1. then add 0 to result
> Multiply 0.96093750 with 2.
Since 1.92187500 is >= 1. then add 1 to
result
> Multiply 0.92187500 with 2.
Since 1.84375000 is >= 1. then add 1 to
result
> Multiply 0.84375000 with 2.
Since 1.68750000 is >= 1. then add 1 to
result
> Multiply 0.68750000 with 2.
Since 1.37500000 is >= 1. then add 1 to
result
> Multiply 0.37500000 with 2.
Since 0.75000000 is < 1. then add 0 to result
> Multiply 0.75000000 with 2.
Since 1.50000000 is >= 1. then add 1 to
result
> Multiply 0.50000000 with 2.
Since 1.00000000 is >= 1. then add 1 to
result
> This is equal to 1, so, stop
calculating
0.08500000000000085 of decimal is
.00010101110000101000111101011100001010001111011 in binary
so, 20.085 in binary is
10100.00010101110000101000111101011100001010001111011
20.085 in simple binary =>
10100.00010101110000101000111101011100001010001111011
so, 20.085 in normal binary is
10100.00010101110000101000111101011100001010001111011 =>
1.010000010101110000101000111101011100001010001111011 *
2^4
64-bit format:
--------------------
sign bit is 0(+ve)
exponent bits are (1023+4=1027) => 10000000011
Divide 1027 successively by 2 until the quotient is
0
> 1027/2 = 513, remainder is
1
> 513/2 = 256, remainder is
1
> 256/2 = 128, remainder is
0
> 128/2 = 64, remainder is
0
> 64/2 = 32, remainder is
0
> 32/2 = 16, remainder is
0
> 16/2 = 8, remainder is 0
> 8/2 = 4, remainder is 0
> 4/2 = 2, remainder is 0
> 2/2 = 1, remainder is 0
> 1/2 = 0, remainder is 1
Read remainders from the bottom to top as
10000000011
So, 1027 of decimal is 10000000011 in binary
frac/significant bits are
0100000101011100001010001111010111000010100011110110
so, 20.085 in 64-bit format is 0 10000000011
0100000101011100001010001111010111000010100011110110
Hexadecimal Binary
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
A 1010
B 1011
C 1100
D 1101
E 1110
F 1111
Use this table to convert from binary to hexadecimal
Converting
0100000000110100000101011100001010001111010111000010100011110110 to
hexadecimal
0100 => 4
0000 => 0
0011 => 3
0100 => 4
0001 => 1
0101 => 5
1100 => C
0010 => 2
1000 => 8
1111 => F
0101 => 5
1100 => C
0010 => 2
1000 => 8
1111 => F
0110 => 6
So, in hexadecimal
0100000000110100000101011100001010001111010111000010100011110110 is
0x403415C28F5C28F6
in hexadecimal it is 0x403415C28F5C28F6
convert 20.085 to IEEE-754 single precision and double precision both. Need a lot of explanation. (Atleast...
convert -881/13 to IEEE-754 single precision and double precision both. Need a lot of explanation. (Atleast 1000 words)
convert 22/7 to IEEE-754 single precision and double precision both. Need a lot of explanation. (Atleast 1000 words)
Convert the following decimal numbers to IEEE 754 single-precision format: 256 -2217.5
Convert the decimal 0.2 to hexadecimal representation using IEEE 754 single precision format
convert -297.875 to single precision and double precision. Please show all the steps(atleast 500 words)
The value shown below is represented using the IEEE 754 single precision format. Convert to a signed decimal number. 11101010111010000000000000000000
Convert each of the following 32 IEEE 754 single precision bit patterns to its corresponding decimal value (the bits are separated into groups of 4 to make interpretation easier). Show all of your work and include a few comments as to what you are doing at each step. 1100 0100 1011 1010 0100 1000 0000 0000 a. b. 0100 0101 1110 0010 0110 1101 0000 0000 Convert each of the following 32 IEEE 754 single precision bit patterns to its...
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...
Please convert -3.825 to a Hexadecimal using IEEE-754 single precision format. Please show all the steps in text format or don't answer it.
Convert decimal number 289.5625, to IEEE 754 single precision floating point. Please show all steps and explain what to do in each step.