Everything stored on a computer can be represented as a string of bits. However,
ID: 3640347 • Letter: E
Question
Everything stored on a computer can be represented as a string of bits. However, different types of data (for example, characters and numbers) may be represented by the same string of bits. For this question, we assume that text characters (or symbols) are stored in 8 bit ASCII code and that numbers are stored in 12 bits. We also assume that when the number is stored as a floating point (real) number, 6 of these bits are reserved for the mantissa (or significand) with 2k-1-1 as the exponent bias (where k is the number of bits for the characteristic).
For example, the string of bits 001101100011100100110101 might represent the three characters in 695 or two numbers, which will be different depending on whether the numbers are stored as integers (867 and -1739 here) or as floating point numbers (0.13671875 and -0.00040435791015625 here). More precisely, any real number between 0.13671875 and 0.140625 will have the same floating point representation in this, not very accurate, scheme. Similarly, any real number between -0.00040435791015625 and -0.0004119873046875 will also have the same computer representation.
In storing the floating point number -1231 the mantissa has been truncated hence the number is not exactly -1231. what is the actual number stored?
Please show full working
Explanation / Answer
please rate - thanks
s eeeee mmmmmm
-1231 is negative, so the sign bit is 1
again 1231 in binary is 010011001111
change this to scientific notation and you get 1.0011001111 x 2^10
so the exponent is 10, and the mantissa is 0011001111 the 1. is dropped since it is always 1.
also we will only use the 6 most significant bits
so the mantissa is 001100
so we have in actuality 1.001100 x2^10 which is
10011000000
convert this to decimal (I assume you know how to do this), and
the answer is -1216 is what is actually stored
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.