Logic Circuit

Logic Gates A fundamental component of digital circuits, a logic gate is a basic building block. Typically, these gates possess two inputs and one output. At any given moment, each terminal is in either a low (0) or high (1) binary condition. The state of a terminal in a logic gate can frequently change as […]

Logic Gates

A fundamental component of digital circuits, a logic gate is a basic building block. Typically, these gates possess two inputs and one output. At any given moment, each terminal is in either a low (0) or high (1) binary condition. The state of a terminal in a logic gate can frequently change as the circuit processes data. Functioning in a logical manner, the gate processes one or more input signals. Based on the input value or voltage, the logic gate will produce either a ‘1’ for ON or a ‘0’ for OFF.

The three primary logic gates are AND, OR, and NOT.

 

Binary Code

Logic gates operate within a digital framework and employ a binary numbering system, known as binary code. This language, consisting solely of the numbers 1 or 0, is the same as that used by computers.

 

Inputs And Outputs

Gates feature two or more inputs, with the exception of a NOT gate, which has only one input. Regardless of the number of inputs, all gates have a single output. Typically, inputs and outputs are labeled using letters such as A, B, C, etc.

 

Logic Symbol Of The “AND” Gate

AND Gate

 

How does the AND gate work?

 

An ‘AND’ gate operates akin to two or more switches in series. For the lamp (output) to turn on, all switches must be closed (ON or with a value of 1). If any of the inputs are not ‘ON,’ the output remains ‘OFF.’

 

TRUTH TABLE FOR “AND” GATE

INPUT INPUT OUTPUT

A         B          C

0          0          0

0          1          0

1          0          0

1          1          1

 

For the output value of the AND gate to be ‘1,’ all input values must be ‘1.’ Any other combination of inputs results in a zero output.

 

OR GATE

An ‘OR’ gate is comparable to two or more switches in parallel. Only one switch needs to be closed (ON or with a value of 1) for the lamp (output C) to turn ON with a value of 1.

 

LOGIC SYMBOL FOR “OR” GATE

OR Gate

TRUTH TABLE OF “OR” GATE

INPUT INPUT OUTPUT

A         B          C

0          0          0

0          1          1

1          0          1

1          1          1

 

An input value of ‘1’ in either or both inputs of the OR gate results in an output value of ‘1.’ An input value of ‘0’ for both inputs yields an output of ‘0.’

 

NOT GATE

The NOT gate has a singular input and output. It reverses the input signal value. If the input is ‘1,’ the output is ‘0,’ and vice versa.

LOGIC SYMBOL FOR “NOT” GATE

NOT Gate

TRUTH TABLE FOR “NOT” GATE

INPUT OUTPUT

A         C

0          1

1          0

 

The “NOT” gate, also referred to as an inverter, produces an output that is always the opposite of the input signal.

 

Logic Equations

In addition to depicting the operation of a logic gate through a truth table and grammatical definition, logic equations serve the purpose of representing not only logic gates and circuits but also, employing certain theorems and equivalences, streamlining the equation by reducing the number of terms involved. In logic equations, each Boolean variable is assigned a letter or symbol, similar to the algebraic representation of unknown numerical values using letters. This approach is known as Boolean algebra.

 

Symbolic logic encompasses values, variables, and operations, where TRUE is denoted as 1, and FALSE as 0. Variables are expressed by letters and can have values of either 0 or 1. Operations are functions involving one or more variables.

 

AND gate equation

The operation of an AND gate can also be articulated through a Boolean algebraic equation. For a 2-input AND gate, the equation is:

X = A dot B

The symbol for the AND gate operation is a center dot, representing conjunction. This equation signifies that the output of the gate is a logic 1 when both A and B inputs are in their logic 1 states.

 

OR gate equation

The Boolean algebraic expression for an OR gate is given as:

X = A + B

This equation conveys that the output of the gate is a logic 1 when either A or B inputs are in their logic 1 states.

 

NOT gate equation

The operation of a NOT gate can be expressed by a Boolean algebraic equation:

[ X = barA ]

Here, a complement bar is placed over the assigned input letter. The expression is read as “X is equal to not A,” indicating that the output state is the opposite of the logic state applied to the input.

 

Uses of Logic Gates

Logic gates are indeed the fundamental components of digital electronics, constructed by combining transistors to perform various digital operations such as logical OR, AND, and NOT. Every digital device, including computers, mobile phones, calculators, and digital watches, contains logic gates. The utility of logic gates can be elucidated through examples, such as the single-bit full adder in digital electronics, which is a logic circuit performing the logical addition of two single-bit binary numbers.

 

These are gates that are formed from a combination of two logic gates. There are two types of alternative logic gates:

 

NAND GATE

A NAND gate is the combination of an AND gate and NOT gate. It operates the same as an AND gate but the output will be opposite. Remember, the NOT gate does not always have to be the output leg; it could be used to invert an input signal also.

Logic Symbol For The “NAND” Gate

 

NAND Gate

Notice the circle on output C.

TRUTH TABLE FOR THE “NAND” GATE

INPUT INPUT OUTPUT

A         B          C

0          0          1

0          1          1

1          0          1

1          1          0

 

 

Nand Gate Equation

The NAND gate operation can also be expressed by a Boolean algebra equation. For a 2 – input NAND gate, the equation is:

X = A.B

This equation read X equal to A and B NOT, which simply means that the output of the gate is not a logic 1 when A and B inputs are their 1 states.

 

NOR GATE

A NOR gate is the combination of both an OR gate and NOT gate. It operates the same as an OR gate, but the output will be the opposite.

NOR Gate

TRUTH TABLE FOR THE “NOR” GATE

INPUT INPUT OUTPUT

A         B          C

0          0          1

0          1          0

1          0          0

1          1          0

 

NOR GATE EQUATION

The NOR gate operation can also be expressed by a Boolean algebra equation. For a 2 – input NAND gate, the equation is:

X = A + B

The expression is the same as the OR gate with an over bar above the entire portion of the equation representing the input. This equation read X equal to A or B NOT, which simply means that the output of the gate is not a logic 1 when A or B are in their 1 states.

 

Uses of Logic Gates

Logic gates are in fact the building block of digital electronics, they are formed by the combination of transistors (either BJT or MOSFET) to realise some digital operations like logical OR, NOT, AND etc. Every digital product like computers, mobile phones, calculators, even digital watches contains logical gates.

 

XOR GATE

The XOR (exclusive – OR) gate acts in the same way as the logical “either or”. The output is “True” if either but not both, of the inputs are “true”. The output is “false” or if both inputs are “true”.

Logic Symbol For “XOR” Gate

XOR Gate

TRUTH TABLE FOR THE “XOR” GATE

INPUT INPUT OUTPUT

A         B          Y

0          0          0

0          1          1

1          0          1

1          1          0

 

XOR COMPARATOR

Comparator is a combinational logic circuit that compares the magnitudes of two binary quantities to determine which one has the greater magnitude. In order word, comparator determines the relationship of two binary quantities. A XOR can be used as basic comparator.

As you can see, the only difference between these two symbols is that the XNOR has a circle on its output to indicate that the output is inverted.

 

XOR Combination

One of the most common uses for XOR gates is to add two binary numbers. For this operation to work, the XOR gate must be used in combination with an AND gate.

XNOR Combination1

To understand how the circuit works, review how binary addition works:

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 10

If you wanted, you could write the results of

each of the preceding addition statements by

using two binary digits, like this:

0 + 0 = 00

0 + 1 = 01

1 + 0 = 01

1 + 1 = 10

When results are written with two binary digits, as in this example, you can easily see how to use an XOR and an AND circuit in combination to perform binary addition.

If you consider just the first binary digit of each result, you’ll notice that it looks just like the truth table for an AND circuit and that the second digit of each result looks just like the truth table for an XOR gate.

The adder circuit has two outputs. The first is called the Sum, and the second is called the Carry. The Carry output is important when several adders are used together to add binary numbers that are longer than 1 bit.

Related Posts:

Secondary Storage

Memory Unit

Central Processing Unit (CPU) | Memory Unit, Control Unit & ALU

Computer Hardware

Internet | Meaning, Terminologies, Features, Benefits & Internet Services

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top