# Basic Elements of Digital Logic Design

Hi, learners! I hope you all are doing well. Today, the lecture is about the basic elements of digital logic design. Fields like electrical and computer engineering are complex but with the help of multiple techniques such as digital logic designs, the engineers and designers are providing useful results in the computational world. Digital logic design is the system in which numerical values (only 0 and 1) are used as the input and output operations.

There are multiple elements of the systems in digital logic design that collectively, make the circuits for the required operations. Circuits made from DLD are the basic building blocks of complex and larger digital systems such as memory units and microprocessors. We are discussing the fundamental concepts and this lecture will include the core information about the elements of DLD. Here is the list of topics that will be covered today:

- What are digital logic designs?
- What are logic gates and their types?
- How do you divide the digital logic gates into different circuits?
- What are combinational and sequential logic gates?

All these are basics of digital logic designs so let’s start learning.

## Introduction to Digital Logic Design

Digital logic design is the basic circuitry of the digital computer that uses the system of only two values, i.e., HIGH or LOW, 1 or 0, true or false, ON or OFF, etc. These are based on the Boolean algebra. DLD Logic Gates are made with integrated circuits that are responsible for digital calculations.

Basically, the system of digital logic design is made with logic gates. The combination of these logic gates makes the whole system of DLD. These gates get the input in the form of digits and after processing in different ways, provide the required output. Moreover, knowing only the logic gates is not enough. The types of circuit made with these logic gates is important to understand. Therefore, we will discuss the types of logic circuits according to the combination and usage of these logic gates. All these are the basic elements that collectively, make the concept of the digital logic designs in a system.

## Logic Gates in Digital Logic Design

Logic gates are the building blocks of digital logic designs. We can say that digital logic design is all about the workings, values, and combinations of the logic gates. These gates have one or more inputs but the output is only one. The combination and sequence of the input values, according to the particular logic gates, are responsible for the values at the output.

### Boolean Algebra

Boolean algebra is named after George Boole who was a mathematician. It is the fundamental concept of digital logic design because, with this algebra, logical expressions are presented. The binary state representation of data is highly useful and basically, only three operations are included in the Boolean Algebra:

- AND (· or &)
- OR (+ or |)
- NOT (¬ or !)

The advancement in this expression results in the whole digital logic design circuits representation.

### Truth Tables in Digital Logic Designs

The combination of values of the input and their respective output of possible conditions in the logic gates is known as a truth table. The number of rows in a truth table is based upon** 2^n** formula where **n **is the number of inputs. These tables allow the user to understand the working of gates. The division of the logic gate is based on the results in the truth table.

### Types of Logic Gates

Logic gates can be divided into two groups:

- Basic logic gates
- Advanced logic gates

The basic logic gates include AND, OR, and NOT gates. The output of these gates is based on the type of logic gate we are using. Here is the description of all the logic gates with two inputs.

- An AND gate gives the output 1 only when all the inputs are 1.
- An OR gate gives the output 1 every time when any of the inputs is 1.
- The NOT gate is a unary input gate that performs the inversion of the input in the result.

These basic logic gates, with different combinations, make the advanced logic gates. This can be understood with the help of the following points:

- A NAND gate is made when a NOT gate is added to the AND gate. As a result, the output is the inversion of AND gate and the output is 1 every time unless both the inputs are 1.
- A NOR gate is formed when a NOT gate is attached to the OR gate. It results in the inversion of the OR gate and we get the value 1 only when both the inputs are 0.

The exclusive gates give different types of outputs as compared to those we have discussed till now. There are two exclusive gates, EX-OR and EX-NOR.

- The EX-OR (XOR) gate gives the output 1 only when both the inputs are of different types (in the form of 10 or 01) otherwise it gives 0.
- The EX-NOR (XNOR) gate has output 1 whenever the inputs are the same. Otherwise, the output is 0.

## Types of Logic Circuits in DLD

One of the basic elements of digital logic designs is the type of circuits according to their work. These are also known as the logic or combination through which the circuits are made. These concepts are essential to understand the modern computer system. So, if someone is interested to learn the digital logic circuit then one of its pillars is to know the types of logic circuits.

Based upon the working and combination of the logic gates, there are two major sequences in the logic gates:

- Combinational Logic Circuits
- Sequential Logic Circuits

The detail of each of them will help to distinguish between these.

### Combinational Logic Circuits

The combinational logic circuits are the “instant” or current logic circuits. It means, these are only dependent on its input only and there is no role of the previous results made by the logic gates. The gates we have just read lie in the category of combinational logic gates. It is because these were dependent on the present input and produced the output.

In other words, the fundamental logic gates that are AND, OR, NOT, XOR, XNOR, NAND, and NOR are combinational logic gates because the output is based on the current values of the input of these circuits. But the list does not end here. There are multiple examples of combinational logic circuits that are used in digital logic design such as

- Decoder
- Multiplexer
- Demultiplexer
- Adder

Combinational logic circuits have some disadvantages such as the results being slow. These circuits have different advantages such as slow results, glitches, slow computations etc. These are important but slow types of circuits but with the help of some changes, these problems may be solved. This will be clearer when you will learn the next section.

### Sequential Logic Circuits

Sequential logic circuits have memory in them so these not only depend upon the present inputs, but the output of the previous calculation also affects its output. The combinational logic circuits are useful but for the complex calculations, these are not enough. Modern computing requires a lot of information and for this, sequential logic circuits are required.

For complex computational powers, there is a need of remembering the output and it requires memory. Sequential logic circuits have the memory in the form of latches or flip-flops, etc so that the previous results may be saved and the calculator can be carried out.

The circuit of sequential logic circuits is complex than combinational circuits because they have to work with both, previous and stored values. Hence we can say that there are two parts to the sequential logic gates that are basic logic gates such as AND, OR, NOT, OR, etc and the memory elements such as Flip-flops and latches.

The terms latches and flip-flops are somehow, used interchangeably. Both of these have the difference of clock signals. In sequential logic circuits, flip-flops are often used and here is the detail for this.

#### Flip Flops in Sequential Logic Circuits

Flip-flops are the basic sequential circuit that stores the binary information and the output is dependent on the current and the stored bits. Flip flops can store a single bit of information in them that is either 0 or 1. After that, the next output of the circuit the clock signal( we will define soon) will change this state from either 0 to 1 or 1 to 0. Now, the output is changed and the flip flop will wait for the next clock signal to change the output according to the conditions.

#### Clock Signals in Flip Flops

In sequential logic circuits, the clock signal is sued to control the values of flip flops. The sequential logic gates are named so because these are well arranged and sequenced with the calculation performance in the other parts of the computer. We can define the clock signal as

*“The clock signal in the sequential logic circuits is the periodic waveform that changes the two alternative voltage values and has a specific frequency with the duty cycle.“*

The frequency and duty cycle decide how long the flip flop will stay in its higher or lower values. The values of the voltages of the clock signal depend upon the technology used to make the components of the logic circuit.

#### Types of Flip Flops

In sequential circuits, the type of flip-flops matters a lot. The working of the circuit and the storage values depends upon the type of flip-flop used in its circuitry. All these have a small difference in their structure. In flip flops, the input is denoted by the triangle sign and the whole circuit is denoted by a big rectangle.

- D flip-flops (Data or delay flip-flops) are the most basic type of flip-flops and can save only one bit. These are the simplest type and have one input and two outputs usually denoted as Q and Q bar. On the input side, the change in the clock signal result in a change in the input. The Q has the value as the input and Q-bar is the compliment always.
- T Flip Fops are the second type here. They are the Toggle flip flops that are slightly more complex than the previous case. When the clock signal enters the T flip-flop, if the current state of the T flip-flop is 1, the output will change its state. On the other hand, if the current state is 0, there will be no change. In simple words, the current situation of T flip flop will decide whether to change the output after the clock signal enter, or not.
- The third type is the JK flip-flop. It is the only flipflop which has the output that can be predicted generally. It has two inputs named J and K and the combination of both these results in a specific output. Just like the basic logic gates, the JK flip-flops have a specific truth table.

In addition to the flip flops, registers, counters, and state machines are common examples of sequential logic circuits.

Today we learned about the basic element of digital logic design. The logical gates are the basic element but the information on the types of circuits is also important in DLD. Once the logic gates are known, the users can design different logical circuits either these are combinational or sequential logic gates. The type of circuit and components decide the working of the circuit and different concepts such as truth tables, Boolean algebra, clock cycles, etc are important to understand this. We hope you find this article useful.