Open In App

LMN - Digital Electronics

Last Updated : 29 Jan, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Digital electronics deals with systems that use digital signals, represented as 0s and 1s, to process information. It is the backbone of modern devices like computers, smartphones, and calculators. Unlike analog electronics, which works with continuous signals, digital electronics offers higher accuracy, reliability, and noise resistance, making it essential in today’s technology-driven world.

Logic Gates

Logic gates are the basic building blocks of digital circuits. They perform logical operations on one or more binary inputs to produce a single binary output. The output depends on the type of logic gate and the combination of inputs.

Types of Logic Gates

Given Below are the different types of Logic Gates :

  • AND Gate(.)
  • OR Gate(+)
  • NOT Gate(‘)
  • XOR Gate
  • NAND Gate
  • NOR Gate
  • XNOR Gate
  • Buffer Gate
  • Universal Logic Gates

1. AND Gate(.): The AND gate gives an output of 1 when if both the two inputs are 1, it gives 0 otherwise. For n-input gate if all the inputs are 1 then 1 otherwise 0.The AND gate operation is similar to the standard multiplication of 1s and 0s.The (.) dot represents the AND operation.

2. OR Gate(+): The OR gate gives an output of 1 if either of the two inputs are 1, it gives 0 otherwise. For n-input gate if all the inputs are 0 then 0 otherwise 1.The OR Operation is represented by the +.

3. NOT Gate('): The NOT gate gives an output of 1 if the input is 0 and vice-versa. It is also known as Inverters. In Boolean algebra NOT operation is represented by bar over the variable such as A‾A.

4. XOR Gate: The XOR gate gives an output of 1 if either both inputs are different, it gives 0 if they are same. For n-input gate if the number of input 1 are odd then it gives 1 otherwise 0.For a two-input XOR gate it means that the output is true only if exactly one of the inputs is true.

5. NAND Gate: The NAND gate (negated AND) gives an output of 0 if both inputs are 1, it gives 1 otherwise. For n-input gate if all inputs are 1 then it gives 0 otherwise 1.The Term “NAND” can be said as “Not AND”.

6. NOR Gate: The NOR gate (negated OR) gives an output of 1 only if both inputs are 0, it gives 0 otherwise. For n-input gate if all inputs are 0 then it gives 1 otherwise 0.The “NOR” can be said as “NOT OR”.

7. XNOR Gate: The XNOR gate (negated XOR) gives an output of 1 if both inputs are same and 0 if they are different. For n-input gate if the number of input 1 are even then it gives 1 otherwise 0 or if the number of input 0 is even then the output is 1, otherwise 0′. The “XNOR” can be said as “Exclusive NOR”.

8. Buffer Gate: A Buffer Gate is a digital logic gate that amplifies a signal. It doesn’t change the logic state (it outputs exactly what is input), but its primary purpose is to ensure that the signal can drive more circuits without weakening. Essentially, a buffer isolates the input from the output, making the output more robust.

9. Universal Logic Gates: Out of the eight logic gates discussed above, NAND and NOR are also known as universal gates since they can be used to implement any digital circuit without using any other gate. This means that every gate can be created by NAND or NOR gates only.

Introduction-of-Logic-Gates

read more about - Logic Gates

Minimization of Boolean Function

Minimization of a Boolean function involves reducing the number of terms, literals, and gates required to represent a Boolean expression. The goal is to create a simpler and more efficient digital circuit without altering its functionality.

Techniques for Minimizing Boolean Functions

1. Algebraic Simplification:

F(A, B) = AB + Asimplifies to F(A,B)=A

2. Karnaugh Map (K-Map) Method:

  • A visual method for simplifying Boolean expressions with 2, 3, 4, or more variables.
  • Steps:
    1. Construct a K-Map with cells representing truth table outputs.
    2. Group adjacent 1s into power-of-two groups (1, 2, 4, 8, etc.).
    3. Derive a simplified expression by writing terms for each group.

Representation of Boolean Functions

Any Boolean expression can be expressed in two forms:

• Sum of Product form (SOP)
• Product of Sum form (POS)

1. SOP Form

The SOP expression usually takes the forms of two or more variables OR together.

Y = ABC + AB + AC
Y = AB + BC

SOP forms are used to write logical expression for the output becoming logic '1'. Below is the example:

sop

Therefore, Notation of SOP expression is:

f(A, B, C) = Σm(3, 5, 6, 7)
Y = m3 + m5 + m6 + m7
Also, Y = ABC + ABC + ABC + ABC

2. POS Form

The POS expression usually takes the form of two or more OR variables within parentheses, ANDed with two or more such terms.

Example: Y = (A + \overline{B} + C)(\overline{B}C + D)

Each individual term in standard POS form is called maxterm.
POS forms are used to write logical expression for output be coming logic '0'.

we get f(A, B, C) = \pi M(0, 1, 2, 4)

Y = M_0, M_1, M_2, M_4
Y = (A + B + C)(A + B + \overline{C})(A + \overline{B} + C)(\overline{A} + B + C)

read more about - K-Map

Don't Care Condition

  • Some outputs of a Boolean function are irrelevant or unused; these are treated as "don’t care" conditions (denoted as X).
  • Can be grouped as 1s or 0s in K-Maps or Quine-McCluskey for better simplification.

Example: Minimize the following function in SOP minimal form using K-Maps

f = m(1, 5, 6, 11, 12, 13, 14) + d(4)

The SOP K-map for the given expression is: 

Therefore, SOP minimal is, 

f = BC' + BD' + A'C'D + AB'CD

read more about - Don't Care Condition

Important Laws in Boolean Algebra

Here are the De Morgan's Laws, Absorption Law, Domination Law, and Consensus Law in Boolean Algebra:

1. De Morgan’s Laws

De Morgan’s Theorems describe how AND and OR operations interact with NOT:

  • (A · B)’ = A’ + B’
  • (A + B)’ = A’ · B’

2. Absorption Law

The Absorption rule simplifies expressions by eliminating redundant terms:

  • A + (A · B) = A
  • A · (A + B) = A

3. Domination Law (Zero and One Law)

This law defines the dominant elements in Boolean algebra:

  • A + 1 = 1
  • A · 0 = 0

4. Consensus Law

This law eliminates redundant terms in Boolean expressions:

  • A · B + A’ · C + B · C = A · B + A’ · C
  • (A + B) · (A’ + C) · (B + C) = (A + B) · (A’ + C)

Duality Theorem

The Duality Theorem states that every Boolean algebra expression remains valid if we:

  1. Swap AND (·) with OR (+).
  2. Swap 0 with 1 (and vice versa).

For example:

  • The dual of A + (B · C) = (A + B) · (A + C) is A · (B + C) = (A · B) + (A · C).

Combinational Circuits

Combinational circuits are a type of digital circuit in which the output depends only on the current inputs, not on past inputs or previous states. These circuits are built using logic gates like AND, OR, NOT, NAND, NOR, XOR, and XNOR.

combinational-circuit
Combinational Circuit

Basic Examples of Combinational Circuits are:

1. Adders: The most basic arithmetic operation is the addition of two binary digits. A combinational circuit that performs the addition of two 1-bit numbers is called as half adder, and the logic circuit that adds three 1-bit numbers is called as full adder.

  • Half Adder: Adds two single-bit binary numbers (A and B).
    Inputs: A, B
    Outputs: Sum (S), Carry (C).
    Logic:
    S=A⊕B
    C=A⋅B
halfadder
  • Full Adder: Adds three single-bit numbers (A, B, and Carry-in).

A Full Adder adds three inputs: two operands (A, B) and a carry-in (Cin) and produces a Sum (S) and Carry-out (Cout).

  • Sum (S) = A ⊕ B ⊕ Cin
  • Carry-out (Cout) = (A · B) + (B · Cin) + (A · Cin)

2. Subtractors:

  • Half Subtractor: A half subtractor is a combinational logic circuit, which performs the subtraction of two 1-bit numbers. Half Subtractor subtracts one binary digit from another to produce a DIFFERENCE output and a BORROW output.
    Outputs: Difference, Borrow.
  • A Half Subtractor subtracts two bits (A - B) and gives a Difference (D) and Borrow (Bout).
    Difference (D) = A ⊕ B
    Borrow (Bout) = A' · B
Half Subtractor
  • Full Subtractor: Subtracts three single-bit numbers, including Borrow-in.

A Full Subtractor subtracts two operands (A, B) and a Borrow-in (Bin), producing a Difference (D) and Borrow-out (Bout).

  • Difference (D) = A ⊕ B ⊕ Bin
  • Borrow-out (Bout) = A' · (B ⊕ Bin) + (B · Bin)

3. Multiplexers (MUX): A multiplexer is a combinational circuit that has many data inputs and a single output, depending on control or select inputs. For N input lines, log2(N) selection lines are required, or equivalently, for 2n input lines, n selection lines are needed. Multiplexers are also known as “N-to-1 selectors,” parallel-to-serial converters, many-to-one circuits, and universal logic circuits. 

Untitled-Diagram---2024-05-14T094946432
Multiplexer

Implementation of Higher-Order MUX Using Lower-Order MUX

A higher-order multiplexer (MUX) can be built using multiple lower-order MUXes to handle more input lines. This is done by breaking the selection process into smaller steps using additional MUXes.

For example, an 8:1 MUX can be implemented using two 4:1 MUXes and one 2:1 MUX:

  • The two 4:1 MUXes take inputs and provide two outputs.
  • The 2:1 MUX selects one of these outputs based on the highest selection bit.

This method reduces complexity and allows modular circuit design.

4. Demultiplexers (DEMUX): The DEMUX is a digital information processor. It takes input from one source and also converts the data to transmit towards various sources. The demultiplexer has one data input line. The demultiplexer has several control lines (also known as select lines). These lines determine to which output the input data should be sent. The number of control lines determines the number of output lines.

Demulyiplexer

5. Encoders: An Encoder is a combinational circuit that performs the reverse operation of a Decoder. It has a maximum of 2^n input lines and ‘n’ output lines, hence it encodes the information from 2^n inputs into an n-bit code. It will produce a binary code equivalent to the input, which is active High. Therefore, the encoder encodes 2^n input lines with ‘n’ bits. 

Encoder-in-Digital-Logic
Encoder

Priority Encoder

A priority encoder is a digital circuit that converts multiple input lines into a binary code based on priority. If multiple inputs are active, the highest-priority input (the one with the highest index) is encoded in the output.

Key Features:

  • Assigns priority to inputs when more than one is active.
  • Ignores lower-priority inputs when a higher-priority input is present.
  • Commonly used in interrupt controllers and other selection-based applications.

6. Decoders: A decoder is a combinational circuit that converts an n-bit binary input data into 2n output lines, such that each output line will be activated for only one of the possible combinations of inputs. Decoders are usually represented as n-to-2 n line decoders, where n is the number of input lines and 2n is the number of maximum possible output lines.

7. Comparators: The comparator is a combinational logic circuit. It compares the magnitude of two n-bit numbers and provides the relative result as the output. Let A and B are the two n-bit inputs. The comparator has three outputs namely A > B, A = B and A < B. Depending upon the result of comparison, one of these outputs will go high.

N - bit Comparator

Sequential Logic Circuits

Sequential circuits are digital circuits that store and use previous state information to determine their next state. They are commonly used in digital systems to implement state machines, timers, counters, and memory elements and are essential components in digital systems design.

Types of Sequential Circuits

There are two types of sequential circuits:

1. Asynchronous Sequential Circuits: These circuits do not use a clock signal but uses the pulses of the inputs. These circuits are faster than synchronous sequential circuits because there is clock pulse and change their state immediately when there is a change in the input signal.

2. Synchronous Sequential Circuits: These circuits uses clock signal and level inputs (or pulsed) (with restrictions on pulse width and circuit propagation). The output pulse is the same duration as the clock pulse for the clocked sequential circuits. Since they wait for the next clock pulse to arrive to perform the next operation, so these circuits are bit slower compared to asynchronous.


Flip-Flops

The flip-flop is a circuit that maintains a state until directed by input to change the state. A basic flip-flop can be constructed using four-NAND or four-NOR gates. Flip-flop is popularly known as the basic digital memory circuit. It has its two states as logic 1(High) and logic 0(low) states. A flip flop is a sequential circuit which consist of single binary state of information or data. 

Types of Flip-Flops

Given Below are the Types of Flip-Flop:

1. S-R Flip-Flop: In the flip flop, with the help of preset and clear when the power is switched ON, the states of the circuit keeps on changing, that is it is uncertain. It may come to set(Q=1) or reset(Q’=0) state. In many applications, it is desired to initially set or reset the flip flop that is the initial state of the flip flop that needs to be assigned. This thing is accomplished by the preset(PR) and the clear(CLR).

SR-Flip-Flop1


2. J-K Flip-Flop: n JK flip flops, The basic structure of the flip flop which consists of Clock (CLK), Clear (CLR), Preset (PR).

JK-Flip-Flop1

3. D Flip-Flop: The D Flip Flop Consists a single data input(D), a clock input(CLK),and two outputs: Q and Q’ (the complement of Q).

Lightbox

4. T Flip-Flop: The T Flip Flop consists of data input (T), a clock input (CLK), and two outputs: Q and Q’ (the complement of Q).

T-Flip-Flop

read more about - Flip-Flops

Number System

A number system is a method to represent numbers mathematically. It can use arithmetic operations to represent every number uniquely. To represent a number, it requires a base or radix.

Types of Number System

There are four common types of number systems based on the radix or base of the number :

  1. Decimal Number System (Base 10 number system)
  2. Binary Number System (Base 2 number system)
  3. Octal Number System (Base 8 number system)
  4. Hexadecimal Number System (Base 16 number system)

Number System Conversion Methods

A number N in base or radix b can be written as: 

(N)b = dn-1 dn-2 -- -- -- -- d1 d0 . d-1 d-2 -- -- -- -- d-m

In the above, dn-1 to d0 is the integer part, then follows a radix point, and then d-1 to d-m is the fractional part. 

dn-1 = Most significant bit (MSB) 
d-m = Least significant bit (LSB)

1. Decimal to Binary Number System: To convert from decimal to binary, start dividing decimal number by 2, and whatever the reminder getting, writing down from bottom to top, and that will be the binary number representation of the decimal number. And the number contains fractional part, then multiply 2 in the fractional part.

Example: (10.25)10 

2. Binary to Decimal Number System: To convert from binary to decimal, start multiplying the exponent of 2 with each digit of the number in decreasing order. If the number contains fractional part then will divide it by the exponent of 2.

Exaxmple:

(1010.01)2 
1x23 + 0x22 + 1x21+ 0x20 + 0x2 -1 + 1x2 -2 = 8+0+2+0+0+0.25 = 10.25 
(1010.01)2 = (10.25)10 

3. Decimal to Octal Number System: To convert from decimal to octal, start dividing decimal number by 8, and whatever the reminder getting, writing down from bottom to top, and that will be the octal number representation of the decimal number. And the number contains fractional part, then multiply 8 in the fractional part.

Example:

(10.25)10 
(10)10 = (12)8 
Fractional part: 
0.25 x 8 = 2.00 

4. Octal to Decimal Number System: To convert from octal to decimal, start multiplying the exponent of 8 with each digit of the number in decreasing order. If the number contains fractional part then will divide it by the exponent of 8.

Example:

(12.2)8
1 x 81 + 2 x 80 +2 x 8-1 = 8+2+0.25 = 10.25 
(12.2)8 = (10.25)10 

5. Hexadecimal to Binary Number System: To convert from Hexadecimal to Binary, write the 4-bit binary equivalent of hexadecimal.

Example: (3A)16 = (00111010)2 

6. Binary to Hexadecimal Number system: To convert from Binary to Hexadecimal, start grouping the bits in groups of 4 from the right-end and write the equivalent hexadecimal for the 4-bit binary. Add extra 0’s on the left to adjust the groups. 

Example:

1111011011
001111011011
(001111011011 )2 = (3DB)16 

7. Binary to Octal Number System: To convert from binary to octal, start grouping the bits in groups of 3 from the right end and write the equivalent octal for the 3-bit binary. Add 0’s on the left to adjust the groups.

Example:

111101101

111 101 101

(111101101)2 = (755)8

read more about - Number System



Next Article
Article Tags :

Similar Reads