Created it, 06/10/19
Update it, 06/10/29
N° Visitors
In this practice, we will deal with three closely dependant subjects : codes, decoders and bill-posters.
The codes are systems allowing the representation of information in the form of signals electric.
The decoders are circuits which convert a data to make it more explicit.
The bill-posters are devices allowing to visualize logical information.
1. - CODES
1. 1. - INTRODUCTION
“The secret agent opened the letter, deciphered it then destroyed it. The instructions had been very clearly…”
That once you read this kind of sentences or considering a film scene reproducing this fact!
The secret agent succeeds in deciphering the message because he knew the code with which he was written.
Indeed, any language is a code. For example, a conversation which proceeds between two Russians is incomprehensible with the major part of the French, although the two interlocutors include themselves/understand since they speak the same language.
From these examples, it is possible to deduce the following rule :
a code, to be valid, must be known as well among
that which emits it as that which receives it.
In the digital circuits also, the electric signals representing information to be treated are codified.
It is thus very important to know the code used since this “language” allows the communication between digital circuits.
The codes are numerous, but they rest all on the fact that an electric signal in numerical electronics can only have only two logical levels ; namely a level L or a level H.
The whole of the codes thus uses the figures 0 and 1 which correspond to the two logical levels L and H.
In this practice, you will examine the digital codes, i.e. those which are used to represent the numbers.
Those relating to the transmission of letters or messages of the type used by the telegraph will not have been treated.
1. 2. - DIGITAL
CODES
Briefly let us summarize the characteristics of the digital codes already described in the corresponding theory.
Decimal code
It is that which you daily use in the arithmetic operations. It uses the ten figures from 0 to 9.
Each figure of a number has a weighting function of its position.
It is what one usually calls the figure of the units, tens, the hundreds…
Example :
34510 = 3 x 100 + 4 x 10 + 5 x 1
Index 10 specifies the code in which the number is written.
Binary code
It is that used in the digital circuits.
It uses two digits 0 and 1.
As above, to each position of a figure inside the number a weighting corresponds.
Example :
101102 = 1 x 24 + 0 x 23 + 1 x 22 + 1 x 21 + 0 x 20
= 16 + 0 + 4 + 2 + 0
= 2210 (22 in decimal code)
Code B.C.D.
With this code, each decimal digit is represented by four binary digits (bits).
Example :

Octal code
This code, as well as the hexadecimal code, makes it possible to represent in a briefer way the numbers or messages written in binary code.
It is used primarily in the man-machine communications.
This code cannot be used in the internal circuits of the computers because the eight symbols necessary cannot be materialized.
Example :
6258 = 6 x 82 + 2 x 81 + 5 x 80
= 6 x 64 + 2 x 8 + 5 x 1
= 40510 (in decimal code)

Hexadecimal code
The hexadecimal code is more used than the octal one and requires sixteen symbols of 0 to F.
Example :

Remember that the principal characteristic of a code is its base.
The latter is expressed by the number of symbols which it has.
Thus, the binary code is in base two, the hexadecimal code bases of them sixteen and so on.
After this introduction, you can join together the material necessary to conclude the various experiments of this practice.
2. - PREPARATION
OF THE MATERIAL
Take the following components in the whole of the material in your possession.
two resistances of 220 W - tolerance 5 %
two resistances of 4700 W - tolerance 5 %
a resistance of 1 MW - tolerance 5 %
an electrolytique capacitor with the tantalum of 1 µF - 10 V
a diode 1N 4148
two transistors BC 238 (or type are equivalent)
two bill-posters TIL 311
an integrated circuit MM 74C00
an integrated circuit MM 74C02
an integrated circuit MM 74C08
an integrated circuit MM 74C42
an integrated circuit MM 74C154
an integrated circuit MM 74C163
an integrated circuit MM 74C193
3. - FIRST EXPERIMENT : EXAMINATION OF THE CODE
USED BY A METER
In practice 9, you examined various types of meters. With each combination of the levels of the exits, a given state of the meter corresponds. This state allows you to know the number of events added up by the meter.
The numbers assigned in these various states could result from a completely arbitrary choice ; in fact, it of it is nothing because these numbers relate to a well defined code.
To check this fact, you will use the synchronous meter modulo 16 of type MM 74C163.
3. 1. - REALIZATION OF THE CIRCUIT
a) Remove matrix and group of connectors all the connections and the components relating to the last experiment.
b) Put the switch of the digilab on the position “OFF” and connect the card in the catch sector.
c) Introduce the integrated circuit MM 74C163 into the matrix and carry out connections as indicated in the figure 1-a.

.gif)
The electric diagram of the assembly carried out is indicated to the figure 1-b.
The meter is cabled in the following way:
The entries CET and CEP are on the level H, the meter is thus validated.
Entry LOAD is on the level H, therefore inactive ; entries IN1, IN2, IN3 and IN4 cannot play any part.
The clock is connected to the
contact P0
; each impulse on the P0 button
will thus make advance the state of the meter.
Entry CLEAR is connected to the
contact P1
;
at rest, entry CLEAR will be inactive.
While supporting on P1 then on P0
(entry CLEAR is synchronous), the meter
will be put at zero.
The four exits Q1, Q2, Q3 and Q4 are connected respectively to the four LED L0, L1, L2 and L3.
3. 2. - OPERATIONAL TEST
a) Energize the digilab.
The state of the four exits is random.
b) Support on P1 then on P0 by maintaining the support on the two buttons a short moment.
The meter is prépositionné to zero.
c) Support on P0, the LED L0 ignites.
d) Support on several occasions on P0. Observe the indication of the LED each time.
Remember that a lit LED corresponds to a level H and that an extinct LED corresponds to a level L.
Note the level of the exits each time. You obtain the table of figure 2.
| A number of pressures on P0 | Q4 | Q3 | Q2 | Q1 |
| 0 | L | L | L | L |
| 1 | L | L | L | H |
| 2 | L | L | H | L |
| 3 | L | L | H | H |
| 4 | L | H | L | L |
| 5 | L | H | L | H |
| 6 | L | H | H | L |
| 7 | L | H | H | H |
| 8 | H | L | L | L |
| 9 | H | L | L | H |
| 10 | H | L | H | L |
| 11 | H | L | H | H |
| 12 | H | H | L | L |
| 13 | H | H | L | H |
| 14 | H | H | H | L |
| 15 | H | H | H | H |
e) Put the digilab not under tension. Until now, you did not observe anything again that you did not already see in practice preceding.
However, you will highlight the code used by this meter.
For that, you will replace the level L by figure 0 and the level H by figure 1.
You obtain the table of figure 3.
| A number of pressures on P0 | Q4 | Q3 | Q2 | Q1 |
| 0 | 0 | 0 | 0 | 0 |
| 1 | 0 | 0 | 0 | 1 |
| 2 | 0 | 0 | 1 | 0 |
| 3 | 0 | 0 | 1 | 1 |
| 4 | 0 | 1 | 0 | 0 |
| 5 | 0 | 1 | 0 | 1 |
| 6 | 0 | 1 | 1 | 0 |
| 7 | 0 | 1 | 1 | 1 |
| 8 | 1 | 0 | 0 | 0 |
| 9 | 1 | 0 | 0 | 1 |
| 10 | 1 | 0 | 1 | 0 |
| 11 | 1 | 0 | 1 | 1 |
| 12 | 1 | 1 | 0 | 0 |
| 13 | 1 | 1 | 0 | 1 |
| 14 | 1 | 1 | 1 | 0 |
| 15 | 1 | 1 | 1 | 1 |
Attentively observe this table, line by line.
It appears to you that for each number of pressures on P0 (which is a decimal number), is written in correspondence the same number in binary code.
The most significant digit (MSB) corresponds to Q4 and that least significant (LSB) in Q1.
While starting with the top of the table, one finds:
00002 = 0 x 23 + 0 x 22 + 0 x 21 + 0 x 20
= 0 x 8 + 0 x 4 + 0 x 2 + 0 x 1 = 010
00012 = 0 x 23 + 0 x 22 + 0 x 21 + 1 x 20
= 0 x 8 + 0 x 4 + 0 x 2 + 1 x 1 = 110
00102 = 0 x 23 + 0 x 22 + 1 x 21 + 0 x 20
= 0 x 8 + 0 x 4 + 1 x 2 + 0 x 1 = 210
and so on until the number 1111 of the last line.
You point out that the conversion of a decimal number into a binary number is carried out by successive divisions.
For example, to convert the decimal number 12 into binary number, one proceeds in the following way:

The binary number is obtained by reading the remainders of bottom to the top, in this case : 1210 = 11002.
In conclusion, it appears that this meter uses the binary code.
With this experiment, it is enough to observe the state of the LED (lit or extinct) to know the representation in binary code of the pulse repetition frequency arrived at the meter.
In figure 4, the 16 possible combinations of this meter are represented by the state corresponding of the LED and the decimal number associated in this state.

| Following
page |