Digital circuits

In this topic we are going to learn about the Different logic gated used in the Digital circuits.

Before starting with that , first lets see the difference between Analog and Digital and why the World is moving toward the Digital technology

Analog
Digital
Less Bandwidth. Large Bandwidth.
More accurate. Less accurate due to the Quantization error that can not be avoided or corrected.
Low noise immunity. High noise immunity as the amplitude of the digital has two levels only and the channel coding(error correcting codes) can be used.
Low level of security. High level of security as you can use Encryption(Ciphering) and Authentication .
No signal conditioning and processing are used. Support complex signal conditioning and processing techniques such as source coding, encryption and equalization.
Low QOS. High QOS.
You can use FDM only. You can use FDM, TDM, CDM multiplexing techniques.
In mobile communications, analog supports voice service only. In mobile communications, digital supports voice, SMS, data(you can access internet), images and video call.
More difficult to design than Digital Easily designed using software


Logic Gates

Logic gates are the basic building blocks of any digital system. It is an electronic circuit having one or more than one input and only one output. The relationship between the input and the output is based on a certain logic. Based on this, logic gates are named as AND gate, OR gate, NOT gate etc.

In electronics, a logic gate is an idealized or physical device implementing a Boolean function; that is, it performs a logical operation on one or more binary inputs and produces a single binary output.

In digital logic design only two voltage levels or states are allowed and these states are generally referred to as Logic “1” and Logic “0”, High and Low, or True and False. These two states are represented in Boolean Algebra and standard truth tables by the binary digits of “1” and “0” respectively.



1.    AND Gate


An AND Gate has 2 or more inputs. Unless, all the inputs are true (i.e. logic 1), the output will always be false (i.e. logic 0). It can be denoted by the word ‘AND’ between two inputs or using a ‘.’ indicating a multiply. The output can be represented as:


Logic diagram :


Truth Table


Here, A and B are the two Inputs.

Unless both the inputs are 1 the output remain to be 0.



2.    OR Gate


An OR Gate has 2 or more inputs. Unless, all the inputs are false (i.e. logic 0), the output will always be true (i.e. logic 0). This means even if any one input (or condition) is true the output is true. It can be denoted by the word ‘OR’ between two inputs or using a ‘+’ indicating. The output can be represented as:



Logic diagram :


Truth Table :


Similar to AND gate, A and B are the two inputs here.

Any one input being true (logic 1), results in true as output.


3.    NOT Gate


NOT gate is also known as Inverter. It has one input A and one output Y. This means, If the input is true, the output is false and vice versa. The output is represented as:


Logic Diagram :


Truth Table :


Here, A is input and B is Output.


4.    NAND Gate


A NOT-AND operation is known as NAND operation. It has n input, where

(n >= 2) and one output. As the name suggests it is the combination of 2 gates AND gate and NOT gate. The output is represented as:


Logic Diagram :


Truth Table :


In NAND gate, The two inputs undergo AND operation first and then the output from AND goes through NOT operation. In this Truth Table, for example, when A and B are logic 0, after applying AND operation the output would be 0. Now the output after undergoing NOT operation would result in 1.


5.    NOR Gate


A NOT-OR operation is known as NOR operation. It has n input (n >= 2) and one output. As the name suggests it is the combination of 2 gates OR gate and NOT gate. The output is represented as:


Logic Diagram :


Truth Table :


In NOR gate, The two inputs undergo OR operation first and then the output from OR goes through NOT operation. In this Truth Table, for example, when A and B are logic 1, after applying OR operation the output would be 1. Now the output after undergoing NOT operation would result in 0.


6.    XOR Gate


XOR or Ex-OR gate is a special type of gate. It can be used in the half adder, full adder and subtractor. The exclusive-OR gate is abbreviated as EX-OR gate or sometime as X-OR gate. It has n input (n >= 2) and one output.


Logic Diagram :


Truth Table :


To keep it simple, when both the inputs are true or false i.e. have the same logic value, the output would be false always. Either of the input changes to true or false would result in logic 1 as output.


7.    XNOR Gate


XNOR gate is a special type of gate. It can be used in the half adder, full adder and subtractor. The exclusive-NOR gate is abbreviated as EX-NOR gate or sometime as X-NOR gate. It has n input (n >= 2) and one output.


Logic Diagram :


Truth Table :


To keep it simple, when both the inputs are true or false i.e. have the same logic value, the output would be true always. Either of the input changes to true or false would result in logic 0 as output.