You are here:  
A control system is being designed for a washing machine using a 16bit 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:
[3 marks] If the temperature can only be set at 5 degree intervals, from 25 to 75, how many bits are required to store the settings? [1 mark] 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. [4 marks] If the 9bits 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). [2 marks] 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 floatingpoint 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 floatingpoint example (2.73479) below. Examples of integers and floatingpoint numbers are given below.
(a) What is the smallest integer and the largest integer that can be stored? [2 marks] (b) What is the largest floatingpoint number that can be stored? What is the smallest floatingpoint number greater than 0 that can be stored. In both cases give the answer as a power of 10. [2 marks] (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. [8 marks] related: [ Topic 4 home  previous: errors ] 

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. 
Questions or problems related to this web site should be addressed to Richard Jones who asserts his right to be identified as the author and owner of these materials  unless otherwise indicated. Please feel free to use the material presented here and to create links to it for noncommercial purposes; an acknowledgement of the source is required by the Creative Commons licence. Use of materials from this site is conditional upon your having read the additional terms of use on the about page and the Creative Commons Licence. View privacy policy.
© 2001  2007 Richard Jones, PO BOX 246, Cambridge, New Zealand; This page was last modified on October 28, 2013 