John Errington's Data Conversion Website
Introduction to Data conversion
Computers are digital systems that form part of our world which is predominantly analog in nature. There are some things that are clearly digital - lights on/off, stock levels or cash in a bank account. However examples of analog are all around us - your weight, the angle of your swivel chair, the growth of plants and flowers, the speed and direction of the wind, and the brightness of the light. When we use computers to measure or control things in our analog world we need to provide for conversion between the analog values and their digital representations inside the computer. This is the subject of this site.
Analog and Digital parameters
a digital parameter has a set of clearly defined values it can take and these can be associated with integer numbers in a strict 1: 1 correspondence. For example a light can be on or off, represented by off = 0, on = 1. The amount of money in your bank account can be represented as a positive or negative integer.
Generally, anything that can be represented in a data table - stock levels, timetables, accounts etc. are all digital values. They can be copied with complete precision.
a parameter that can take any value within a range, and can only be measured or represented to limited precision, usually by a decimal number. For example your body temperature may be indicated as 34 degrees by a thermometer, but a more accurate measurement might give 33.86...
Precision and Accuracy
Its important when thinking about data conversion to be aware of the distinction between precision and accuracy. A good example here are bathroom scales. My bathroom scales measure 0 to 100kg and report my weight as 74.1 kg. If I setep off and back on the weight is reported as 74.2 kg.
The precision is the smallest change in weight that can be distinguished. Here it would be stated as 1 part in 1000 or 0.1%. This should also take into account the repeatability of the measurement.
The accuracy is the degree to which the measured value (74.1kg) represents the actual value (my true weight). If my true weight is 73.20 kgs the scales are only accurate to about 1.0 kg, or 1%
Its easy to be fooled into thinking a measurement is very accurate if its very precise, but this is often not the case; and frequently measurements are quoted to much higher levels of accuracy than is justified.
Example: A rod of length 13cm is divided into three equal parts; what is the length of each part?
13/3 = 4.333 .. WRONG!
The precision of the length given was 13cm (implying +/- 1cm) not 13.0000cm
The correct answer - reflecting this degree of precision - is 4cm +/- 0.4 cm
In converting between analog and digital domains we need to make design choices based on our understanding of the values to be converted, the range, accuracy, precision and rate at which this needs to take place, and an awareness of the budget for this task. The sections of this site aim to provide knowledge that will support and guide you in making these choices.