Logic gates for beginners

Script, 2015

47 Pages





1. Introduction

2. Analog and digital signals

3. Binary number system

4. Binary to decimal conversion

5. Decimal to binary conversion

6. Logic gates
6.1 AND gate
6.2 OR gate
6.3 NOT gate
6.4 Other logic gates
6.5 NAND gate
6.6 NOR gate
6.7 Exclusive OR gate

7. Universal gate
7.1 NAND gate as a universal gate
7.2 NOR gate as a universal gate

8. Boolean expression

9. Theorems of Boolean algebra

Conceptual questions

Solved examples


Logic Gates (Test Yourself)


This book is written for understanding the basic concepts of logic gates and Boolean algebra that comes in Senior/Higher secondary classes. The students of these classes are not familiar with the symbols and logical operation of various basic building blocks of a digital circuit. There are plenty of instruments used in daily life that are based on the digital principles so the knowledge of these building blocks helps a lot to understand the working of these devices. There are plenty of books available on the principles of digital electronics, many are good to the advanced readers, however a very basic book for the students of lower classes is missing that deals with only the logic gates and small Boolean algebra on the level of the students. This book is an outcome of all those efforts put in to teach this course to the students for the last ten years.

I am thankful to the students of all those classes to whom this subject is taught for their valuable suggestions to improve the quality of this book.

Vimal Mehta


The present book “Logic Gates for Beginners” is intended for the students of higher secondary classes that start doing their basic course in physics. For the convenience of the students the book has been written in a very detailed and simple language. The information given in this book will be highly suitable for the students who have just started to learn basics of logic gates. The book has been well written to provide detailed knowledge, information and to help student to grasp maximum possible things about the logic gates. The book will certainly guide students to understand a number of devices based upon the logic gates.

I applaud the efforts of the author for writing a wonderful book covering all the basic things of logic gates.

Dr. Amit Kumar

NIT, Kurukshetra

1. Introduction

We all are familiar with the devices that work on a type of signal that can have any value in a limited range and are known as analog signals. The example of analog device is electronic amplifier. The electronic circuit use to process is known as analog circuits or analog devices. We are also familiar with computers, digital displays, internet etc. They have caused a revolution in this world, but many of us may not be familiar with the principals of working of computers, communication systems, digital displays etc. The operation of these systems is based on the principals of digital techniques and such systems are known as digital systems.

2. Analog and Digital signals

Analog Signal- A continuously varying signal is called as analog signal. Figure 1 shows the sinusoidaly varying current as an analog signal.

Abbildung in dieser Leseprobe nicht enthalten

Figure 1

If such an analog signal is applied to an electronic amplifier then the output will also vary sinusoidaly. It means the output can have infinite number of values. Digital Signal-A digital signal has two discrete levels or values. These levels can be represented using the terms LOW and HIGH. Figure 2 shows such a signal. It has two levels, the lower of the two levels is termed as LOW level and the higher as HIGH level.

Abbildung in dieser Leseprobe nicht enthalten

Figure 2

This is true for positive logic system, in negative logic system the lower level is termed as HIGH and upper as LOW. In this Figure we observe that the voltage in each level is not fixed but has a definite range. So as long as the input belongs to this range that level is taken irrespective value of the input voltage. These two discrete levels can also be represented by binary digits 1 and 0. A binary digit is termed as a bit. The two levels can also be termed ON and OFF for 1 and 0 binary digits respectively. A square wave is the example of a digital signal, because it has two values 1 (+5V) or 0 (0V). For digital input the transistor amplifier can be driven into cut off and saturation region.

3. Binary number system

We are very much familiar with the decimal number system that uses digits from 0 to 9. But the binary number system is a system that uses only the digits 0 and 1 as codes. The digits from 2 to 9 are not used in this system. To understand the concept of the binary system, let us take an example of brand new car whose kilometre indicator or odometer shows you 0000. Now when you travel 9 Km then the odometer shows you the figure 0009. But for the next Km the odometer shows you the figure 0010, after travelling 150Km the odometer shows you the figure 0150. So this odometer works on a principal of reset and carry and the digits in the decimal system has different weights. As in our case the odometer figure 0150 can be found by assigning the weights to the different digits like 0150 = 0 x 1000 + 1 x 100 + 5 x 10 + 0 x 1 = 150

This happens because in the decimal system the base is 10. Every position in this can be represented by 10 raised to some power multiplied to that number. So in decimal system the digit that lies extreme right is the least significant digit or LSD and that lies towards left is termed as most significant digit or MSD. The LSD has lowest weight and MSD has highest weight.

Now on the similar pattern of decimal system, we can understand the binary system. Suppose the odometer of the car works on the binary system then after travelling one Km it shows the figure 0001 and after travelling the two Km it will show 0010. It happens because it has only two digits 0 and 1 to operate unlike 0 to 9 for the decimal system. After 0001 the next Km will reset the first digit to 0 and carry 1 to the next digit, making the figure of the odometer as 0010. Similarly the third Km will make the figure 0011 and the next 0100.

Now as we have done in the decimal system, we can assign the weight or the place value for the binary system. This system has a base of two so every digit in this system can be represented by 2 raised to some power and multiplied to that digit. As we have seen that after travelling four Kms the binary odometer gives you 0100. We can check this as

Abbildung in dieser Leseprobe nicht enthalten

So in this system the digit on extreme right side is the least significant and is termed as LSB (least significant bit) and the extreme left digit is the most significant and is termed as MSB (most significant digit).

Table 1

Abbildung in dieser Leseprobe nicht enthalten

4. Binary to decimal conversion

Binary number can be converted into the decimal numbers very easily by using the concept of the weight of the digit or the place value of the digit. The following procedure is used for this conversion

I. Write the binary number

II. Directly under the binary number write Abbildung in dieser Leseprobe nicht enthalten working from right to left.

III. If a zero appears in a digit position cross out the decimal weight for that position.

IV. Obtain the remaining weight to obtain the decimal equivalent. As an example, let us try to convert 1001 to its decimal equivalent, now

Abbildung in dieser Leseprobe nicht enthalten

Take an another example to understand this, let us 1101

Abbildung in dieser Leseprobe nicht enthalten

We can also convert the binary fractions into decimal. Let us suppose we want to convert 0.110 to decimal equivalent, in that case the weights of digits positions to the right of the binary point are given by 1/2, 1/22, 1/23, 1/24and so on. So the conversion of 0.110 is

Abbildung in dieser Leseprobe nicht enthalten

5. Decimal to binary conversion

Decimal numbers can be converted into the binary numbers very easily by reversing the process described in the previous article. The method to convert decimal to binary is called as Double Dabble. In this method we have to divide the decimal number by 2, writing down the remainder after each division. Then to obtain binary number the remainder is taken in the reverse order. We have to continue the process of dividing by 2, till we get a quotient of 0 and the remainder of 1.

Let us take an example, Convert decimal 11 to its binary number.

Abbildung in dieser Leseprobe nicht enthalten

Write down all the remainders in these steps in reverse order, we get 1011.

(The arrow shows the direction of the order of the remainders to get binary numbers)

So the binary number is 1011.

We can also convert a decimal fraction to the binary number by multiplying the fractional number by 2 and record a carry in the integer position. The carries read downward are the binary fractions.

As an example let us convert 0.35 to binary.

Abbildung in dieser Leseprobe nicht enthalten

And so on.

Reading the carries downward as shown by the arrow here gives the binary fraction as 0.01011.

We have stopped the conversion process after getting the five binary digits, to have an approximation. If more accuracy is required continue multiplying by 2 as long as the desired accuracy is not achieved.

6. Logic gates

A digital circuit with one or more input signals but only one output signal is called a logic gate. The basic sense of logic is the decision making power. The logic gates make logical decisions about the output depending upon the nature of the inputs present. We can also define logic gate as a circuit that determine whether an input pulse can pass through to the output. There are three main types of logic gates AND, OR and NOT gates. These act as building blocks for other type of logic gates. To understand these gates we must know about the truth table. A truth table lists all the possible input combinations and the corresponding output for each combination.

6.1 AND Gate

To understand this gate, consider a simple electronic circuit as shown in the figure 3.

Abbildung in dieser Leseprobe nicht enthalten

Figure 3

The bulb shown in this figure will lit only if the circuit is complete. To complete the circuit we have to close both the switches S1 and S2.

The bulb will not glow if one of them or both the switches are not closed. So it clarify the action of the AND gate, that the AND gate has a high output only when all the inputs are high. We can also say that all the inputs must be at 1(High). Figure 4 shows the symbol of the 2-input AND gate.

Abbildung in dieser Leseprobe nicht enthalten

Figure 4

Table 2 is the truth table that summarizes all input-output possibilities for a 2 input AND gate.

Table 2

Abbildung in dieser Leseprobe nicht enthalten

In this table we have shown 0 and 1 that represent Low and High state of the gate. Notice carefully that the AND gate has a high output only when both the inputs A and B are high or at level 1.


Excerpt out of 47 pages


Logic gates for beginners
Catalog Number
ISBN (eBook)
ISBN (Book)
File size
548 KB
logic gates, logical operations, digital circuits
Quote paper
Vimal Mehta (Author), 2015, Logic gates for beginners, Munich, GRIN Verlag, https://www.grin.com/document/311084


  • No comments yet.
Read the ebook
Title: Logic gates for beginners

Upload papers

Your term paper / thesis:

- Publication as eBook and book
- High royalties for the sales
- Completely free - with ISBN
- It only takes five minutes
- Every paper finds readers

Publish now - it's free