Explanation of the AND-OR-Invert Function
The AND-OR-Invert (AOI) function is a common combinational logic function used in digital circuits. As its name suggests, the AOI function is a logic function that performs a combination of AND and OR operations followed by an inversion (NOT).
Complex logic gates such as the AND-OR-Invert Gate, or its complementary, the OR-AND-INVERT (OAI) logic functions can be constructed using some simple Boolean rules and several discrete logic gates which can then be used to implement more complex Boolean expressions in a single, efficient step.
We know that Combinational Logic Circuits can provide different functions which consist of several NOT, AND, or OR operations connected together using two or more input variables. Multiple-input AND-OR-Invert (AOI) and OR-AND-Invert (OAI) functions can also be realised within a single complex circuit.
How Does an AOI Gate Work?
Basically, the AND-OR-Invert logic function is a three-level logic circuit that takes multiple inputs, performs AND operations on groups of inputs, OR’s the results of those AND operations, and then inverts the final output. That is, the AOI function performs a Sum-of-Products (SOP) calculation of: AB + CD followed by an inversion as shown.
The AND-OR-Invert Circuit

Then as we can see, the AOI circuit is constructed by cascading together in series three distinct stages of logic gates. Two or more AND gates are used to produce the product terms for the input pairs (A B) and (C D).
The outputs from the two AND gates are fed into the inputs of an OR gate which sums the logical products. Then the output of the OR gate is passed through a NOT gate (inverter) to produce the final complemented output at Q.
This basic AND-OR-Invert logic circuit is known commonly as an AOI22 Function. It is known as an AOI22 function because it performs two of two input AND operations and OR’s their results together. Then the output Q is determined by the inputs A, B, C, and D.
The generalised Boolean expression given for this inverted Sum-of-Product AOI22 function is expressed as follows:
The AND-OR-Invert (AOI22) Boolean Expression
Q = (A . B) + (C . D)
Where:
- The Dot (⋅) used in the terms (A ⋅ B) and (C ⋅ D) represents the AND (conjunction) operation.
- The Plus (+) symbol represents the OR (disjunction) operation combining the products.
- The Overline indicates the NOT (inversion) operation applied to the entire sum.
AND-OR-Invert Truth Table
Given the Boolean expression, the behavior of an AOI22 function can be summarised by evaluating all the possible input combinations. Since it has dual 2-input variables: A, B, and C, D with each variable having exactly 2 possible states: False (0) or True (1). This means that for the 4-input variables we will require (2 x 2 x 2 x 2) = 24 = 16 rows within our truth table as shown.
| D | C | B | A | A.B | C.D | (A.B)+(C.D) | Invert |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
| 0 | 0 | 1 | 1 | 1 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 |
| 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 1 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 | 0 | 0 | 1 |
| 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 |
| 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 |
| 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 0 | 0 | 1 | 1 | 0 |
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 |
Thus for the operation of our 4-input AND-OR-Invert circuit, the output is LOW (0) if both input A AND input B are HIGH (1), OR both input C AND input D are HIGH (1).
The AND-NOR AOI22 Circuit
The primary goal of an AOI function is optimisation since it combines three basic logic operations (AND), (OR), and (NOT) into one single logic block. However, you may be thinking, isn’t a Logic OR Gate followed by an inverting NOT gate the same as a NOR gate function, and you would be right!
Then we can reduce this three-gate AOI22 circuit down to just two different gates by repacing the OR-Invert part with a single Logic NOR Gate while still allowing us to implement the inverted sum-of-products expression as shown:
The AND-NOR Circuit

So as before, the AND stage takes the two sets of inputs and perform an AND operation on them: (A.B) and (C.D). While the NOR stage takes the outputs of those two AND gates and inverts them: (A . B) + (C . D).
Commercially Available AOI IC’s
While a logical function like an AND-OR-Invert may seem a bit odd at first, AOI’s are available in several different configurations within the 14-pin dual in-line package (DIP) TTL or CMOS families. They all have the same functionality and are available with a varying numbers of inputs.
Commonly available digital logic AND-OR-Invert IC’s include:
The TTL (7400 Series) ICs
- 7451 (Dual 2-input 2-wide AND-OR-INVERT gates) containing two independent AOI gates. Y = (A.B) + (C.D)
- 7454 (4-wide 2-input, 3-input AND-NOR gates) contains two independent AOI gates. Where: 1Y = (1A.1B)+(1C.1D) 2Y = (2A.2B)+(2C.2D)
- 7464 (4-2-3-2 input) has four AND gates with a different number of inputs (one 4-input, two 2-input, and one 3-input). Y = (ABCD)+(EF)+(GHI)+(JK)
The CMOS (4000 and 74HC Series) ICs
- CD4085 (Dual 2-wide 2-input AOI gate): Similar idea to the TTL 7451 but with additional chip-select/inhibit controls. Y = Inhibit + (A.B) + (C.D)
- CD4086 (Expandable 4-wide 2-input AOI gate): Additional INHIBIT/EXP input and an ENABLE/EXP input allows linking to more chips to increase the number of AND terms and therefore the “width” of the sum.
- 74HC51 High-speed CMOS version of the 7451 dual AND-OR-Invert with two distinct gates (a 2-wide 2-input gate and a 2-wide 3-input gate). Allows for compatibility with modern 5V microcontrollers and breadboard power supplies.
Wide vs. Input
What is the difference between “wide” and “input” with regards to an AOI gate. In an AND-OR-Invert (AOI) logic gate, “wide” refers to the number of AND gates, while “input” refers to how many signals go into each of those individual AND gates. Basically, how many parallel AND gate paths feed into the OR gate.
Thus a “2-wide 3-input” AOI gate means the chip has 2 internal AND gates (2-wide) with each AND gate having 3 individual inputs. So a 4-wide 2-input means four 2-input AND gates across, and so on.
Complex or asymmetrical AOI gates, such as a “3-wide, 2-2-3-input” gate simply means that there are 3 AND gates feeding the output. The first has 2 inputs, the second has 2 inputs, and the third has 3 inputs. Something like the TTL 74LS54 has a 4-wide 2-input and 3-input AND-NOR gate combinations a shown.
TTL 74LS54 AND-NOR Gate

Schematic Diagram of the TTL 74LS54 AOI IC

The NAND-AND Equivalent Circuit
We have seen above that the AND-OR-Invert function is useful for implementing complex logic expressions efficiently by combining multiple logic operations into one single digital circuit. However, one of its main disadvantages is that it uses three separate logic gates. The AND, OR, and NOT to create one single AND-OR-Invert (AOI) function.
One way to overcome this problem is to create the AND-OR-Invert function using just one single type of universal logic gate, the NAND (NOT AND) gate. That is by combining NAND gates together, we can replicate the AOI function without needing separate AND, OR, and NOT gates thereby reducing the number of different types of logic gates required.
The NAND Gate Function
The Logic NAND Gate can be used to implement any other Boolean function or gate simply by connection two or more NAND (NOT AND) gates together. This ability to create equivalent AND, OR and NOT gates using just one logic gate, makes the NAND gate a Universal Logic Gate.
The operation of the NAND gate is the same as the AND gate except that its output is inverted. Then you can think of a Boolean NAND Function as an AND function but with an inverter (NOT) at its output and as such we can use NAND gates to build an equivalent to the AND-OR-Invert circuit.
The logic NAND gate is given a symbol whose shape is that of a standard AND gate but with a circle (inversion bubble) at its output to represent the NOT function within its logical operation. The NAND gate symbol and corresponding truth table is given as:
2-input NAND Gate and Truth Table
| Symbol | Truth Table | ||
2-input NAND Gate
|
B | A | Q |
| 0 | 0 | 1 | |
| 0 | 1 | 1 | |
| 1 | 0 | 1 | |
| 1 | 1 | 0 | |
Implementation of Universal Logic Gates using only NAND Gates
Because NAND gates are readily available in integrated circuit form, such as the 7400 (or the 74LS00 or 74HC00) quad 2-input NAND TTL chip which has four individual NAND gates within one single IC package. We can use a single 7400 TTL chip to produce all the Boolean functions of: AND, OR and NOT as shown.

Since an inverted-input OR gate is perfectly equivalent to a standard NAND gate, we can create the AND-OR-Invert function using NAND-AND gates as follows:
AOI Function Using NAND Gates

While the above AOI equivalent multi-level NAND gate circuit will work, in this form it requires eight individual NAND gates to realise the same Boolean function. However, we can see that the transition between the output of the AND stage and the input of the OR stage uses two sets on NANDs connected as inverters (NOT Gates).
Then we can simplify the switching function because the “extra” inversions cancel each other out in the second stage reducing the circuit down to four NAND gates as shown:
NAND Equivalent of AND-OR-Invert

Then while the implementation of the AND-OR-Invert function can be realised using just two gates in the AND-NOR configuration. The use of universal NAND gates is obviously a handy feature because we can be combine other NAND gates together to form all other possible logic gates using just one multigate 2-input NAND IC package such as the TTL 74LS00, or the CMOS 4011 instead.
We can also verify that the output level of the NAND circuit responds correctly to all 16 possible input-level combinations using a truth table remembering that the Boolean expression required for the AND-OR-Invert function is: (A.B) + (C.D)
NAND-AND Gate Truth Table
| D | C | B | A | A.B | C.D | Q |
| 0 | 0 | 0 | 0 | 1 | 1 | 1 |
| 0 | 0 | 0 | 1 | 1 | 1 | 1 |
| 0 | 0 | 1 | 0 | 1 | 1 | 1 |
| 0 | 0 | 1 | 1 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 0 | 1 | 0 |
| 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 1 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 1 | 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 1 | 1 | 0 | 0 | 0 |
AND-OR-Invert Tutorial Summary
We have seen here that the AND-OR-Invert (AOI) is a logic function combining AND, OR, and NOT operations to implement sum-of-products (SOP) expressions efficiently.
It is constructed by using multiple-input AND gates which take the input variables and produces a product term (a logical AND of inputs). These product terms correspond to the “products” in the sum-of-products expression.
The outputs of all the input AND gates are fed into one single OR gate which sums (logical OR) all the product terms produced by the AND stages. The output of the OR gate is then fed into an inverter (NOT gate) which complements the OR gate’s output. That is it produces an inverted SOP expression.
We have also seen that the AND-OR-Invert function can also be implemented using AND-NOR gates as well as NAND-AND gates because NAND (and NOR) gates can replicate any basic logic operation (AND, OR, NOT).
AOI logic gates such as the TTL 7454 or 7464 are useful because they combine multiple logic functions into a single gate structure with the AOI logic built at the transistor level. However, when designing a new combinational circuit and cannot source these AOI logic IC chips. Then as we have seen, AOI gate equivalents can be constructed using basic TTL or CMOS NAND gates as shown above.
The post AND-OR-Invert Circuit appeared first on Basic Electronics Tutorials.
View more at: https://www.electronics-tutorials.ws/logic/and-or-invert-gate.html
Credit- Basic Electronics Tutorials. Distributed by Department of EEE, ADBU.
Curated by Jesif Ahmed.

تصميم وتنفيذ التركيبات الكهربائية للمباني
يمكنك الآن تحميل الكتاب مجانًا من خلال الرابط 
كتاب مهم لكل مهندس يعمل في مجالات القوى الكهربائية، التشغيل، الصيانة، الاختبارات، والحماية.
يمكنكم تحميل الكتاب والاستفادة من محتواه القيم لتطوير معارفكم في مجال حماية نظم القوى الكهربائية.
إنشاء ورسم المخططات الكهربائية.





