Open access peer-reviewed chapter

# Digital System Design

By Janani Rajaraman

Submitted: October 5th 2020Reviewed: April 7th 2021Published: April 27th 2021

DOI: 10.5772/intechopen.97611

## Abstract

The main objective of this chapter is to study and design various combinational circuits like Verification of Boolean Expression, Multiplexer, Demultiplexer Circuits, Code Converters circuits using LabVIEW tools. This chapter will make the user more comfortable towards learning of Design of Digital Systems. The various types of Boolean Expressions like SOP and POS, Combinational circuits like Adder circuit (Half adder and full adder), Subtractor circuit (Half Subtractor, Full Subtractor), some code converters like Binary to Gray and Gray to Binary, BCD to Gray and Gray to BCD and also Sequential circuits with D flip flop is also being carried out using this LabVIEW.

### Keywords

• Combinational Circuits
• Multiplexer
• Code Converters

## 1. Introduction

The field of electronics are classified into two broad group namely analog electronics and digital electronics. Analog electronics deals with signals that are continuous with respect to time by nature such as any noise signal, any video streaming etc. and digital electronics deals with signals that are discontinuous or discrete with respect to time. The electronic amplifier such as op-amp circuit helps to amplify the continuous signals and such signals are termed as analog signalsand the circuit used for such applications are called analog circuits.On the other hand, the discrete signals are fed as the input to the computer by electronic switches, which as two distinct values such as HIGH level and LOW level [1]. This discrete signals are further converted in to electronic signals with the help of suitable converters. Such discrete signals are called as digital signalsand the electronic circuit used for such operation are termed as digital circuits.

## 2. Boolean Algebra

In a discrete signals the two distinct values such as HIGH and LOW has equivalent voltage levels such as 5 volts and 0 volts respectively. This two distinct levels are represented as value 1 and value 0 respectively. Any algebraic functions performed with respect to this discrete values are defined as Boolean algebradeveloped by George Boole. He also developed various suitable theorems associated with this boolean for manipulation and simplification. There are set of basic definitions which are assumed to be true which defines all the information about the system. The following are the basic definition used in boolean algebra.

• NOT:The NOT of a variable is 1 if and only if, the variable itself is 0 and vice versa

• AND:The AND of two variables is 1 if and only if boththe variables are 1.

• OR:The OR of two variables is 1 if either (or both)of the variables is 1.

• XOR:The Exclusive-OR of two variables is 1 if eitherof them but not bothis 1

## 3. Combinational logic circuits

There are two types of circuits exists in the digital system, Combinational Logic Circuits and Sequential Circuits. A combinational logic circuit is a circuit where the output depends on the combination of present input state. The set of operations which these combinational circuits performs logically by a set of Boolean functions. A sequential logic circuit is a circuit where the output depends on the combination of present input state and past input or previous input values. The previous output values are stored in the memory elements.

A combinational circuit consist of variables for input and output, and basic logic gates to perform the boolean function. The output signals are generated according to the inputs as well as the logic circuits employed. Here both the input and outputs are binary values either 1 or 0. Figure 1 shows the simple block diagram of combinational logic circuits with ninput variables and moutput variables. If there are nnumber of inputs to the circuit then 2npossible combinations of input states but each combination can produce only one output state [2]. For instance if the combinational logic circuit has 2 inputs A and B then there can be 4 possible input states.

.

### 3.1 Design procedure

The following are the steps considered while designing a combinational logic circuits.

• The first step is the statement of the problem for which this combinational circuit need to be designed

• Definition of the input and output variables and the variable name for inputs and outputs.

• Formation and tabulation of truth table which describes the relationship between the input and output.

• The simplified boolean expression is obtained for the output variable with the help of minimization techniques or Karanaugh map.

• The logical diagram using logic gates is realized for the simplified expression obtained in the previous step

• In practical design and real time implementation one should consider to use minimum number of gates.

### 3.2 Arithmetic circuits

A combinational circuit that performs the addition of two bits is called half-adder. When the augend and addend numbers contain more significant digits, the carry obtained from the addition of two bits is added to the next higher order pair of significant bits. The combinational circuit that performs the addition of three bits is called a full-adder. The full adder can also be obtained by using two half adder circuits.

A half adder is a combination logic circuit that uses two inputs (A and B) and two outputs (Sum S and Carry C). Table 1 shows the truth table the various combinations of inputs and its corresponding outputs. The output Sum S and Carry C is obtained and the k-map is used to get the logical equation. The Boolean expressions are

Input VariablesOutput Variables
ABSum SCarry C
0000
0110
1010
1101

### Table 1.

SumS=ABE1
CarryC=ABE2

Figure 2 shows the design and implementation of half adder circuit in LabVIEW environment, where the front panel that two inputs Input A and Input B, the outputs are Sum and Carry [3]. The block diagram in LabVIEW environment shows the logic gate implementation for the above obtained expression.

A full adder is a combination logic circuit that uses three inputs (A, B and Cin) and two outputs (Sum S and Carry C). Table 2 shows the truth table the various combinations of inputs and its corresponding outputs. The output Sum S and Carry C is obtained and the k-map is used to get the logical equation.

Input VariablesOutput Variables
ABCinSum SCarry C
00000
00110
01010
01101
10010
10101
11001
11111

### Table 2.

SumS=ABCinE3
CarryC=AB+BCin+CinAE4

Figure 3 shows the design and implementation of full adder circuit in LabVIEW environment, where the front panel that two inputs Input A, Input B, and Input Cin, the outputs are Sum and Carry. The block diagram in LabVIEW environment shows the logic gate implementation for the above obtained expression.

#### 3.2.2 Subtractor circuits

A combinational circuit that performs the difference of two bits is called half-subtractor. When the first input (minuend) is 0 and the second input(subtrahend) is 1 then there exists a output variable as Borrow.The combinational circuit that determines the difference of three bits is called a full-subtractor.

#### (i) Design of half-subtractor

A half subtractor is a combination logic circuit that uses two inputs (A and B) and two outputs (Difference D and Borrow B). Table 3 shows the truth table the various combinations of inputs and its corresponding outputs. The output Difference D and Borrow B is obtained and the k-map is used to get the logical equation. Figure 4 shows the design and implementation of half subtractor circuit in LabVIEW environment, where the front panel that two inputs Input A and Input B, the outputs are Difference and Borrow

Input VariablesOutput Variables
ABDifference DBorrow B
0000
0111
1010
1100

### Table 3.

Truth Table – Half Subtractor.

Difference=ABE5
Borrow=A¯BE6

#### (ii) Design of Full-subtractor

A full subtractor is a combination logic circuit that uses three inputs (A, B and Bin) and two outputs (Difference D and Borrow B). Table 4 shows the truth table the various combinations of inputs and its corresponding outputs. The output difference D and Borrow B is obtained and the k-map is used to get the logical equation

Input VariablesOutput Variables
ABBinDifference DBorrow B
00000
00111
01011
01101
10010
10100
11000
11111

### Table 4.

Truth Table – Full Subtractor.

DifferenceD=ABBinE7
BorrowB=A¯B+ABE8

Figure 5 shows the design and implementation of full subtractor circuit in LabVIEW environment, where the front panel that two inputs Input A, Input B, and Input Bin, the outputs are Difference D and Borrow Ouptut. The block diagram in LabVIEW environment shows the logic gate implementation for the above obtained expression.

### 3.3 Multiplexer and demultiplexer

The most important form of a combinational circuit and which is widely used in the field of communication is Multiplexer and Demultiplexer Circuits.The multiplexer circuit is used to transfer large number of channels carrying information to a smaller number of channels. Such circuit used to transmit digital data or binary information is called as data selector or digital multiplexer.In this data selector, the input line is selected according to the combination of select lines, suppose if there exists 2ninput line then the number of select line is nand there will be only oneoutput line. For example in a 4x1 multiplexer, the number of input lines is 4 (22)which shows there exists of 2select lines. In these multiplexer circuits the inputs are named as I0, I1, I2 and I3and the two select lines are named as S0and S1. Table 5 shows the various combinations of select line and corresponding input line is selected and obtained as output Y [4]. The boolean expression for the output Y is given below. Figure 6 shows the Front panel and Block Diagram of 4x1 multiplexer. This design can be extended for higher versions like 8x1 and 16x1 types of multiplexer.

Selection InputsInput ChannelsOutput
S1S0I0I1I2I3Y
000XXX0
001XXX1
01X0XX0
01X1XX1
100X0X0
101X1X1
110XX00
111XX11

### Table 5.

Truth Table – 4*1 Multiplexer.

The Boolean expressions are

OutputY=S0¯S1¯I0+S0¯S1I1+S0S1¯I2+S0S1I3E9

The term demultiplex is just a opposite way of multiplexer, here in this combinational circuit there are one input channel and distributes the data over several channels. Therefore if the number of input channel is 1then the number of output will be 2n output channels. The combination of select lines control the output channel through which the input data must be transmitted. Table 6 gives the truth table for 1-to-8 demultiplexer, the front panel and block diagram for 1-to-8 demultiplexer is shown in Figure 7.

Selection InputsOutput Channels
S2S1S0Y0Y1Y2Y3Y4Y5Y6Y7
000Y0 = I0000000
0010Y1 = I000000
01000Y2 = I00000
011000Y3 = I0000
1000000Y4 = I000
10100000Y5 = I00
110000000Y6 = I0
1110000000Y7 = I

### Table 6.

Truth Table – 1*8 Demultiplexer.

The selection input line S0, S1, S2 are activated according to the bit combination for each output as given in Eq. (10) to Eq. (17). For instance, if the selection input combination is 010, the input Iis transmitted to Y2. The Boolean expressions for each output line is given below

Y0=S2¯S1¯S0¯IE10
Y1=S2¯S1¯S0IE11
Y2=S2¯S1S0¯IE12
Y3=S2¯S1S1IE13
Y4=S2S1¯S0¯IE14
Y5=S2S1¯S0IE15
Y6=S2S1S0¯IE16
Y7=S2S1S0IE17

### 3.4 Code converters

For the same discrete elements of information, there are several different codes available, resulting in the use of different codes for different digital systems. It’s sometimes necessary to connect two digital blocks that use different coding systems. Hence a conversion digital circuit is designed and implemented between two digital systems to use information of one digital system to another. The input lines must provide the bit combinations of elements as designed by binary code A and the output is generated by the bit combinations of code B. This code converters circuit consisting of logic gates to perform this transformation operations. Some of the few code conversion techniques are discussed below.

#### 3.4.1 Binary to gray code converters

Table 7 shoes the conversion of 4-bit binary code to its equivalent gray code values. The 4 bit binary code input is defined as B0, B1, B2, B3 and corresponding output 4-bit gray is defined as G0, G2, G3, and G4 as shown in Figure 8. The corresponding boolean expression for binary to gray code conversion is given below

B0B1B2B3G0G1G2G3
00000000
00010001
00100011
00110010
01000110
01010111
01100101
01110100
10001100
10011101
10101111
10111110
11001010
11011011
11101001
11111000

### Table 7.

Truth Table – Binary to Gray Converter.

G0=B0E18
G1=B0B1E19
G2=B2B1E20
G3=B3B2E21

#### 3.4.2 Gray to binary code converters

Gray code is also called as Reflected Binary Code (RBC), Reflected Binary (RB) or Gray code, Cyclic Code, is defined as an ordering of the binary number system such that each incremental value can only differ by one bit. The main objective in this code converter is that while traversing from one step to another step, one bit in the code group changes as in Figure 9. This gray code is not applicable for arithmetic operations, but it is applicable in analog to digital converters, as well as error correction techniques in digital communications (Table 8).

G3G2G1G0B3B2B1B0
00000000
00010001
00110010
00100011
01100100
01110101
01010110
01000111
11001000
11011001
11111010
11101011
10101100
10111101
10011110
10001111

### Table 8.

Truth Table – Gray to Binary Code Converter.

B3=G3E22
B2=G2G3E23
B1=G1G2G3E24
B0=G1G2G3G0E25

#### 3.4.3 Seven segment decoder

A digital decoder IC is a device that converts one digital format into another, and one of the most commonly-used device for doing this is the binary-coded decimal (BCD) to 7-segment display decoder. The 7-segment light emitting diode (LED) provides a convenient way of displaying information or digital data in the form of numbers, letters and alphanumeric characters. Typically, 7-segment displays consist of seven same coloured LEDs (called segments) within a single display package. In order to display the correct character or number, the correct combination of LED segments has to be illuminated. This LabVIEW program demonstrates the illumination of each segment by displaying hex values (0000 through FFFF) in decimal form from 0 through 9 and A through F. The standard 7-segment LED display has eight input connections, one for each LED segment and one that acts as a common terminal or connection for all internal display segments. Some displays also have an additional input pin for displaying a decimal point.

#### 3.4.4 Types of digital display

There are two important types of 7-segment LED displays, namely, common cathode and common anode. In Common cathode display (CCD) display, all cathode connections of the LEDs are joined together to a low logic or ground or 0 [5]. The individual segment is illuminated by the application of high logic or + Vcc or 1 to the individual anode terminal. In Common anode display (CAD) In a CAD, all anode connections of the LEDs are joined together to a high logic or + Vcc and individual segments are illuminated by connecting individual cathode terminals to low logic or ground as shown in Figure 10. The boolean expressions of the outputs.

b=A¯CD+ACD+BC¯+BD¯E27
c=BC¯+B¯D+C¯D+A¯B+AB¯E28
d=BCD¯+B¯DC+A¯CD¯+BC¯D+AC¯+ABD¯E29
e=B¯D¯+CD¯+AB+ACE30
f=A¯BC¯+CD¯+BD¯+AB¯+ACE31
g=A¯BD¯+BC¯D+AB¯+AC+CB¯E32

## 4. Conclusion

This chapter brings an overview of design of combinational logic circuits in LabVIEW. This LabVIEW programming tool is a graphical representation tool which helps the designer to simplify the design work. This tool can be further extended for designing sequential circuits as well as PLA and PAL logic design.

## Acknowledgments

The author would like to thank the Department of Electronics and Instrumentation Engineering of Sri Chandrasekharendra Saraswathi Viswa Mahavidyalaya, Enathur, Kanchipuram, India, for providing online library facility as well as for permitting to use the lab environment.

chapter PDF
Citations in RIS format
Citations in bibtex format

## More

© 2021 The Author(s). Licensee IntechOpen. This chapter is distributed under the terms of the Creative Commons Attribution 3.0 License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## How to cite and reference

### Cite this chapter Copy to clipboard

Janani Rajaraman (April 27th 2021). Digital System Design, LabVIEW - A Flexible Environment for Modeling and Daily Laboratory Use, Riccardo de Asmundis, IntechOpen, DOI: 10.5772/intechopen.97611. Available from:

### Related Content

Next chapter

#### Analyzing and Presenting Data with LabVIEW

By Ahmet Mavi, Ahmet Özmen and Mehmet Ertuğrul

#### Modeling, Programming and Simulations Using LabVIEW™ Software

Edited by Riccardo de Asmundis

First chapter

#### Avanced Total Lab Automation System (ATLAS)

By Christoph Wagner, Andreas Genner, Georg Ramer and Bernhard Lendl

We are IntechOpen, the world's leading publisher of Open Access books. Built by scientists, for scientists. Our readership spans scientists, professors, researchers, librarians, and students, as well as business professionals. We share our knowledge and peer-reveiwed research papers with libraries, scientific and engineering societies, and also work with corporate R&D departments and government entities.