Teach Yourself PIC Microcontrollers | www.electronicspk.com | 12
special would happen, we would keep on
using numbers in the same way, but they would look a bit
different. For example: 11011010. How many pages of a book does the number 11011010 include? In order
to learn that, follow the same logic like in the previous example, but in inverse order.
Have in mind that all
this is about mathematics with only two digits- 0 and 1, i.e. base-2 number system (binary number system).
Clearly, it is the same number represented in two different ways. The only difference is in the number of
digits necessary for writing some number. One digit (2) is used to write the number 2 in decimal system,
whereas two digits (1 and 0) are used
to write that number in binary system.
Do you now agree with the first
sentence in this text? Welcome to the
world of binary arithmetic! Do you
have any idea where it is used?
E x c e p t i n g s t r i c t l y c o n t r o l l e d
laboratory conditions, the most
complicated electronic
circuits cannot
with accuracy determine difference
between two sizes (two voltage
values, for example) if they are too
small (lower than several volts). The
reasons for that are electrical noises
and something quite uncertainly called “realistic working environment” (unpredictable changes of power
supply voltage,
temperature changes, tolerance to values of built in components etc.). Imagine a computer
which would operate upon decimal numbers by recognizing 10 digits in the following way: 0=0V, 1=5V,
2=10V, 3=15V, 4=20V... 9=45V !? Did anybody say batteries? Far simpler solution is the use of binary
logic where 0 indicates that there is no voltage and 1 indicates that there is voltage. Simply, it is easier to
write 0 or 1 instead of “there is no voltage” or “there is voltage”. It is so called logic zero (0) and logic one
(1) which electronics perfectly cope with and easily performs all those endlessly complex
mathematical
operations. It is apparently electronics which in reality applies mathematics in which all numbers are
represented by two digits only and in which it is only important to know whether there is voltage or not. Of
course, we are talking about digital electronics.
Chia sẻ với bạn bè của bạn: