Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
CSSE2010-7201
Question 1. (11 marks)
(a) Consider the decimal number 173. Write down the octal representation of this number.
(1 mark)
255 or 0255 or 2558
(b) Consider the 8-bit binary number 10110110. Write down the decimal value of this
number if the number is considered to have each of the following representations.
(1 mark each)
i) 8-bit two’s complement
– 74
ii) 8-bit unsigned
182
iii) 8-bit ones’ complement
– 73
iv) 8-bit excess-127
55
(c) Write down (in hexadecimal) both the IEEE single-precision and double-precision
floating-point representations of 65.375. Show your working. (4 marks)
65.375 is positive so the sign bit is 0
65.375 = 64+1+0.25+0.125
In binary this is 1000001.011 which can be rewritten as 1.000001011 x 26
The exponent is 6, which in 8-bit excess-127 representation is 10000101 (133).
The mantissa (after the binary point) is 000001011
The single precision IEEE floating point binary representation is therefore
0 10000101 00000101100000000000000 (23 bits in mantissa)
when grouped in 4-bit groups, this is
0100 0010 1000 0010 1100 0000 0000 0000
In hexadecimal this is 4282C000
For the double precision representation, the exponent (6) in excess-1023 format is
10000000101 (1029)