|You are here:|
A control system is being designed for a washing machine using a 16-bit register to store data about the state of the machine, such as whether the door is open or closed, the level of water in the machine and the temperature selected for the wash (an integer).
How many bits are required to store the following data:
If the temperature can only be set at 5 degree intervals, from 25 to 75, how many bits are required to store the settings?
In another control system 9 bits are available to store a temperature range of -90 to plus 90 degrees. Show how this could be done using a floating point binary representation while maintaining the maximum possible precision.
If the 9-bits were allocated to storing an integer in two's complement form, what would be the minimum and maximum value that could be stored (you may give your answer as a power of 2).
Assume there exists a hypothetical decimal computer that stores numbers in a word. A word which stores an integer value can hold eight symbols, one sign (+ or -) in the leftmost position and seven decimal digits. A word which stores a floating-point number can hold eight symbols but the word is divided into two parts. One part can hold three symbols. It is called the exponent and is composed of a sign and two decimal digits. It is located in the leftmost (high order) three positions.
The second part which can hold five symbols is the mantissa. This part is composed of a sign and four decimal digits normalised to the most significant digit and is located in the rightmost (low order) five positions. The digits of the mantissa are normalised as indicated in the floating-point example (-2.73479) below.
Examples of integers and floating-point numbers are given below.
(a) What is the smallest integer and the largest integer that can be stored?
(b) What is the largest floating-point number that can be stored? What is the smallest floating-point number greater than 0 that can be stored. In both cases give the answer as a power of 10.
(c) Given the range of available real values in this computer, copy and complete the real number line below. Indicate the range of negative and positive real values, underflow and overflow, by means of labels.
The site is partly financed by advertising revenue, partly by online teaching activities and partly by donations. If you or your organisation feel these resouces have been useful to you, please consider a donation, $9.95 is suggested.
© 2001 - 2007 Richard Jones, PO BOX 246, Cambridge, New Zealand; This page was last modified on October 28, 2013