We have 25 guests and no members online

The basis of digital electronics is based on the Boolean algebra. The logical functions directly from the Boolean algebra are the basic tools of digital electronics. They are implemented in electronics in the form of logic gates. When talking about logic circuits, the two main families are TTL (Logic Transistor-Transistor) and CMOS (Complementary Metal-Oxide-Semiconductor). The TTL family (series 74xx) is first to have been released on the market and they are composed of bipolar transistors. Then, in order to have circuits that give more power, the CMOS family (the 4000 series) was created.

Check out my Youtube video : Les portes logiques (Logic Gates)

Whether it is logic gates TTL or CMOS, these logic gates receive as input "0" or "1" which is also called high level and low level. By giving generic names like these, the levels can have different tensions. For example, on TTL circuits, the high level corresponds to 5V (in fact, 2V and more) whereas on a 32-bit microcontroller, there is a good chance that the high level is rather 3.3V. At the output, there are also high and low levels. The voltage of these output levels depends on the type of output. Most of the time the voltage of a high level corresponds to the supply voltage of the circuit. Otherwise, there are circuits with "open collector" or "open drain" outputs. These open collector circuits designate that the output may have a voltage different from that of the hard circuit. Thus, the circuit can provide a low level, but to have a high level, it will be necessary to put a pull-up resistance on the desired voltage. For example, it is possible to put a 24V relay on a logic circuit TTL if its output is open collector.


When using open collector circuits, care must be taken not to put a component that consumes too much for the internal transistor. Indeed, in the data sheet of the circuit, it must be verified that the load does not exceed the current at low level. For example, when mounting the picture above, the current is 2.4 mA (24V divided by 10K Ohm), which is much lower than the maximum current supported by the circuit (here 40 mA).

In logic gates, the buffer is the simplest. The signal at the input is of the same level at the output. Since it does not change the level of the input signal, this type of logic gate is used instead when a signal is weak and one wants to give it more power. Its schematic symbol is represented by a triangle without inversion.


The inverter is also very simple. Unlike the buffer, the inverter, as its name implies, inverts the input signal. Its schematic representation is the same as the follower except that there is a small ball at the output which indicates a signal inversion. In English, the inverter is NOT.


The AND gate or "gate" is used when we want to have a high level output when all inputs are high. There is also the opposite of the AND gate called the NAND Gate or "NAND Gate" in English. To designate this inversion, just like the inverter, a small ball is placed at the output of the logic gate.



Obviously, logic gates can have multiple inputs. In these cases, the door occupies the same function, but on several entries at the same time. For example, this four-input NAND gate still waits for the four inputs to be high to bring the output up to high. Notice that the schematic symbol and the truth table do not match. In fact, the table corresponds to an AND gate and the symbol represents a NAND. Simply reverse the truth table to get combinations of the NAND gate with four inputs.


The OR gate, "OR Gate", allows the output to be high when at least one input is high. Like the AND gate, the OR gate has a contrary door called the NOR gate. When there is at least one of the high level inputs, the output will be low.



Finally, there is an extension of the OR gate known as the XOR gate. The peculiarity of this door, contrary to the OR gate, is that when the two inputs are high, the output is low. So the combination where both inputs are high is excluded (not true) in contrast to the standard OR gate. Like the other doors, there is its opposite called NON-OU-Exclusive ("XNOR Gate").



Check out my Youtube video : Les portes logiques (Logic Gates)

The concept of logical gates will always persist since it is at the very core of computers. On the other hand, more and more, circuits containing only logic gates such as the TTL and CMOS family are obliged to disappear. They are replaced by much more advanced circuits called Complex Programmable Logic Devices (CPLDs) or Field-Programmable Gate Arrays (FPGAs). These are circuits that can be programmed internal logic with languages ​​like Verilog or VHDL. Thus, tens and tens of logic circuits of the 74xx series can be reproduced in a single FPGA circuit. In addition, like the microcontroller, they are reprogrammable which makes them very versatile and increasingly used.