Balancing recording range and precision

A dispenser records the volume issued in each transaction using an unsigned integer code stored in 8 bits. The possible codes are 0 through 255. Code 255 means missing data; every other code represents a volume.


The dispenser uses fixed-point representation: each valid integer code is multiplied by a fixed scale to obtain the recorded quantity. Its current rule is


volume in litres=code×0.1.\text{volume in litres}=\text{code}\times0.1.


A new requirement is to record every volume from 0.0 L through 30.0 L in increments of 0.1 L exactly. A supplier proposes retaining 8 bits but changing the scale to 0.2 L per code, while keeping code 255 reserved for missing data.


Find the maximum valid volume under the current rule and under the supplier's proposal, each in litres to one decimal place. Then find the minimum number of bits needed to meet the new requirement while retaining the original scale of 0.1 L per code. For this enlarged format, reserve the largest available code for missing data. Finally, enter true or false to indicate whether the supplier's proposal represents every required volume exactly.


For any unsigned format with bb bits, the available integer codes run from 00 through 2b−12^b-1.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Data Representation and Recording Questions: