Logic Gates

Logic Gates

Published by: Nuru

Published date: 23 Jun 2021

Logic Gates Photo

Logic Gates

Logic gates are building blocks of any digital computer. They have one or more than one inputs and only one output. Inputs and output values are the logical values true(1) and false(0). They are also called combinational logic gates.

  • Logic gates are electronic circuits that operate on one or more input signals to produce an output signal.
  • Electrical signals such as voltages or currents exist throughout a digital system in either one of two recognizable values (bi-state 0 or 1). Voltage-operated circuits respond to two separate voltage ranges that represent a binary variable equal to logic 1 or logic 0.
  • Digital logic gates are the physical building blocks of integrated circuits used for the execution of logical operations or tasks by
    utilizing the Boolean logic.

The graphical symbols and truth tables of eight gates are shown below;

Logic gates

Note:

  • These circuits, called gates, are blocks of hardware that produce a logic-1 or logic-0 output signal if input logic requirements are satisfied.
  • Note that four different names have been used for the same type of circuits: digital circuits, switching circuits, logic circuits, and gates.
  • AND and OR gates may have more than two inputs.
  • NOT gate is a single input circuit, it simply inverts the input.
  • AND, OR, and NOT are the Basic Gates.
  •  NAND and NOR gates require only 2 transistors.(Why?)
  • AND and OR need 3 transistors. (Why?)
  • AND/OR can take any number of inputs.
  • AND = 1 if all inputs are 1.
  • OR = 1 if any input is 1.
  •  Similar for NAND/NOR.

Logic gates

Explanation of the above timing diagram:

The two input signals X and Y to the AND and OR gates take on one of four possible combinations: 00, 01, 10, or 11. These input signals are shown as timing diagrams, together with the timing diagrams for the corresponding output signal for each type of gate. The horizontal axis of a timing diagram represents time, and the vertical axis shows a signal as it changes between the two possible voltage levels. The low level represents logic 0 and the high level represents logic 1. AND gate responds with a logic-1 output signal when both input signals are logic-1. The OR gate responds with a logic-1 output signal if either input signal is logic-1.

Universal Gates:

The logic gates which can implement any Boolean function without need to use any other gate type is called Universal gates. The NAND and NOR gates are universal gates. In practice, this is advantageous since NAND and NOR gates are economical and easier to fabricate and are the basic gates used in all IC digital logic families.

1. NAND Gates as Universal gates:

To prove that any Boolean function can be implemented using only NAND gates, we will show that the AND, OR, and NOT operations can be performed using only these gates.

A. Implementing an Inverter Using only NAND Gate:

All NAND input pins connected to the input signal A gives an output A’.

Logic gates

 

B. Implementing AND Using only NAND Gates:

The AND is replaced by a NAND gate with its output complemented by a NAND gate inverter.

Logic gates

C. Implementing OR Using only NAND gates:

The OR is replaced by a NAND gate with its output complemented by a NAND gate inverter.

Logic gates

Thus, the NAND gate is a universal gate since it can implement the AND, OR, and NOT functions.

 

2. NOR Gates as Universal gates:

To prove that any Boolean function can not be implemented using only NOR gates, we will show that the AND, OR, and NOT operations can be performed using only these gates.

A. Implementing an Inverter Using only NOR Gate:

All NOR input pins connect to the input signal A gives an output A’.

Logic gates

B. Implementing an AND Using only NOR Gate:

The AND gate is replaced by a NOR gate with all its inputs complemented by NOR gate inverters.

Logic gates

C. Implementing an OR Using only NOR Gate:

The OR is replaced by a NOR gate with its output complemented by a NOR gate inverter.

Logic gates

Thus, the NOR gate is a universal gate since it can implement the AND, OR, and NOT functions.