| |
||
| |
Created it, 06/09/09
Update it, 06/09/24
N° Visitors
In this theory, you will re-examine concepts, already approached in theory 7, but in a simpler form. These concepts relate to the codes and the numbering systems.
You will see then the manner of passing from a code to the other and of posting information.
1. - CODES AND DECODERS
1. 1. - INFORMATION AND CODES
Tricolor fires (figure 1) make it possible to direct the traffic inside the cities.
Indeed, each road user receives data on the control which it must adopt.
Orange : slow down
Red : you stop
Green : pass.
In the everyday life, the communication implies a coded language.
The national number of the Social security is, for example, a code which makes it possible to recognize the individuals so thereafter being able to make carry out by a computer all the operations relating to their medical refundings the title of the Social Security. An example is given figure 2.
The language and the writing are also means of communication in code. This supposes that there is a rule binding that which writes and that which reads the message.
The insects communicate between them various manners, i.e. with various codes :
The bees have various ways of flying to lead the other bees in a precise place
or to inform them danger, it is what one calls the dance of the bees.
Certain animals emit chemical substances called “phéromones” which make it
possible for example to mark their territory, or to attract their partner ;
others as the fireflies send luminous messages.
All these examples could multiply ad infinitum.
The computers or the digital circuits cannot them also do without codes to communicate between them.
Since, as we saw, the digital circuits function with two levels: high (H) and low (L) ; all the codes will be able to use only two elementary information related to these two levels 1 and 0 (figure 3).
However, the possibilities offered by combinations of 1 and 0 are very numerous. Their choice will depend on the desired applications.
In the same way, the letters of the alphabet are not numerous but they however make it possible to compose an infinity of words and this in many languages.
Unfortunately, it is impossible to know all the languages of the world, this is why it is necessary to lay out interpreters.
In the digital circuits, the problem is identical. So that a circuit using a code x can converse with a circuit using a code y, one will need an interpreter whom we will call decoder x / y (figure 4) or decoder y / x following the direction in which the code conversion will be carried out (from where the terms “x worms y” or “y worms x” that you will meet further).
The decoder translates the information of a code in another from where also the transcoder term.
We will examine the principal digital codes and the corresponding decoders.
1. 2. - CODES OF NUMERATION
The data processed in the digital circuits are materialized by levels H and L representative of logical values 1 and 0.
We saw that these two signs are sufficient to express information in binary code.
We know in addition that the numbering system whom we use each day is different. It is the decimal system which uses 10 signs from 0 to 9.
1. 2. 1. - ORIGIN OF THE DECIMAL NOTATION
When the old ones wanted to count objects (here corn ears), they had to imagine the corresponding numbers and signs.
An example is given on figure 5.
With each quantity of objects a number symbolized by a graphic sign corresponds. But very quickly, the problem became impossible bus with each time an object was added, it was necessary to invent a new symbol.
The signs from 0 to 9 are familiar for us, but they could be different, thus the Romans used the sign V for 5 and 10 the sign X which we took again here.
The Ñ
signs and
invented for the needs for the course mean for Ñ,
11 and
,
12.
To count up to 10 000, one would need 10 000 signs and to count until infinite infinity of signs.
The chaldéens found the solution.
The idea was to limit itself to ten signs from 0 to 9, i.e. as much as the fingers of the hands and to express each so large number it by a combination of these ten signs was.
Thus having only 10 signs, arrived at 9 one decided to start again to 0 and to indicate 1 for first ten.
| Thus for X, one can write 10 = 1 ten + 0 unit ; |
| for Ñ, one can write 11 = 1 ten + 1 unit ; |
|
for |
Thus, signs 20 mean : 2 tens + 0 unit.
We see that this system makes it possible to write numbers of which the structure is such as for 3 47210 for example, this number means :
3 (103) + 4 (102) + 7 (101) + 2 (100)
The first figure on the right is that of the units of weight 100 = 1, the second on the basis of the line has a weight of 101 = 10, it is the figure of tens, the third on the basis of the line has a weight of 102 = 100, it is the figure of the hundreds and so on.
We see that the weight of the figures is multiplied by 10 with each time the figure shifts of a row towards the left. We will call 10, bases system.
Thus, in 1 000 = 10 x 10 x 10 = 103, 10 are the base and 3 the exhibitor who indicates how much time the base must be multiplied by itself.
1. 2. 2. - BINARY NOTATION
In the binary notation as we have only two digits, the base will be 2 and we will be able to take again the problem of corn ears as represented on figure 6.
Thus for any corn ears, we have: 0 x 20 = 0
for a corn ear 1 x 20 = 1
for two corn ears 1 (21) + 0 (20) = 10
for three corn ears 1 (21) + 1 (20) = 11
for four corn ears 1 (22) + 0 (21) + 0 (20) = 100
for five corn ears 1 (22) + 0 (21) + 0 (21) = 101
for six corn ears 1 (22) + 1 (21) + 0 (21) = 110
These two types of numeration, binary and decimal, constitute a type of code called fixed-count code.
In the table of figure 7, one finds the first twenty numbers expressed in code decimal balanced and code binary balanced.
To express numbers increasingly large, it is necessary to have more and more figures.
| Numbers | Balanced decimal code | Balanced binary code |
| 0 | 00 | 00000 |
| 1 | 01 | 00001 |
| 2 | 02 | 00010 |
| 3 | 03 | 00011 |
| 4 | 04 | 00100 |
| 5 | 05 | 00101 |
| 6 | 06 | 00110 |
| 7 | 07 | 00111 |
| 8 | 08 | 01000 |
| 9 | 09 | 01001 |
| 10 | 10 | 01010 |
| 11 | 11 | 01011 |
| 12 | 12 | 01100 |
| 13 | 13 | 01101 |
| 14 | 14 | 01110 |
| 15 | 15 | 01111 |
| 16 | 16 | 10000 |
| 17 | 17 | 10001 |
| 18 | 18 | 10010 |
| 19 | 19 | 10011 |
| 20 | 20 | 10100 |
A combination of 4 binary digits can represent one of the 16 numbers ranging between 0 and 15.
Foot-note :
Each binary number is represented in this figure by a code of five the significant digits made up by adding 0 necessary ones on the left.
It is useful to know which is the maximum number that one can represent with a given number of binary digits. One can determine it by reading the maximum numerical value when each figure to 1 like is indicated on figure 8. This one gives the example of a number of 4 binary digits.
The maximum number that one can represent with n binary digits is : 2n - 1.
1. 3. - PASSAGE
OF A BINARY NUMBER TO THE CORRESPONDING DECIMAL VALUE
It is enough to give to each binary digit its weight and then to add the weights with the various figures.
If we take for example number 10112 :
10112 = 1 x 23 + 0 x 22 + 1 x 21 + 1 x 20
= 1 x 8 + 0 x 4 + 1 x 2 + 1 x 1 = 8 + 0 + 2 + 1 from where 10112 = 1110
To make the opposite operation, i.e. to pass from a decimal number to the binary number corresponding, one can divide in a repetitive way this number not two.
The remainders of each division will constitute the figures of the binary number by reading them starting from the last. You point out that the remainder is 0 when the dividend is even and 1 when it is odd.
For number 277, one obtains for example :
Thus to 27710 the binary number 1000101012 corresponds. Indeed, if one breaks up the number according to the binary code, one obtains :
1000101012 = (1 x 28) + (0 x 27) + (0 x 26) + (0 x 25) + (1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20)
= (1 x 256) + (0 x 128) + (0 x 64) + (0 x 32) + (1 x 16) + (0 x 8) + (1 x 4) + (0 x 2) + (1 x 1)
= 256 + 16 + 4 + 1 = 277
All the binary numbers written with figures 0 and 1 as many correspond decimal numbers written with decimal digits.
For example, the binary number 1112 whose value is equal to seven (710) could as well represent the decimal number 11110 whose value is equal to 111.
In order to avoid confusions of this kind, one writes index 2 for the binary numbers and index 10 for the decimal numbers.
While thus proceeding, one will have :
11110 if the number is decimal and is worth 111 ;
1112 if the number is binary and is worth 710.
1. 4. - BITS
The binary numbers are formed of figures 0 and 1. These binary digits are called “binary digit”, in summary “bit”.
Thereafter, the bit term took in direction broader than that of binary digit. It more generally indicates the unit of information which can be memorized in a rocker.
Any information of some type that it is can be expressed for a suitable succession of bits. Thus can one digitize the word (numerical telephone), the writing (text processing), the music (numerical disc), mathematical or financial calculation (calculators, computers and invoicing machines).
In the computers, each information is broken up into a succession of bits. No computer can at the same time treat more than one bit.
In compensation, by its extraordinary speed, it is able to carry out logical or arithmetic operations in a so fast way which it achieves of the incredibly complex tasks in an extremely short time.
In general, one rather often uses the word bit to indicate the number of stages, of a meter for example. One speaks commonly about meters or registers with shifts with 4 bits, 8 bits, 12 bits what means that there are 4, 8, 12 rockers.
| Following
page |
![]()