Question

In: Computer Science

Represent the decimal number +105.25 as a sign (S), mantissa (M), and exponent (E)

Represent the decimal number +105.25 as a sign (S), mantissa (M), and exponent (E)

Solutions

Expert Solution

Single precision (Sign(s),Mantissa(M),and Exponent(E)):

  • Sign of Mantissa (S)( 0 represents positive 1 represents negative) (1bit)
  • Exponent(E) (127 actual for Single precision) (8 bits)
  • Mantissa(M) (23 bits)

Step 1: Write binary of a decimal mumber

(105.25)10 =(1101001.01)2

Step 2: Write binary number in a power of 2

1.10100101 * 26 (26 because we shift decimal by 6)

(10100101) is calles a normalised mantisa

Sign bit is 0 because number is positive.

Step 3: add 6(power of 2) in actual exponent (127)

127+6=133

Step 4: Conver 133 into binary

(133)10 =(10000101)2

Step 5 : make 23 bit Normalized mantisa by adding extra 0's

  10100101000000000000000

Step 6 : Write Sign, Exponent and mantisa in their format, Format is:

Sign(1bit) Exponent(8bits) Mantisa(23 bits)

(0  10000101   10100101000000000000000)

So,

(+105.25) as a sign (S), mantissa (M), and exponent (E) is (0  10000101   10100101000000000000000)

0  10000101   10100101000000000000000(Answer)


Related Solutions

Recall that a float is stored in the following format: ±sign 1.mantissa • 2^exponent?127 where sign...
Recall that a float is stored in the following format: ±sign 1.mantissa • 2^exponent?127 where sign is 1 bit, exponent is 8 bits, and mantissa is 23 bits. Write a C function that accepts an int parameter and returns a float represented by the bits in the int. The 32-bit integer is organized as 1-bit sign, 8-bit exponent, 23-bit mantissa. For example, 0x3F800000 represents 1.0 because the sign bit is 0, the exponent is 127, and the mantissa is all...
Explain the use of the mantissa and exponent for its representation on a computer. Why is...
Explain the use of the mantissa and exponent for its representation on a computer. Why is it necessary? Explain the terms “normalization”, “hidden bit” and “bias” in the context of floating point number representation.
Decimal value data types such as float and double represent the decimal number as an approximation....
Decimal value data types such as float and double represent the decimal number as an approximation. In other words, float or double arithmetic do not give exact answer but near approximation to the answer. As an example, run the following program and check its result: #include <iostream> using namespace std; int main() { float x= 0.1 * 7; if (x == 0.7) cout<< "TRUE. \n"; else cout<< "FALSE. \n"; return 0; } In some situations, we need our programs to...
Decimal value data types such as float and double represent the decimal number as an approximation....
Decimal value data types such as float and double represent the decimal number as an approximation. In other words, float or double arithmetic do not give exact answer but near approximation to the answer. As an example, run the following program and check its result: #include <iostream> using namespace std; int main() { float x= 0.1 * 7; if (x == 0.7) cout<< "TRUE. \n"; else cout<< "FALSE. \n"; return 0; } In some situations, we need our programs to...
Convert 0.875 to an IEEE 754 single-precision floating-point number. Show the sign bit, the exponent, and...
Convert 0.875 to an IEEE 754 single-precision floating-point number. Show the sign bit, the exponent, and the fraction. Convert -3.875 to an IEEE 754 double-precision floating-point number. Show the sign bit, the exponent, and the fraction Convert the IEEE 754 single-precision floating-point numbers 42E4800016 and 0080000016 to their corresponding decimal numbers.
Represent the decimal number -6 in binary using 4-bits: 3a) signed magnitude ____________________________ 3b) 1’s complement...
Represent the decimal number -6 in binary using 4-bits: 3a) signed magnitude ____________________________ 3b) 1’s complement _____________________________ 3c) 2’s complement _____________________________
if hexadecimal number FF16 represent a signed number in one's compliments, what the decimal representation of...
if hexadecimal number FF16 represent a signed number in one's compliments, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of...
if hexadecimal number FA16 represent a signed number in signed magnitude, what the decimal representation of that number? include the sign for that number with no spaces between the number and sign. for example -3 or +3
a. Encoding the decimal number 2.25 into an 8-bit binary. Suppose k=4 exponent bits, n=3 fraction...
a. Encoding the decimal number 2.25 into an 8-bit binary. Suppose k=4 exponent bits, n=3 fraction bits, and the bias is 7. What’s the corresponding binary representation for 2.25? Show your work. b. What’s the value in decimal if this is an 8-bit floating point number? Suppose k=4 exponent bits, n=3 fraction bits, and the bias is 7 of 10111001
a)The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B is ______________. b)The decimal...
a)The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B is ______________. b)The decimal equivalent of the unsigned 8-bit hex number 0B4H is ______________. c)The value of the expression ‘H’ – ‘B’ is less than / equal to / greater than that of the expression ‘L’ – ‘C’. d)If the .data segment contains declarations                         A    BYTE      2 DUP (‘a’), ‘+’ B    BYTE      3 DUP (‘b’), 0 C    BYTE      4 DUP (‘c’), ‘–’ D    BYTE     ...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT