Tutorial 4: Data representation

advertisement
Introduction to computing and the Internet
Tutorial 4: CPU and Data representation
28/10/2009
Suppose that in a computer the fetch-execute cycle is further decomposed into
6 stages.
1
2
(i) How many time units will 10 instructions take without pipelining?
(ii) How many time units will 10 instructions take if pipelining is used?
Explain your answer
(a) When parallelism is introduced into the processing of computer,
instructions dependencies may arise. If the processor has a single
instruction processing pipeline, in which instructions are issued in-order
and completed in-order, describe the conditions that lead to the following
forms of dependencies:
 Read-after-Write hazards
 Write-after-Read hazards
 Write-after-Write hazards
(b) Why are Read-after-Read hazards not a problem?
(c) What is the primary disadvantage of variable-length instructions?
(d)
3
(i)
(ii)
(i)
Find the unsigned value of the decimal value 8.75
Find the decimal equivalent value of 101.1112
Evaluate the following bit patterns in base 10 under each of the
following interpretations: signed-magnitude, excess notation, and
two’s complement (explaining your answers).
4
(a) 10011101
(b) 00011001
(ii)
Using 8-bit binary sequence notation, find the signed magnitude,
excess notation, and two’s complement representations of the
decimal value, -1410 ?
(a) Represent 9.625 in IEEE 754 single precision format.
5
(b) The following bit pattern represents a single precision floating
point number with 8-bit exponent (with a bias of 127) and a
normalised 23-bit Significand (mantissa) conforming to the IEEE
754.
1
01111100
0110 0000 0000 0000 0000 000
Showing all your working, calculate which number this represents in
base 10.
6
1. Represent +0.8 in the following floating-point representation:
• 1-bit sign
• 4-bit exponent (biased by 7)
• 6-bit normalised mantissa (significand).
2. Convert the value represented back to decimal.
3. Calculate the relative error of the representation.
Download