20.01.2013 Views

The Art of the Helicopter John Watkinson - Karatunov.net

The Art of the Helicopter John Watkinson - Karatunov.net

The Art of the Helicopter John Watkinson - Karatunov.net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

300 <strong>The</strong> <strong>Art</strong> <strong>of</strong> <strong>the</strong> <strong>Helicopter</strong><br />

Fig. 7.37 Two’s complement coding. See text for details.<br />

In <strong>the</strong> two’s complement system, <strong>the</strong> upper half <strong>of</strong> <strong>the</strong> pure binary number range has<br />

been redefined to represent negative quantities. If a pure binary counter is constantly<br />

incremented and allowed to overflow, it will produce all <strong>the</strong> numbers in <strong>the</strong> range<br />

permitted by <strong>the</strong> number <strong>of</strong> available bits, and <strong>the</strong>se are shown for a four-bit example<br />

drawn around <strong>the</strong> circle in Figure 7.37. As a circle has no real beginning, it is possible<br />

to consider it to start wherever it is convenient. In two’s complement, <strong>the</strong> quantizing<br />

range represented by <strong>the</strong> circle <strong>of</strong> numbers does not start at zero, but starts on <strong>the</strong><br />

diametrically opposite side <strong>of</strong> <strong>the</strong> circle. Zero is midrange, and all numbers with <strong>the</strong><br />

MSB set are considered negative. <strong>The</strong> MSB is thus <strong>the</strong> equivalent <strong>of</strong> a sign bit where<br />

1 = minus. Two’s complement notation differs from pure binary in that <strong>the</strong> most<br />

significant bit is inverted in order to achieve <strong>the</strong> half circle rotation.<br />

Controls having limited travel, such as potentiometers and LDVTs, can also have<br />

<strong>the</strong>ir outputs converted to two’s complement. Figure 7.38 shows how a real ADC<br />

(analog to digital convertor) is configured to produce two’s complement output from,<br />

for example, a potentiometer. At (a) an analog <strong>of</strong>fset voltage equal to one-half <strong>the</strong><br />

quantizing range is added to <strong>the</strong> bipolar analog signal in order to make it unipolar as<br />

at (b). <strong>The</strong> ADC produces positive only numbers at (c) which are proportional to <strong>the</strong><br />

input voltage. <strong>The</strong> MSB is <strong>the</strong>n inverted at (d) so that <strong>the</strong> all-zeros code moves to <strong>the</strong><br />

centre <strong>of</strong> <strong>the</strong> quantizing range. <strong>The</strong> analog <strong>of</strong>fset is <strong>of</strong>ten incorporated in <strong>the</strong> ADC as<br />

is <strong>the</strong> MSB inversion. Some encoders are designed to be used in ei<strong>the</strong>r pure binary or<br />

two’s complement mode where <strong>the</strong> MSB inversion may be applied as required.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!