Q1
a (1)
16-bit 2’s Complement
1110 0111 1111 1010
Hexadecimal
0xE7FA
Decimal
The magnitude is 0001 1000 0000 0110
The decimal value is
a (2)
16-bit 2’s Complement
0000 1000 1111 1111
Hexadecimal
0x08FF
Decimal
b (1)
Decimal
-708
12-bit 2’s Complement
The magnitude is 0010 1100 0100
The 12-bit 2’s complement representation is 1101 0011 1100
12-bit 2’s Complement in Hexadecimal
0xD3C
b (2)
2611 cannot be represented in a 12-bit 2’s complement representation since it exceeds the range of , i.e. .
Q2
a (1)
The number will be stored as 1 1000 1001 111 1101 0000 1000 0000 0000
a (2)
The number will be stored as 0 0111 1100 100 1100 1100 1100 1100 1100
Appeal
For Q2a (2), I would argue that I have already wrote down why 0.2 cannot be exactly represented.
In my second step, I put a “bar” symbol on top of the repeating bits, as well as the “dots”, these are to represent that when converted to binary, 0.2 would result in digits that are repeating indefinitely, and that is why it cannot be represented exactly.
This result is derived from my calculations on paper, but since I thought it was trivial and believed the above notations could already convey my meanings, I did not include it in my typed submission (the same for other similar questions).
Thank you for your consideration.
b (1)
b (2)
Q3
a
The maximum value that can be represented by a IEEE754-like number system is in the form of 0 111...10 111...11.
The exponent is and the bias is , the maximum value that can be represented is as follows
Note that , so
The maximum value should be larger than or equal to 3422
The minimum number of bits needed for the exponent is 5, and the corresponding bias is . So the number system would have 1 sign bit, 5 exponent bits, 10 significand bits
b
The number will be stored as 0 1 1001 00 0010 1000
c
- which represents the special cases
- which represents infinity
The number will be stored as 1 1 1111 00 0000 0000
d
The smallest positive integer should be 1, we can represent that using
- which is the same as bias to make exponent 0
- such that it is an integer
e
- which is the largest exponent in the normalized range
- which is the largest significand