Binary the way micros count



Download 115.46 Kb.
Page2/15
Date08.05.2021
Size115.46 Kb.
#56580
1   2   3   4   5   6   7   8   9   ...   15
Binary
The noise problem

If the input of a microprocessor is held at a constant voltage, say 4 V, this would appear as in Figure 1.

If we try to do this in practice, then careful measurements would show
that the voltage is not of constant value but is continuously wandering

Binary - the way micros count


Figure 1

A constant voltage

above and below the mean level. These random fluctuations are called
electrical noise and degrade the performance of every electronic
circuit. We can take steps to reduce the effects but preventing it
altogether is, so far, totally impossible. We can see the effect by
disconnecting the antenna of our television. The noise causes random
speckles on the screen which we call snow. The same effect causes an
audible hiss from the loudspeaker. The effect of noise is shown in
Figure 2.
Figure 2

A ‘noisy’ voltage


Most microprocessors use a power supply of 5 V or 3.3 V. To keep the arithmetic easy, we will assume a 5 V system.

If we are going to persuade the microprocessor to count from 0 to 9,
as we do, using voltages available on a 5 V supply would give 0.5 V
per digit:

0 = 0V


1 = 0.5V

2 = 1V


3 = 1.5V

4 = 2V


5 = 2.5V

6 = 3V


7 = 3.5V

8 = 4V


9 = 4.5V


If we were to instruct our microprocessor to perform the task 4 + 4
= 8, by pressing the ‘4’ key we could generate a 2 V signal which is
then remembered by the microprocessor. The + key would tell it to
add and pressing the ‘4’ key again would then generate another 2 V
signal.

So, inside the microprocessor we would see it add the 2 V and then


another 2 V and, hence, get a total of 4 V. The microprocessor could
then use the list shown to convert the total voltage to the required
numerical result of 8. This simple addition is shown in Figure 3.

This seemed to work nicely - but we ignored the effect of noise. Figure

4 shows what could happen. The exact voltage memorized by the
microprocessor would be a matter of chance. The first time we pressed

Figure 3


It works! 4 + 4
does equal 8

Figure 4


Noise can cause
problems


Binary - the way micros count


key 4, the voltage just happened to be at 1.5 V but the second time we were luckier and the voltage was at the correct value of 2 V.

Inside the microprocessor:

1.5 V + 2 V = 3.5 V

and using the table, the 3.5 V is then converted to the number 7. So our microprocessor reckons that 4 + 4 = 7.5!

Since the noise is random, it is possible, of course, to get a final result that is too low, too high or even correct.


Download 115.46 Kb.

Share with your friends:
1   2   3   4   5   6   7   8   9   ...   15




The database is protected by copyright ©ininet.org 2024
send message

    Main page