Digital Logic
Digital logic refers to the branch of electronics and computer science that deals with the design and analysis of digital circuits. Digital circuits are composed of basic building blocks called logic gates, which process binary signals (0s and 1s) according to predefined rules. These logic gates perform logical operations such as AND, OR, NOT, NAND, NOR, XOR, and XNOR. Digital logic is fundamental to the operation of digital computers and other digital electronic devices. It involves the representation and manipulation of digital signals using binary digits (bits), where each bit can be in one of
two states: 0 or 1
The main components of digital logic are:
i) Logic Gates: These are the basic building blocks of digital circuits, performing logical operations on one or more binary inputs to produce a single binary output.
ii) Combinational Logic: Combinational logic circuits produce an output based solely on the current input values, with no memory of past inputs. Examples include adders, multiplexers, and decoders.
iii) Sequential Logic: Sequential logic circuits have memory elements (e.g., flip-flops) that enable them to store information about past inputs, allowing them to produce outputs that depend on both current and past inputs. Examples include registers, counters, and finite state machines.
iv) Boolean Algebra: Boolean algebra is a mathematical system used to analyze and simplify digital logic circuits. It deals with operations such as AND, OR, and NOT, and laws such as De Morgan’s theorem and the distributive law.
Types of logic Gates
i) Basic Gates
There are 2 Basic Level Gates:
1) AND Gate: It gives high output only if all inputs are high. If one of the inputs is low, it gives low output. It is also referred as logical multiplication.
2) OR Gate: It gives high output if one of the inputs is high or all the inputs are high. It is also called as digital addition. If all inputs are low, then it gives low output.
3) NOT Gate: It gives inverted output of the input that is zero for 1 and 1 for zero. It is also called as inverter gate.
ii) Exclusive Gates
There are 2 Exclusive Gates. The exclusive are derived from OR gate.
1) X-OR Gate: An XOR gate, which stands for “Exclusive OR” gate, is a digital logic gate with two or more inputs and one output. The output of an XOR gate is high (1) if an odd number of its inputs are high (1), and low (0) if an even number of its inputs are high. Its symbol is ⊕.
A⊕B= (A’⋅B)+(A⋅B’)
2) X-NOR Gate: The XNOR gate, also known as “Exclusive NOR” gate, is a digital logic gate that produces a high output (1) only if both of its inputs are the same ( both 0 or both 1). If the inputs are different, it produces a low output (0). X-NOR gate is inverted form of X-OR Gate. Its symbol is ⊙.
A ⊙ B= (A.B)+(A’.B’)
iii) Universal Gates
Universal gates are logic gates that can be used to implement any other type of logic gate. The two main universal gates are the NAND gate and the NOR gate.
1) NAND Gate: The NAND gate, short for “NOT-AND” gate, is a fundamental digital logic gate with two or more inputs and one output. It produces a low output (0) only when all of its inputs are high (1); otherwise, it produces a high output (1).
2) NOR Gate: The NOR gate, short for “NOT-OR” gate, is fundamental digital logic gate with two or more inputs and one output. It produces a high output (1) only when all of its inputs are low (0); otherwise, it produces a low output (0).
De-Morgan’s Law
1) First law
De-Morgan’s First law states that the complement of the sum of two binary bits is equivalent to the product of their complement. It means that the complement (NOT) of the logical AND of two or more variables is equal to the logical OR of the complements (NOT) of those variables.
It can be represented as (A+B)’ = (A’.B’).
Truth Table:
Diagram: De-Morgan’s first Law
2) Second Law
This law states that the complement of the product of two binary bits is equivalent to the complement of their sum. It means that the complement (NOT) of the logical OR of two or more variables is equal to the logical AND of the complements (NOT) of those variables.
It can be represented as: (A.B)’=(A’+B’).
Truth Table:
Diagram: De-Morgan’s Second Law
Realization of gates using Universal gates: NAND
1) OR Gate using NAND Gate
2) NOT Gate using NAND Gate
3) AND Gate using NAND Gate
4) NOR Gate using NAND Gate
5) X-OR Gate Using NAND Gate
6) X-NOR Gate using NAND Gate
Realization of Gates using NOR Universal Gate
1) OR Gate
2) AND Gate
3) NAND Gate using NOR Gate
4) NOT Gate using NOR Gate
5) X-OR Gate using NOR
6) X-NOR Gate using NOR