Sunteți pe pagina 1din 26

Basic Electronics Engineering (Digital Electronics)

Unit- VI: Digital Electronics

1. Introduction to Digital Electronics:


A continuously varying signal (voltage or current) is called as analog signal. For
example, a sinusoidal voltage is an analog signal. In an analog electronic circuit, the
output voltage changes continuously according to the input voltage variations.
A signal (voltage or current) which can have only two discrete values is called a
digital signal. In this case, the output voltage can have only two states (i.e., values),
either low level or high level. An electronic circuit which is designed for two-state
operation is called as digital circuit.

1.1. Analog and Digital Signals:

i. Analog Signal: As discussed before, a continuously varying signal is called an


analog signal. For example, an alternating voltage is sinusoidal, is an analog signal.
If such an analog signal is applied to the input of a transistor amplifier, it will also
provide sinusoidal output. This is the analog operation i.e., the output voltage can
have an infinite number of values. Due to many-valued output, the analog operation
is less reliable.

ii. Digital Signal: A signal that can have only two discrete values is called a digital
signal. For example, a square wave is a digital signal. It is because this signal has
only two values viz, +5 V and 0 V and no other value. These values are labelled as
High level and Low level. The High voltage is + 5 V and the Low voltage is 0 V. If
proper digital signal is applied to the input of a transistor, the transistor can be
driven between cut off and saturation i.e. the transistor will have two-state output
i.e. either low or high output. Because of two states operation, all the signals are
easily recognised as either low or high.

Analog Signal Digital Signal

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 1


Basic Electronics Engineering (Digital Electronics)

2. Number System:

2.1. Introduction to Number Systems:


There are many ways in which you could represent a numeric value. Each
convention for representing numeric values is called a Number System.
The most commonly used system in for day to day applications is the Decimal
System. Here, we will take the overview of four different number systems: decimal,
binary, octal, and hexadecimal. Below table illustrates the correspondence in
representing numbers between 0 and 16 in each of the systems.

Decimal Binary Octal Hexadecimal


(Base 10) (Base 2) (Base 8) (Base 16)
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
16 10000 20 10
Table: Number System Correspondence Table

2.2. Decimal, Binary, Octal, and Hexadecimal Numbers:


The decimal number system uses 10 different digits (0 - 9) to represent numbers.
It is also called base 10 for the same reason. In general we call a number system by the
number of digits it uses.

For example:
Decimal system Ten digits (0 9) base 10,
Binary system: Two digits (0 and 1) base 2,
Octal system: Eight digits (0 7) base 8,
Hexadecimal system: Sixteen digits (0 - 9 A B C D E F) base 16.

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 2


Basic Electronics Engineering (Digital Electronics)

In representing numeric values in any number system, the position and base are
key issues. Each digit has a position starting with position 0 from the right. Each
position has a certain multiplier value associated with. When you write a number each
digit will be multiplied by the position value and the resulting values are then added to
give the total value of the number.

For example:
Let's suppose we have three numbers, 3, 30, and 300 in the decimal number system.
Applying the above methodology, we get:
3 = (3 * 100)
30 = (3 * 101) + (0 * 100)
300 = (3 * 102) + (0 * 101) + (0 * 100)
Let's suppose we have another four numbers, 4, 44, 444 and 4444 in the decimal
number system. Applying the above methodology, we get:

4 = (4 * 100)
44 = (4 * 101) + (4 * 100)
444 = (4 * 102) + (4 * 101) + (4 * 100)
4444 = (4 * 103) + (4 * 102) + (4 * 101) + (4 * 100)
This is simple enough to understand with the decimal system. The position number we
place a digit in determines what value that digit contributes to the whole number's value.

3. Number Base Conversion:


3.1. Decimal to Binary Conversion:
For example, suppose we want to convert 30 from decimal to binary. We know that the
binary systems base is 2 therefore the divisor should be 2. We divide the initial number
by 2, keep the result for the next division unless it is less than 2, which signifies the end
of the iteration and note the remainder.
2 30 0
2 15 1 (30)10 = (1 1 1 1 0)2
2 7 1
2 3 1
1 1
Remainders

e.g.2: Convert 14 into binary


2 14 0
2 7 1 (14)10 = (1 1 1 0)2
2 3 1
1 1

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 3


Basic Electronics Engineering (Digital Electronics)

For example: suppose the given the number is (18.625)10


2 18 0
2 9 1
2 4 0 (18)10 = (1 0 0 1 0)2
2 2 0
1 1
and
0.625 x 2 = 1.25 1
0.25 x 2 = 0.50 0 (0.625)10 = (0.101)2
0.50 x 2 = 1.00 1

This method is called as double dable method


(18.625)10 = (1 0 0 1 0 . 1 0 1)2
Exercise: Do the following Decimal to Binary conversions
a) 24.365 b) 36.785 c) 55.951 d) 40.240
e) 19.852 f) 35.185 g) 47.652 h) 19.625

3.2. Binary to Decimal Conversion:


In converting any binary number to decimal we use the base and position
concept as explained above. We simply multiply the value of the digit by the position
value in the source number system and add all obtained values.
For example, to convert 11110 from binary to decimal we perform the following.
(11110)2 = (1 x 24) + (1 x 23) + (1 x 22) + (1 x 21) + (0 x 20)
= (1 x 16) + (1 x 8) + (1 x 4) + (1 x 2) + (0 x 1)
= 16 + 8 + 4 + 2 + 0
= (30)10 therefore, (11110)2 = (30)10

To convert from binary to decimal, we use the same concept as above.


(1011)2 = (1 x 23) + (0 x 22) + (1 x 21) + (1 x 20)
= (1 x 8) + (0 x 4) + (1 x 2) + (1 x 1)
=8+0+2+1
= (11)10 therefore, (1011)2 = (11)10
But if suppose the given number is (11.101)2

(11.101)2 = [(1 x 21) + (1 x 20)] . [ (1 x 2-1) + (0 x 2-2) + (1 x 2-3)


= [(1 x 2) + (1 x 1)] . [(1 x 0.5) + (0 x 0.25) + (1 x 0.125)]
= [2 + 1] . [0.5 + 0 + 0.125]
= (3.625)10 therefore, (11.101)2 = (3.625)10

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 4


Basic Electronics Engineering (Digital Electronics)

Exercise: Convert the following binary numbers into decimal


a) (1101.01)2 b) (110001)2 c) (001.001)2 d) (111.1001)2
e) (1111.1100)2 f) (1010.0001)2 g) (01110. 001)2 h) (10111.0100)2

3.3. Decimal to Octal Conversion:


For example, suppose we want to convert 35 from decimal to octal. We know
that for the octal system is base 8, therefore the divisor should be 8. We divide the
initial number by 8, keep the result for the next division unless it is less than 8, which
signifies the end of the iteration, and note the remainder.

8 35 3
4 4 (35)10 = (43)8
Remainders

Convert (78)10 to octal


8 78 6
8 9 1 (78)10 = (116)8
1 1
Remainders

The given number is (107.24)10 Convert it to Octal

8 107 3
8 13 5
1 1 (107)10 = (153)8
and
0.24 x 8 = 1.92 1
0.92 x 8 = 7.36 7 (0.24)10 = (0.17270)8
0.36 x 8 = 2.88 2
0.88 x 8 = 7.04 7
0.04 x 8 = 0.32 0

Therefore (107.24)10 = (153.17270)8

Exercise: Do the following Decimal to Octal conversions


a) 215.365 b) 127.321 c) 22.35 d) 27.36
e) 15.15 f) 19.25 g) 98.97 h) 48.84

3.4. Octal to Decimal Conversion:


In converting from octal number system to decimal we use the base and position
concept explained above. We simply multiply the value of the digit by the position value
in the source number system and add all obtained values.

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 5


Basic Electronics Engineering (Digital Electronics)

For example, to convert 721 from octal to decimal, we perform the following.
(721)8 = (7 x 82) + (2 x 81) + (1 x 80)
= (7 x 64) + (2 x 8) + (1 x 0)
= 448 + 16 + 1
= (465)10 therefore, (721)8 = (465)10

To convert from octal to decimal, we use the same concept as above.


(223)8 = (2 x 82) + (2 x 81) + (3 x 80)
= (2 x 64) + (2 x 8) + (3 x 1)
= 128 + 16 + 3
= (147)10 therefore, (223)8 = (147)10

But if suppose the given number is (42.36)8

(42.36)8 = [(4 x 81) + (2 x 80)] . [(3 * 8-1) + (6 x 8-2)]


= [(4 x 8) + (2 x 1)] . [(3 x 0.125) + (6 x 0.0156)]
= [32 + 2] . [0.375 + 0.0936]
= (34.4686)10 therefore, (42.36)8 = (34.4668)10

Exercise: Convert the following numbers from Octal to Decimal


a) (110.41)8 b) (234)8 c) (654.321)8 d) (12.453)8
e) (772.114)8 f) (156.56)8 g) (371.26)8 h) (331.454)8

3.5. Decimal to Hexadecimal Conversion:


For example, suppose we want to convert 50 from decimal to hexadecimal. We
know that for the hexadecimal system base is 16, therefore the divisor should be 16.
We divide the initial number by 16, keep the result for the next division unless it is less
than 16, which signifies the end of the iteration, and note the remainder.

16 50 2
3 3 (50)10 = (23)16
Remainders

Convert 100 to hexadecimal

16 100 4
6 6 (100)10 = (64)16

Remainders

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 6


Basic Electronics Engineering (Digital Electronics)

The given number is (260.24)10 Convert it to hexadecimal

16 260 4
16 16 0
1 1 (260)10 = (104)16

and
0.24 x 16 = 3.84 3
0.84 x 16 = 13.44 D (0.24)10 = (0.3D70)16
0.44 x 16 = 7.04 7
0.04 x 16 = 0.64 0

Therefore (260.24)10 = (104.3D70)16

Exercise: Do the following Decimal to Hexadecimal conversions


a) 415.325 b) 307.348 c) 568.315 d) 287.046
e) 115.015 f) 24.15 g) 18.42 h) 36.548

3.6. Hexadecimal to Decimal Conversion:


To convert from hexadecimal to decimal we use the same concept with one
minor difference. In converting from Hexadecimal number system to decimal we use the
base and position concept. We simply multiply the value of the digit by the position
value in the source number system and add all obtained values. Whenever we
encounter a letter between A and F, the decimal value of the letter is substituted it in the
above formula. Since there are only 6 letters you need to know, it helps to memorize
the values.
A = 10, B = 11, etc. as shown in initial table.

For example, to convert 3C from hexadecimal to decimal we do the following.

(3C)16 = (3 x 161) + (12 x 160) (We converted C to 12 before using it into the formula)
= (3 x 16) + (12 x 1)
= 48 + 12
= (60)10 therefore, (3C)16 = (60)10

Convert 104 from hexadecimal to decimal:


(104)16 = (1 x 162) + (0 x 161) + (4 x 160)
= (1 x 256) + (0 x 16) + (4 x 1)
= 256 + 0 + 4
= (260)10

therefore, (104)16 = (260)10

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 7


Basic Electronics Engineering (Digital Electronics)

To convert from hexadecimal to decimal, we use the same concept as above.

(3A0)16 = (3 x 162) + (10 x 161) + (0 x 160)


= (3 x 256) + (10 x 16) + (0 x 1)
= 768 + 160 + 0
= (928)10 therefore, (3A0)16 = (928)10

But if suppose the given number is (9D.2EF)16

(9D.2EF)16 = [(9 x 161) + (13 x 160)] . [(2 x 16-1) + (14 x 16-2) + (15 x 16-3)
= [(9 x 16) + (13 x 1)] . [(2 x 0.0625) + (14 x 0.00391) + (15 x 0.000244)]
= [144 + 13] . [0.125 + 0.05474 + 0.00366]
= (157.1834)10 therefore, (9D.2EF)16 = (157.1834)10

Exercise: Convert the following hexadecimal numbers to Decimal


a) (C4.52)16 b) (5B.6E)16 c) (47.AC)16 d) (16E.2F0)16
e) (F5.012)16 f) (5D.ABC)16 g) (DC.AB)16 h) (59.C1A)16

3.7. Octal to Hexadecimal Conversion:


For converting any given number in octal number system to the Hexadecimal
number system, we first need to convert the given octal number into its equivalent
binary number. Then from the derived binary number prepare the groups of 4 digits
(bits) from right to left, because the base of Hexadecimal number system is 16 i.e. 24.

For Example: Convert (457)8 to hexadecimal:


First we need to convert the given octal number to binary.
Therefore, 4 5 7

100 101 111


i.e. (457)8 => (100101111)2
Now from the derived binary number form the groups of 4 numbers each from right to
left.

i.e. 000100101111 therefore, (457)8 => (12F)16

1 2 F
These are the extra added 0s for completing the group of 4 digits (bits)
Convert (4236)8 to hexadecimal
(4 2 3 6)8 => (100 010 011 110)2
100010011110

8 9 E therefore, (4236)8 => (89E)16

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 8


Basic Electronics Engineering (Digital Electronics)

Exercise: Do the following octal to Hexadecimal conversions


a) 6355 b) 5710.152 c) 237.046 d) 24.57
e) 3041 f) 416.411 g) 124.632 h) 447.441

3.8. Hexadecimal to Octal Conversion:


For converting any given number from Hexadecimal number system to Octal the
number system, we first need to convert the given Hexadecimal number into its
equivalent binary number. Then from the derived binary number prepare the groups of
3 digits (bits) from right to left.

For Example:
Convert (489A)16 to octal:
First we need to convert the given Hexadecimal number to binary.
Therefore, 4 8 9 A

0100 1000 1001 1010


i.e. (489A)16 => (0100100010011010)2

Now from the derived binary number form the groups of 3 numbers each from right to
left.

i.e. 000100100010011010
Therefore, (489A)16 => (044232)8
0 4 4 2 3 2
These are the extra added 0s for completing the group of 3 digits (bits)

Convert (20)16 to octal


(20)8 => (0010 0000)2

000100000

0 4 0 therefore, (20)16 => (40)8

Exercise: Do the following Hexadecimal to octal conversions


a) F5 b) 30C1 c) 102.AB d) A9C.6E2
e) 958D.223 f) CD.10F g) 68EF.9 h) 4F7.4E1

4. Binary-Coded-Decimal Number System:


Binary coded decimal (BCD) is a way to express each of the decimal digits with a binary
code. Since there are only ten code groups in the BCD system, it is very easy to
convert between the decimal and BCD. Because we like to read and write in decimal,
the BCD system provides an excellent interface to binary systems. Examples of such
interfaces are keypad inputs and digital readouts.

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 9


Basic Electronics Engineering (Digital Electronics)

The BCD system is also called the 8421 code. Binary coded decimal means that each
decimal digit, 0 through 9, is represented by a binary code of four bits. The designation
8421 indicates the binary weights of four bits (23, 22, 21, 20). The ease of conversion
between BCD (or 8421) code numbers and familiar decimal numbers is the main
advantage of this code. There are ten binary combinations that represent the ten
decimal digits as shown in below table.

5. Gray Code:
The gray code was designed by Frank Gray at Bell Labs in 1953. It is an un-weighed
binary code in which two successive value differ only by one bit. The output of many
system are continuous and these data must be converted into digital form before they
are applied to a digital system. Continuous or analog information is converted into
digital form by analog-to-digital converter. It is sometimes convenient to use Gray code
shown in Table 2-8. The main advantage of using capray code is that only one bit in the
code group changes, from one number to the next number. For example, from 7 to 8,
the Gray code changes from 0100 to 1100 only the first bit is changes, from 0 to 1. The
other three bits remain the same. But in binary numbers the change from 7 to 8 will be
from 0111 to 1000, all four bits changes. The Gray code is also known as Reflected
Binary Code.

14.1. Binary-to-Gray Conversion


There are two methods of converting Gray code to Binary code. The rules for
converting from any binary number to its equivalent Gray code number are as follows:
1. The MSB is the same in the Gray code as in the binary number.
2. The second MSB of the Gray code is obtained by EX-ORing the first MSB of
binary number to the second MSB of the binary number.
3. The third MSB of the Gray code is obtained by EX-ORing the second MSB of
binary number to the third MSB of the binary number.
4. Continue EX-ORing the bit as above until the LSB of Gray code is reached.
5. The Gray code number will always have the same number of bits as the binary
number.

e.g. Convert the given binary number to gray code:


a) 1001 b) 0110

a) 1 0 0 1 Given binary number

1 1 0 1 corresponding gray code

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 10


Basic Electronics Engineering (Digital Electronics)

b) 0 1 1 0 Given binary number

0 1 0 1 corresponding gray code

6. Logic Gates:
4.1. Logic Gates:
A digital circuit with one or more input signals but only one output signal is called
a logic gate.
Since a logic gate is a switching circuit (i.e. a digital circuit), its output can have
only one of the two possible states viz., either a high voltage (1) or a low voltage (0)
it is either ON or OFF. Whether the output voltage of a logic gate is high (1) or low (0)
will depend upon the conditions at its input.

4.2. Basic Logic Gates


All logic gates can be analysed by constructing a truth table. A truth table lists all
input possibilities and the corresponding output for each input.
The three basic logic gates that make up all digital circuits are
i. OR gate
ii. AND gate and
iii. NOT gate.
The following points may be noted about logic gates:
i. A binary 0 represents 0 V and binary 1 represents + 5V. It is common to refer to
binary 0 as LOW input or output and binary 1 as HIGH input or output.
ii. A logic gate has only one output signal. The output will depend upon the input
signal/signals and the type of gate.
iii. The operation of a logic gate may be described either by truth table or Boolean
algebra.

4.2.1. AND Gate:


The AND gate is a logic gate that has two or more inputs but only one output.
The output Y of AND gate is HIGH when all inputs are HIGH. However, the output Y
of AND gate is LOW if any or all inputs are LOW.

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 11


Basic Electronics Engineering (Digital Electronics)

Operation:
i. When A = 0 and B = 0, then Y = 0 as shown in truth table.
ii. When A = 0 and B = 1, then Y = 0 as shown in truth table.
iii. When A = 1 and B = 0, then Y = 0 as shown in truth table.
iv. When A = 1 and B = 1, then Y = 1, since all inputs are 1, the output will be 1, as
shown in truth table.

2-input AND Gate


Symbol Truth Table
B A Q
0 0 0
0 1 0
1 0 0
1 1 1

3-input AND Gate


Symbol Truth Table
C B A Q
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1

The logic AND function can have


any number of individual inputs. However,
commercial available AND Gate IC's are
available in standard 2, 3, or 4 input types.
If additional inputs are required, then the
standard AND gates will need to be
cascaded together for example.

4.2.2. OR Gate
An OR gate is a logic gate that has two or more inputs but only one output.
However, the output Y of an OR gate is LOW when all inputs are LOW. The output
Y of an OR gate is HIGH if any or all the inputs are HIGH.

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 12


Basic Electronics Engineering (Digital Electronics)

Operation:
i. When A = 0 and B = 0, then Y = 0, since all inputs are 0, the output will be
0, as shown in truth table.
ii. When A = 0 and B = 1, then Y = 1.
iii. When A = 1 and B = 0, then Y = 1.
iv. When A = 1 and B = 1, then Y = 1.

2-input OR Gate
Symbol Truth Table
B A Q
0 0 0
0 1 1
1 0 1
1 1 1

3-input OR Gate
Symbol Truth Table
C B A Q
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1

The OR function can have any number of


individual inputs. However, commercial
available OR gates are available in 2, 3, or
4 inputs types. Additional inputs will
require gates to be cascaded together for
example.

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 13


Basic Electronics Engineering (Digital Electronics)

4.2.3. NOT Gate


The NOT gate or inverter is the simplest of all logic gates. It has only one input and one
output, where the output is opposite of the input. The NOT gate is often called
inverter because it inverts the input.

Operation:
i. If A = 0, then Y = 1.
ii. If A = 1, then Y = 0.

Symbol Truth Table


A Q
0 1
1 0

Logic NOT gates provide the complement of their input signal and are so called
because when their input signal is "HIGH" their output state will NOT be "HIGH".
Likewise, when their input signal is "LOW" their output state will NOT be "LOW". As
they are single input devices, logic NOT gates are not normally classed as "decision"
making devices or even as a gate, such as the AND or OR gates which have two or
more logic inputs. Commercial available NOT gates IC's are available in either 4 or 6
individual gates within a single IC package.

4.3. Combination of Basic Logic Gates (Derived Gates):


The AND, OR and NOT gates are the three basic logic gates. NAND, NOR and
XNOR gates are formed by using NOT gate after the AND, OR and XOR gate
respectively. NAND, NOR and XNOR gates are formed by combining he basic ates with
NOT gates, hence they are also called as derived gates.

4.3.1. NAND Gate


It is a combination of AND gate and NOT gate. In other words, output of AND
gate is connected to the input of a NOT gate. Clearly, the output of a NAND gate is
opposite to the AND gate. This is illustrated in the truth table for the NAND gate. Note
that truth table for NAND gate is developed by inverting the outputs of the AND gate.
The Boolean expression for NAND function is

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 14


Basic Electronics Engineering (Digital Electronics)

NAND Gate Equivalence:

Then we can define the operation of a 2-input logic NAND gate as being:
"If both A and B are true, then Q is NOT true"

2-input NAND Gate


Symbol Truth Table
B A AND NAND
0 0 0 1
0 1 0 1
1 0 0 1
1 1 1 0

3-input NAND Gate


Symbol Truth Table
C B A AND NAND
0 0 0 0 1
0 0 1 0 1
0 1 0 0 1
0 1 1 0 1
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 0

4.3.2. NOR Gate


It is a combination of OR gate and NOT gate. In other words, output of OR gate
is connected to the input of a NOT gate. Note that output of OR gate is inverted to form
NOR gate. This is illustrated in the truth table for NOR gate. It is clear that truth table for
NOR gate is developed by inverting the outputs of the OR gate.
The Boolean expression for NOR function is

NOR Gate Equivalent:

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 15


Basic Electronics Engineering (Digital Electronics)

Then we can define the operation of a 2-input logic NOR gate as being:
"If both A and B are NOT true, then Q is true"

2-input NOR Gate


Symbol Truth Table
B A OR NOR
0 0 0 1
0 1 1 0
1 0 1 0
1 1 1 0

3-input NOR Gate


Symbol Truth Table
C B A OR NOR
0 0 0 0 1
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 1 0
1 0 1 1 0
1 1 0 1 0
1 1 1 1 0

4.3.3. EXOR (XOR) Gate

The output of an Exclusive-OR (EXOR) gate ONLY goes "HIGH" when its
two input terminals are at "DIFFERENT" logic levels with respect to each other and
they can both be at logic level "1" or both at logic level "0.

2-input Ex-OR Gate


Symbol Truth Table
B A Q
0 0 0
0 1 1
1 0 1
1 1 0

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 16


Basic Electronics Engineering (Digital Electronics)

4.3.4. EXNOR (XNOR) Gate


The output of an Exclusive-NOR (EXNOR) gate ONLY goes "HIGH" when its
two input terminals, A and B are at the "SAME" logic level which can be either at a
logic level "1" or at a logic level "0". Then this type of gate gives and output "1" when its
inputs are "logically equal" or "equivalent" to each other, which is why an Exclusive-
NOR gate is sometimes called an Equivalence Gate.

2-input Ex-NOR Gate


Symbol Truth Table
B A Q
0 0 1
0 1 0
1 0 0
1 1 1

4.4. Universal Logic Gates:


A universal logic gate is a logic gate that can be used to construct all other logic
gates.

4.4.1. NAND Gate as universal gate:

The NAND gate is universal gate because its repeated use can produce other
logic gates. The table below shows how NAND gates can be connected to produce
inverter (i.e., NOT gate), AND gate and OR gate.
Various Logic Gates using NAND Gates:

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 17


Basic Electronics Engineering (Digital Electronics)

4.4.2. The "Universal" NOR Gate:


Like the NAND gate seen in the last section, the NOR gate can also be classed
as a "Universal" type gate. NOR gates can be used to produce any other type of logic
gate function just like the NAND gate and by connecting them together in various
combinations the three basic gate types of AND, OR and NOT function can be formed
using only NOR's, for example.

Various Logic Gates using NOR Gates:

Summary of all the Digital Logic Gates:

Inputs Truth Table Outputs for 2-input Logic Gates


B A AND NAND OR NOR EX-OR EX-NOR
0 0 0 1 0 1 0 1
0 1 0 1 1 0 1 0
1 0 0 1 1 0 1 0
1 1 1 0 1 0 0 1

Truth Table Output for Single-input Gates


A NOT Buffer
0 1 0
1 0 1

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 18


Basic Electronics Engineering (Digital Electronics)

7. Boolean postulates:

8. De-Morgan Theorems:
De Morgans theorems are extremely useful in simplifying
expressions in which a product or sum of variables is inverted. The
two theorems are:

The first De Morgans theorem may be stated as under:


When the OR sum of two variables is inverted, this is equal to inverting each variable
individually and then ANDing these inverted variables i.e.,

The second De Morgans theorem may be stated as under:


When the AND product of two variables is inverted, this is equal to inverting each
variable individually and then ORing them i.e.,

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 19


Basic Electronics Engineering (Digital Electronics)

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 20


Basic Electronics Engineering (Digital Electronics)

Simplify the following:

Simplify the following:

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 21


Basic Electronics Engineering (Digital Electronics)

9. Developing Logic Circuit From Boolean Expression:


For Example:
1. X = AB + CD

The logic gates required to implement


X = AB + CD are as follows:
(i) Two two-input AND gates to form
AB and CD.
(ii) One two-input OR gate to form the
final function X (= AB + CD).

2. X = AB + CDE

The logic gates required to implement


X = AB + CDE are as follows:
(i) One two-input AND gate to form
AB.
(ii) One three-input AND gate to form
CDE.
(iii) One two-input OR gate to form the
final function X (= AB + CDE).

3.

4.

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 22


Basic Electronics Engineering (Digital Electronics)

10. Determining Standard Expressions from a Truth Table:


To determine the standard SOP expression represented by a truth table, list the binary
values of the input variables for which the output is 1. Convert each binary value to the
corresponding product term by replacing each 1 with the corresponding variable and
each 0 with the corresponding variable complement. For example, 1001 is converted to
a product term as follow:

To determine a standard POS expression represented by a truth table, list the binary
values for which the output is 0. Convert each binary value to the corresponding sum
term by replacing each 1 with the corresponding variable complement and each 0 with
the corresponding variable. For example, the binary value 1010 is converted to a sum
term as follows:

For Example:

Determine the standard SOP (sums-of-products)


expression and the equivalent standard POS (product-of-
sums) expression for the given truth table

Standard SOP expression


From the given truth table we find, that there are four 1s in
the output column and the corresponding binary values
are, 010, 011, 110 and 111. These binary values are
converted to product terms as follows:

Thus the resulting standard SOP expression for the output X is,

Standard POS expression


From the given truth table, we find that the output is 0 for binary
values 000, 001, 100 and 101. These binary values are converted
to sum terms as follows:

The resulting standard POS expression for the output,

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 23


Basic Electronics Engineering (Digital Electronics)

11. Introduction to Combinational Logic Circuits:


Combinational circuit is a circuit in which we combine the different gates in the circuit,
for example encoder, decoder, multiplexer and demultiplexer. Some of the
characteristics of combinational circuits are following
The output of combinational circuit at
any instant of time depends only on
the present input values.
The combinational circuit do not use
any memory element. The previous
state of input does not have any effect
on the present state of the circuit.
A combinational circuit can have an n
number of inputs and m number of Combinational Logic Circuit
outputs.

We can combine two or more logic gates to form a logic circuit or digital circuit. A logic
circuit consisting of two or more logic gates that has no feedback and no memory is
called a combinational logic circuit.
A combinational logic circuit is constructed using AND, OR and NOT gates.
Therefore the basic building block for combinational circuits is the logic gate. Since a
combinational logic circuit has no feedback and no memory, its output depends only on
the current value of its inputs.

Examples of Combinational circuits:


a) Adders b) Subtractors c) Encoders d)Decoders
e) Magnitude Comparators f) Priority Encoders g) Multiplexers etc.

8.1. Adders:

The Half Adder:


Half-adder accepts two binary digits on its inputs and produces two digits on its outputs:
a sum bit (S) and a carry bit (Cout).
The truth table for the half-adder is:

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 24


Basic Electronics Engineering (Digital Electronics)

The Full Adder:


The truth table for the full-adder is:

12. Introduction to Sequential Logic Circuits:

The combinational circuit does


not use any memory element.
Hence the previous state of
input does not have any effect
on the present state of the
circuit. But sequential circuit
has memory element, so output
can vary based on the previous
inputs also.
Sequential Logic Circuit

This type of circuits uses previous input, output, clock and a memory element.
In other words, the output state of a sequential logic circuit is a function of the
following three states, the present input, the past input and/or the past
output. Sequential Logic circuits remember these conditions and stay fixed in their
current state until the next clock signal changes one of the states, giving sequential
logic circuits Memory.
Sequential logic circuits are generally termed as two state or Bistable devices
which can have their output or outputs set in one of two basic states, a logic level 1 or
a logic level 0 and will remain latched (hence the name latch) indefinitely in this
current state or condition until some other input trigger pulse or signal is applied which
will cause the bistable to change its state once again.
Examples of Combinational circuits:
a) Flip Flops b) Counters c) Shift Registers
d) State Machines e) Memory etc.

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 25


Basic Electronics Engineering (Digital Electronics)

Prepared By Mr. A. B. Shinde, Electronics Engg., PVPIT, Budhgaon 26

S-ar putea să vă placă și