The simplest logical circuits. Part 1: general information on logical circuits and simple logic modules

    Welcome all.
    I decided to write several articles about the simplest logical circuits.
    This topic will be more interesting for people with a poor understanding of the algebra of logic and logical constructions than for professionals and experts on this topic.

    So, let's begin.

    What is a combinational logic circuit?


    This is a circuit capable of processing binary electrical signals. At each point in time, the outgoing signals of the combinational logic circuit (CLC) depend solely on the incoming signals. Therefore, the same combination of outgoing values ​​corresponds to the same combination of outgoing values.

    A characteristic of CLC is the lack of memory. That is, signals that previously entered the circuit do not matter. (“The current moment is important,” as one of the characters in the film “21” said.)

    The mathematical model of KLC


    For a better understanding, analysis and image of complex circuits, their somewhat simplified mathematical models are used.
    In most models, during the development of the CLC, the interaction time of the circuit elements is not taken into account. Therefore, we will assume that the output signals of the circuit instantly respond to changes in the incoming signals. Also, instead of the time-dependent signal function x (t), which can change its essence depending on the technology used (for example, 0 and 5 volts in TTL; 0 and 3.1 volts in CMOS), we will use the logical function x, which can take values ​​0 and 1.

    Description of the KLC


    To describe the operation of the FLC, the so-called truth table is used. This table indicates the values ​​of the output signals for certain values ​​of the input signals. It may look like this:



    In the truth table, the values ​​of each of the signals are arranged in columns, and the rows indicate the correspondence between the signals.

    I will give an example of a logical problem that is solved using such a table.

    Let's say we have a water tower. To create the necessary pressure in the piping system, a certain volume of water should be in the tower round the clock. But you can’t draw water into the tower all the time - it is not dimensionless, and electric energy is not cheap. We need to create a controller that will turn on and off the water supply to the tower, depending on several indicators.



    Several sensors are shown in the picture:
    X is the time of day, where 1 is the day and 0 is the night (electricity is cheaper at night);
    Y and Z are humidity sensors, for them 1 is water, and 0 is dry.

    W will control the valve, turning it on (1) and turning it off (0) if necessary.

    The truth tables for this case will look like this:



    a) we just list all the possible combinations of readings X, Y and Z;
    b) we look at the simplest options: if both Y and Z have a value of 0, then this means that there is no water at all, so W needs to be turned on, and no matter whether it is night or day. If both Y and Z - have a value of 1, then this means that the tank is full, respectively, W must be turned off;
    c) now about saving: if Z = 1, and Y = 0, then the water level in the tank is between two sensors. Moreover, if this happens at night (X = 0), then it is worth collecting water to the maximum (W = 1), and during the day (X = 1 (- leave everything as it is (W = 0);
    d) without incredible nowhere: there is the chance that Y will have a value of 1 at Z = 0. Then, logically, you should send a message about a malfunction in the system, but we just show that this simply can not be.

    Simple logic modules


    Consider the simplest CLCs: Not-1, And-2, and Or-2 modules.

    Not-1


    This is the simplest KLC, with one input and one output. The function of this module is to output a value opposite to the input. Since there is only one entrance, there are only two exit options:



    And-2


    This module is already a little more complicated. It has two entrances and one exit. The function of the And-2 module is as follows: the output will have a value of 1 only if both inputs are also equal to one:



    Or-2


    Now another module with two inputs and one output. Only now, output 1 will be if at least one of the inputs has a value of 1:



    To be continued.


    The other day I’ll write several more articles - next in line are multiplexers, half- and full-adders, as well as all kinds of combinations of modules.
    Thanks for attention.

    Also popular now: