Number System & Logic Gates

October 26, 2017 | Author: A B Shinde | Category: Logic Gate, Integrated Circuit, Electronic Circuits, Boolean Algebra, Electronic Engineering
Share Embed Donate


Short Description

Download Number System & Logic Gates...

Description

Departments of Electronics Engg. 2009-2010 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. Table 1 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 1: Number System Correspondence Table 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: 1) the binary system uses two digits (0 and 1)  base 2, 2) octal uses eight digits (0 – 7)  base 8, 3) and hexadecimal uses 16 digits (0 - 9 A B C D E F)  base 16. In representing numeric values in any number system, the position and base terms are key. Figure 1 illustrates the definition of position and base. __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -1-

Departments of Electronics Engg. 2009-2010 Position #

3

2

1

0

103 =1000

102 =100

101 =10

100 =1

163 =4096

162 = 256

161 =16

160 =1

BasePosition # = Position Value

Decimal

Hexadecimal Fig:1Understanding bases, position numbers, and position values.

As shown in Figure 1, we could think of each digit placeholder 83 =512 82 =64 81 =8 as a position 80 =1 starting with position Octal 0 from the right. Each position has a certain multiplier value associated with. This value is given by the position value formula shown in the figure. How does relate to writing numerical values? When you write a number each digit will and the values 23 =be 8 multiplied 22by = 4the position 21 =value, 2 20 =resulting 1 are then Binary 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. Conversion from One Number System to Other: 1) DECIMAL TO BINARY CONVERSION: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -2-

Departments of Electronics Engg. 2009-2010 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 2 2 2

30 15 7 3 1

0 1 1 1 1 Remainders

(30)10 = (1 1 1 1 0)2

e.g.2: Convert 14 into binary 2 2 2

14 7 3 1

0 1 1 1 Remainders

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

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

18 9 4 2 1

0 1 0 0 1

(18)10 = (1 0 0 1 0)2

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 Problems: Do the following Decimal to Binary conversions a) 24.365 b) 36.785 c) 55.951 d) 40.240 f)

g)

h)

i)

e) 19.852 j)

2) BINARY TO DECIMAL CONVERSION: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -3-

Departments of Electronics Engg. 2009-2010

In converting any binary number 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. For example, to convert 11110 from binary to decimal we perform the following. (11110)2

= (1 * 24) + (1 * 23) + (1 * 22) + (1 * 21) + (0 * 20) = (1*16) + (1*8) + (1*4) + (1*2) + (0*1) = 16 + 8 + 4 + 2 + 0 = (30)10

To convert from binary to decimal, we use the same concept as above. (1011)2

= (1 * 23) + (0 * 22) + (1 * 21) + (1 * 20) = (1 * 8) + (0 * 4) + (1 * 2) + (1*1) =8+0+2+1 = (11)10

But if suppose the given number is (11.101)2 (11.101)2 = [(1 * 21) + (1 * 20)] . [ (1 * 2-1) + (0 * 2-2) + (1 * 2-3) = [(1 * 2) + (1 * 1)] . [(1 * 0.5) + (0 * 0.25) + (1 * 0.125)] = [2 + 1] . [0.5 + 0 + 0.125] = (3.625)10 Problems for Practice: Convert the following numbers into Decimal a) (1101.01)2 b) (110001)2 c) (001.101)2 d) (101.1101)2 e) (1111.1110)2 f) (1010.0001)2 g) (1110. 001)2 h) (10111.0101)2 i) (110010.1101)2 3) DECIMAL TO OCTAL CONVERSION: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -4-

Departments of Electronics Engg. 2009-2010 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 4

3 4 Remainders

(35)10 = (43)8

Convert 78 to octal 8 8

78 6 9 1 1 1 Remainders

(78)10 = (116)8

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

107 13 1

3 5 1

(107)10 = (153)8

And 0.24 x 8 = 1.92 0.92 x 8 = 7.36 0.36 x 8 = 2.88 0.88 x 8 = 7.04 0.04 x 8 = 0.32 Therefore

1 7 2 7 0

(0.24)10 = (0.17270)8

(107.24)10 = (153.17270)8

Problems: Do the following Decimal to Octal conversions a) 215.365 b) 127.321 c) 92.35 d) 27.36 e) 15.15 etc 4) OCTAL TO DECIMAL CONVERSION: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -5-

Departments of Electronics Engg. 2009-2010

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. For example, to convert 721 from octal to decimal, we perform the following. (721)8

= (7 * 82) + (2 * 81) + (1 * 80) = (7*64) + (2*8) + (1*0) = 448 + 16 + 1 = (465)10

To convert from octal to decimal, we use the same concept as above. (223)8

= (2 * 82) + (2 * 81) + (3 * 80) = (2 * 64) + (2 * 8) + (3 * 1) = 128 + 16 + 3 = (147)10

But if suppose the given number is (42.36)8 (42.36)8 = [(4 * 81) + (2 * 80)] . [ (3 * 8-1) + (6 * 8-2)] = [(4 * 8) + (2 * 1)] . [(3 * 0.125) + (6 * 0.0156)] = [32 + 2] . [0.375 + 0.0936] = (34.4686)10 Problems for Practice: Convert the following numbers from Octal to Decimal a) (110.41)8 b) (234)8 c) (654.321)8 d) (12.4563)8 e) (772.114)8 f) (156.56)8 g) (378.26)8 h) (331.454)8 i) (254.247)8 5) DECIMAL TO HEXADECIMAL CONVERSION: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -6-

Departments of Electronics Engg. 2009-2010 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 3

2 3 Remainders

(50)10 = (23)16

Convert 100 to hexadecimal 16

100 6

4 6

(100)10 = (64)16

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

260 16 1

4 0 1

(260)10 = (104)16

And 0.24 x 16 = 3.84 0.84 x 16 = 13.44 0.44 x 16 = 7.04 0.04 x 16 = 0.64 Therefore

3 D 7 0

(0.24)10 = (0.3D70)16

(260.24)10 = (104.3D70)16

Problems: Do the following Decimal to Hexadecimal conversions a) 415.325 b) 307.348 c) 568.315 d) 287.046 e) 115.115 f) 24.15 etc 6) HEXADECIMAL TO DECIMAL CONVERSION: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -7-

Departments of Electronics Engg. 2009-2010 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 Table 1. For example, to convert 3C from hexadecimal to decimal we do the following. (3C)16 = (3 * 161) + (12 * 160)  Note that we converted C to 12 before plugging it into the formula = (3*16) + (12*1) = 48 + 12 = (60)10 Convert 104 from hexadecimal to decimal: (104)16

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

To convert from hexadecimal to decimal, we use the same concept as above. (3A0)16

= (3 * 162) + (10 * 161) + (0 * 160) = (3 * 256) + (10 * 16) + (0 * 1) = 768 + 160 + 0 = (928)10

But if suppose the given number is (9D.2EF)16 (9D.2EF)16 = [(9 * 161) + (13 * 160)] . [ (2 * 16-1) + (14 * 16-2) + (15 * 16-3) = [(9 * 16) + (13 * 1)] . [(2 * 0.0625) + (14 * 0.00391) + (15 * 0.000244)] = [144 + 13] . [0.125 + 0.05474 + 0.00366] = (157.1834)10 Problems for Practice: Convert the following hexadecimal numbers to Decimal a) (C4.52)16 d) (5B.6E)16 b) (247.AC)16 e) (16E.230)16 c) (F5.012)16 f) (5D.ABC)16 7) OCTAL TO HEXADECIMAL CONVERSION: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -8-

Departments of Electronics Engg. 2009-2010 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 fro m right to left. i.e.

000100101111

(457)8 => (12F)16

1 2 F These are the extra added 0’s 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

(4236)8 => (89E)16

Problems: Do the following octal to Hexadecimal conversions a) 6355 b) 30441 c) 5710.152 d) 237.046 e) 416.411 f) 24.57 g) 124.632 h) 447.441 i) 567.765 8) HEXADECIMAL TO OCTAL CONVERSION: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -9-

Departments of Electronics Engg. 2009-2010 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, because the base of Hexadecimal number system is 8 i.e. 23. 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 (489A)16 => (044232)8

0 4 4 2 3 2 These are the extra added 0’s for completing the group of 3 digits (bits) Convert (20)16 to octal (2 0)8 => (0010 0000)2 000100000 0

4

0

(20)16 => (40)8

Problems: 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

Digital Logic Gates: __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -10-

Departments of Electronics Engg. 2009-2010

Standard commercially available Digital Logic Gates are available in two basic forms, TTL which stands for Transistor-Transistor Logic such as the 7400 series, and CMOS which stands for Complementary Metal-Oxide-Silicon which is the 4000 series of chips. Generally speaking, this refers to the logic technology used to manufacture the Integrated Circuit, (IC) or "chip" as it is commonly called. TTL IC's use NPN type Bipolar Junction Transistors while CMOS IC's use Field Effect Transistors or FET's for both their input and output circuitry. By using TTL and CMOS technology, simple digital logic gates can also be made by connecting together diodes and resistors to produce RTL, Resistor-Transistor Logic circuits but these are now less common. Integrated Circuits or IC's as they are more commonly called, can be grouped together into families according to the number of transistors or "gates" that they contain. For example, a simple AND gate my contain only a few individual transistors, where as a more complex microprocessor may contain many thousands of individual transistor gates. A general classification for the number of gates within a single chip is given as: Classification of Integrated Circuits 

Small Scale Integration or

SSI -



Medium Scale Integration or

MSI - in between 10 and 100 transistors or gates



Large Scale Integration or

LSI -



Very-Large Scale Integration or

VLSI - between 1,000 and 10,000 transistors or gates



Super-Large Scale Integration or

SLSI - between 10,000 and 100,000 transistors or gates



Ultra-Large Scale Integration or

ULSI - more than 1 million transistors or gates

up to 10 transistors or gates

in between 100 and 1,000 transistors or gates

While the ultra large scale ULSI classification is less well used, another level of integration which represents the complexity of the Integrated Circuit is known as the System-on-Chip or (SOC). Here individual components such as the microcontroller, memory, peripherals, I/O logic etc, are all produced on a single piece of silicon and which represents a whole electronic system within one single chip. These chips are generally used in Mobile Phones, Digital Cameras, Microcontrollers and robotic applications etc, and can contain up to 100 million individual Silicon-CMOS transistor gates within a single chip.

The Digital Logic "AND" Gate __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -11-

Departments of Electronics Engg. 2009-2010

2-input AND Gate Symbol

Truth Table

Boolean Expression Q = A.B

B

A

Q

0

0

0

0

1

0

1

0

0

1

1

1

Read as A AND B gives Q

3-input AND Gate Symbol

Boolean Expression Q = A.B.C

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

Read as A AND B AND C gives Q

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.

The Boolean Expression for this 6-input AND gate will therefore be: Q = (A.B).(C.D).(E.F) Transistor AND Gate __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -12-

Departments of Electronics Engg. 2009-2010 A simple 2-input logic AND gate can be constructed using transistor switches connected together as shown below with the inputs connected directly to the transistor bases.

The Digital Logic "OR" Gate 2-input OR Gate Symbol

Boolean Expression Q = A+B

Truth Table B

A

Q

0

0

0

0

1

1

1

0

1

1

1

1

Read as A OR B gives Q

3-input OR Gate Symbol

Boolean Expression Q = A+B+C

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

Read as A OR B OR C gives Q

__________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -13-

Departments of Electronics Engg. 2009-2010 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.

The Boolean Expression for this 6-input OR gate will therefore be: Q = (A+B)+(C+D)+(E+F) Transistor OR Gate A simple 2-input logic OR gate can be constructed using transistor switches connected together as shown below with the inputs connected directly to the transistor bases.

The Digital Inverter or NOT gate Symbol

Boolean Expression Q = not A or A

Truth Table A

Q

0

1

1

0

Read as inverse of A gives Q

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 __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -14-

Departments of Electronics Engg. 2009-2010 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 i.c. package. Transistor NOT Gate A simple logic NOT gate can be constructed using a transistor switch as shown below with the input connected directly to the transistor base terminal.

The Logic "NAND" Gate Definition The Logic NAND Gate is a combination of the digital logic AND gate with that of an inverter or NOT gate connected together in series. The NAND (Not - AND) gate has an output that is normally at logic level "1" and only goes "LOW" to logic level "0" when ALL of its inputs are at logic level "1". The Logic NAND Gate is the reverse or "Complementary" form of the AND gate we have seen previously. Logic NAND Gate Equivalence

The logic or Boolean expression given for a logic NAND gate is that for Logical Addition, which is the opposite to the AND gate, and which it performs on the complements of the inputs. The Boolean expression for a logic NAND gate is denoted by a single dot or full stop symbol, (.) with a line or Overline, ( ‾‾ ) over the expression to signify the NOT or logical negation of the NAND gate giving us the Boolean expression of: A.B = Q.

__________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -15-

Departments of Electronics Engg. 2009-2010 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"

The Digital Logic "NAND" Gate 2-input NAND Gate Symbol

Boolean Expression Q = A.B

Truth Table B

A

Q

0

0

1

0

1

1

1

0

1

1

1

0

Read as A AND B gives NOT Q

3-input NAND Gate Symbol

Boolean Expression Q = A.B.C

Truth Table C

B

A

Q

0

0

0

1

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

0

Read as A AND B AND C gives NOT Q

As with the AND function seen previously, the NAND function can also have any number of individual inputs and commercial available NAND Gate i.c.´s are available in standard 2, 3, or 4 input types. If additional inputs are required, then the standard NAND gates can be cascaded together to provide more inputs for example.

The Boolean Expression for this 4-input logic NAND gate will therefore be: Q = A.B.C.D __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -16-

Departments of Electronics Engg. 2009-2010

The Logic "NOR" Gate Definition The Logic NOR Gate or Inclusive-NOR gate is a combination of the digital logic OR gate with that of an inverter or NOT gate connected together in series. The NOR (Not - OR) gate has an output that is normally at logic level "1" and only goes "LOW" to logic level "0" when ANY of its inputs are at logic level "1". The Logic NOR Gate is the reverse or "Complementary" form of the OR gate we have seen previously.

NOR Gate Equivalent

The logic or Boolean expression given for a logic NOR gate is that for Logical Multiplication which it performs on the complements of the inputs. The Boolean expression for a logic NOR gate is denoted by a plus sign, (+) with a line or Overline, ( ‾‾ ) over the expression to signify the NOT or logical negation of the NOR gate giving us the Boolean expression of: A+B = Q. 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"

The Digital Logic "NOR" Gate 2-input NOR Gate Symbol

Boolean Expression Q = A+B

Truth Table B

A

Q

0

0

1

0

1

0

1

0

0

1

1

0

Read as A OR B gives NOT Q

__________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -17-

Departments of Electronics Engg. 2009-2010 3-input NOR Gate Symbol

Boolean Expression Q = A+B+C

Truth Table C

B

A

Q

0

0

0

1

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

0

Read as A OR B OR C gives NOT Q

As with the OR function, the NOR function can also have any number of individual inputs and commercial available NOR Gate IC's are available in standard 2, 3, or 4 input types. If additional inputs are required, then the standard NOR gates can be cascaded together to provide more inputs for example.

The Boolean Expression for this 4-input NOR gate will therefore be: Q = A+B+C+D

The Exclusive-OR Gate Definition Previously, we have seen that for a 2-input OR gate, if A = "1", OR B = "1", OR BOTH A + B = "1" then the output from the gate is also at logic level "1" and this is known as an Inclusive-OR function because it includes the case of Q = "1" when both A and B = "1". If however, an output "1" is obtained ONLY when A = "1" or when B = "1" but NOT both together at the same time, then this type of gate is known as an Exclusive-OR function or an Ex-Or function for short because it excludes the "OR BOTH" case of Q = "1" when both A and B = "1". In other words the output of an Exclusive-OR 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" giving us the Boolean expression of: Q = (A ⊕ B) = A.B + A.B __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -18-

Departments of Electronics Engg. 2009-2010 The Exclusive-OR Gate function is achieved is achieved by combining standard gates together to form more complex gate functions. An example of a 2-input Exclusive-OR gate is given below.

The Digital Logic "Ex-OR" Gate 2-input Ex-OR Gate Symbol

Boolean Expression Q = A ⊕ B

Truth Table B

A

Q

0

0

0

0

1

1

1

0

1

1

1

0

Read as A OR B but NOT BOTH gives Q

Then, the logic function implemented by a 2-input Ex-OR is given as "either A OR B but NOT both" will give an output at Q. In general, an Ex-OR gate will give an output value of logic "1" ONLY when there are an ODD number of 1's on the inputs to the gate and this description can be expanded to apply to any number of individual inputs as shown below for a 3-input Ex-OR gate. 3-input Ex-OR Gate Symbol

Boolean Expression Q = A ⊕ B ⊕ C

Truth Table C

B

A

Q

0

0

0

0

0

0

1

1

0

1

0

1

0

1

1

0

1

0

0

1

1

0

1

0

1

1

0

0

1

1

1

1

Read as "any ODD number of Inputs" gives Q

The symbol used to denote and Inclusive-OR function is slightly different to that for the standard inclusive OR gate and is given a plus sign within a circle which is the mathematical "direct sum" symbol, and this is given as ⊕.

__________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -19-

Departments of Electronics Engg. 2009-2010 We said previously that the Ex-OR function is a combination of different basic logic gates and using the 2-input truth table above, we can expand the Ex-OR function to: Q = (A ⊕ B) = (A+B).(A.B) which means we can realise this new expression using the following individual gates.

The Exclusive-NOR Gate Definition The Exclusive-NOR Gate function or Ex-NOR for short, is a digital logic gate that is the reverse or complementary form of the Exclusive-OR function we look at in the previous section. It is a combination of the Exclusive-OR gate and the NOT gate but has a truth table similar to the standard NOR gate in that it has an output that is normally at logic level "1" and goes "LOW" to logic level "0" when ANY of its inputs are at logic level "1". However, an output "1" is also obtained if BOTH of its inputs are at logic level "1". For example, A = "1" and B = "1" at the same time giving us the Boolean expression of: Q = (A ⊕ B) = A.B + A.B In other words, the output of an Exclusive-NOR 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. The logic symbol for an Exclusive-NOR gate is simply an Exclusive-OR gate with a circle or "inversion bubble" at its output to represent the NOT function. The Exclusive-NOR Gate function is achieved by combining standard gates together to form more complex gate functions and an example of a 2-input Exclusive-NOR gate is given below.

The Digital Logic "Ex-NOR" Gate 2-input Ex-NOR Gate Symbol

Boolean Expression Q = A ⊕ B

Truth Table B

A

Q

0

0

1

0

1

0

1

0

0

1

1

1

Read if A AND B the SAME gives Q

Then, the logic function implemented by a 2-input Ex-NOR gate is given as "when both A AND B are the SAME" will give an output at Q. In general, an Exclusive-NOR gate will give an output value __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -20-

Departments of Electronics Engg. 2009-2010 of logic "1" ONLY when there are an EVEN number of 1's on the inputs to the gate (the inverse of the Ex-OR gate) except when all its inputs are "LOW", and this description can be expanded to apply to any number of individual inputs as shown below for a 3-input Exclusive-NOR gate. 3-input Ex-NOR Gate Symbol

Boolean Expression Q = A ⊕ B ⊕ C

Truth Table C

B

A

Q

0

0

0

1

0

0

1

0

0

1

0

0

0

1

1

1

1

0

0

0

1

0

1

1

1

1

0

1

1

1

1

0

Read as "any EVEN number of Inputs" gives Q

We said previously that the Ex-NOR function is a combination of different basic logic gates ExOR and a NOT gate, and by using the 2-input truth table above, we can expand the Ex-NOR function to: Q = A ⊕ B = (A.B) + (A.B) which means we can realise this new expression using the following individual gates. Ex-NOR Gate Equivalent Circuit

One of the main disadvantages of implementing the Ex-NOR function above is that it contains three different types logic gates the AND, NOT and finally an OR gate within its basic design. One easier way of producing the Ex-NOR function from a single gate type is to use NAND gates as shown below. __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -21-

Departments of Electronics Engg. 2009-2010

The "Universal" NAND Gate: The Logic NAND Gate is generally classed as a "Universal" gate because it is one of the most commonly used logic gate types. NAND gates can also be used to produce any other type of logic gate function, and in practice the NAND gate forms the basis of most practical logic circuits. By connecting them together in various combinations the three basic gate types of AND, OR and NOT function can be formed using only NAND's, for example.

Various Logic Gates using only NAND Gates

As well as the three common types above, Ex-Or, Ex-Nor and standard NOR gates can be formed using just individual NAND gates.

Ex-OR Function Realisation using NAND gates

Exclusive-OR Gates are used mainly to build circuits that perform arithmetic operations and calculations especially Adders and Half-Adders as they can provide a "carry-bit" function or as a controlled inverter, where one input passes the binary data and the other input is supplied with a control signal. __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -22-

Departments of Electronics Engg. 2009-2010

Ex-NOR Function Realisation using NAND gates

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 only NOR Gates

As well as the three common types above, Ex-Or, Ex-Nor and standard NOR gates can also be formed using just individual NOR gates. __________________________________________________________________________________ Prepared by: Mr. A.B. Shinde -23-

Departments of Electronics Engg. 2009-2010 Digital Logic Gates Summary We have seen that there are 3 main basic types of digital logic gates, the AND gate, the OR gate and the NOT gate. We also saw that each gate has an opposite or complementary form of itself in the form of the NAND gate, the NOR gate and the Buffer respectively, and that any of these individual gates can be connected together to form more complex Combinational Logic circuits. We also saw that both the NAND gate and the NOR gate can both be classed as "Universal" gates as they can be used to construct any other gate type. In fact, any combinational circuit can be constructed using only 2 or 3-input NAND or NOR gates. We also saw that NOT gates and Buffers are single input devices that can also have a 3-state High-impedance output which can be used to control the flow of data onto a common Data Bus wire. Logic Gates can be made from discrete components such as Resistors, Transistors and Diodes to form RTL (resistor-transistor logic) or DTL (diode-transistor logic) circuits, but today's modern digital 74xxx series integrated circuits are manufactured using TTL (transistor-transistor logic) based on NPN bipolar transistors or the faster CMOS MOSFET transistor logic used in 74Cxx and 4000 series logic chips. The 8 individual "standard" Digital Logic Gates are summarized below along with their corresponding truth tables. 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 -24-

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF