Analysis and comparison of seven methods for realizing odd-number judging circuits

Publisher:ZhenxiangLatest update time:2012-04-30 Source: OFweek Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

At present, the experimental content of the basic digital electronic technology course includes three parts: verification experiment, comprehensive experiment, and design experiment. The focus of each part of the experimental content is different. For example, the key to the design experiment is design, which requires students to design a reasonable experimental circuit according to the design requirements, and select devices, install and debug to complete the experimental content. From the teaching practice, most students can successfully complete the experimental requirements, but their ideas for solving problems are single, the design process is not flexible, and they do not pay attention to the training of innovative thinking ability. This requires teachers to reasonably arrange the experimental content while constantly guiding students to broaden their knowledge, innovate their thinking, and actively explore multiple ways to solve the same problem through various channels. The design of combinational logic circuits is diverse. The author chooses a parity check circuit implementation to elaborate in detail.

Parity check circuits are typical and practical in the analysis and design of combinational logic circuits. Being familiar with the logical functions and circuit implementation of odd-even check circuits will help deepen your understanding and mastery of combinational logic circuits. Taking the implementation of odd-even check circuits as an example, various implementation schemes using gate circuits, decoders, and data selectors are discussed, and examples are used to illustrate the flexibility and diversity of combinational logic circuit design.

1 Truth table and expression of three-input variable odd-number judgment circuit

For the odd-number judgment problem of three input variables, let the input variables be represented by A, B, and C respectively, and the output function be represented by F. When there is an odd number of 1s in the value combination of the input variables, the output function value is 1; when the number of 1s in the value combination of the input variables is an even number, the output function value is 0. Based on this logical relationship, the truth table of the three-input variable odd-number judgment circuit can be written as shown in Table 1.

Table 1 Truth table of three-input odd-number judgment circuit

It can be seen from truth table 1 that there are 4 groups of input variable value combinations that make the output function value 1, namely respectively. Therefore, the output function expression of the three-input variable odd-number logic problem is:

2 Using gate circuits to implement a three-input variable odd-number judgment circuit

There are many ways to implement a three-input variable odd-odd circuit using gate circuits, which are listed below.

Method 1: AND/OR expression (1) can be directly implemented using an inverter, an AND gate, or an OR gate. The circuit diagram is shown in Figure 1.

Figure 1 is implemented using inverters, AND gates, and OR gates.

The three-input odd-odd judgment circuit is realized by using inverters, AND gates, and OR gates. Its characteristics are that the expression basically does not change, and the implementation method is simple and clear. The disadvantage is that there are more connections and the circuit is complicated.

Method 2: AND/OR Expression (1) can also be implemented using inverters and AND/OR gates. The circuit diagram is shown in Figure 2.

Figure 2: Using inverters, AND/OR gates to implement

From the above two different gate circuit design methods to realize the three-input variable odd-odd circuit, it can be concluded that although method one and method two have simple implementation logic, they both have too many connections and waste resources.

The logical function expression of the same logic problem is not unique. The output function expression (1) of the three-variable input odd-number logic problem is transformed as follows:

Method 3: According to the above expression (2), the three-input variable odd-number judgment circuit can also be implemented using an XOR gate, and its circuit is shown in Figure 3.

Figure 3: XOR gate implementation

As shown in the circuit of FIG3 , for the logic problem of judging the odd number of three input variables, when XOR gate is used, compared with method 1 and method 2, there are fewer connections in the circuit, the circuit is simple and clear, and the implementation is simple.

The XOR logical expression can also be slightly transformed to obtain:

That is, an XOR gate can be implemented with four 2-input NAND gates, so the three-input odd-number judgment circuit can be implemented with eight 2-input NAND gates, as shown in Figure 4.

Figure 4: Implementation using a 2-input NAND gate

3 Using 74138 decoder to implement three-input variable odd-number judgment circuit

The circuit structure of the decoder shows that under appropriate connection conditions, the decoder is actually a minimum term generator. According to the basic principles of logic algebra, any logic function expression can be transformed into a minimum term expression. Therefore, the decoder combined with the appropriate gate circuit can realize the given logic function. For the problem of judging the odd number of three input variables, it can also be realized by using the 74138 decoder and equipping it with appropriate gate circuits. From the function table of the 74138 decoder, we can see that:

In formula (4), when G1=1, G2A=G2B=0, Yi=m軓i. If the input variable of the given logic function is connected to the A2A1A0 input terminal of the 74138 decoder, for example, A2A1A0=ABC, then the logic function expression (1) can be transformed into:

Equation (5) shows that the three-input variable odd-number determination circuit can be implemented using a 74138 decoder and a four-input NAND gate. The circuit is shown in Figure 5.

Figure 5 Decoder and NAND gate implementation of three-input odd-number judgment circuit

4 Using data selector to realize three-input variable odd-number judgment circuit

The general expression of the output and input relationship of the data selector is:

In (Formula) 6, EN is the input enable control signal, mi is the minimum term composed of the address input variable, and Di represents the data input. When the enable input signal is valid, if the data input is used as the control signal, then when Di=1, its corresponding minimum term mi appears in the expression, and when Di=0, its corresponding minimum term mi does not appear in the expression. Therefore, the output expression of the data selector is actually the sum expression of the minimum terms controlled by the data input terminal. Considering that any logic function expression can be transformed into a minimum term expression, as long as the input variable of the logic function is connected to the address selection input terminal of the data selector, the combinational logic function can be realized. Using this feature of the data selector, a three-input variable odd-or-even judgment circuit can also be realized.

If an eight-to-one data selector is used to implement a three-input variable odd-odd circuit, the number of input variables of the function is the same as the number of address variables of the data selector. If A2A1A0 = ABC and the enable input is grounded, equation (6) becomes:

Comparing (1) with (7), we can see that as long as D0=D3=D5=D6=0, D1=D2=D4=D7=1, then Y=F. Therefore, the circuit diagram can be shown in Figure 6 (a). It can also be implemented by using a four-to-one data selector, one of whose circuits is shown in Figure 6 (b).

Figure 6: Implementation using data selector

5 Design of odd-number judging circuit by taking the inverse function

In the above-mentioned odd-even judgment circuit design, the analysis is carried out according to the original function of the output function. The basic theorem of logic algebra shows that: F=F, from which another way to design combinational logic circuits can be derived, that is, first calculate F and then invert it. This seems to be a bit troublesome, but for some applications, the design process does not increase the trouble, but provides a way to solve the problem. For the odd-even judgment circuit with three input variables, the inverse function of F written for 0 in the truth table 1 is:

Taking the inverse of both sides of equation (8) yields:

For formula (9), inverters and AND or NOR gates can be used to implement it, and its circuit is shown in Figure 7. Formula (9) can also be implemented using a 74138 decoder or a data selector.

Figure 7: Using inverter and NAND gate to realize

6 Conclusion

The key to design experiments lies in the design process. Correct design is based on familiarity with basic knowledge. For specific application problems, due to the diversity of combinational logic circuit components, there are many possible options for implementation. This paper takes the three-input variable odd-even logic problem as an example, analyzes and discusses various circuit implementation methods, and gives 7 circuit implementation schemes, using examples to illustrate the flexibility and diversity of logic circuit design.

The design of the three-input variable odd-or-even logic circuit is just an example. The purpose of discussing its design approach is to draw inferences from one example in the design of other logic circuits. Using the design ideas proposed in this article, other combinational logic circuits such as full adders and full subtractors can also be designed, which will broaden the horizons of combinational logic circuit design, cultivate innovative thinking ability, and guide the design and experiment of digital logic circuits.

Reference address:Analysis and comparison of seven methods for realizing odd-number judging circuits

Previous article:Image sensors enable innovative applications in surveillance cameras
Next article:Considerations for selecting the right low-dropout regulator for high-performance systems

Latest Power Management Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号