





































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to digital electronics, focusing on analog and digital signals, binary and octal number systems, logic gates, and boolean expressions. It covers topics such as decimal to binary conversion, basic logic gates (and, or, not, nand, nor, xor, xnor), and the advantages and disadvantages of digital electronics. The document also includes examples and exercises.
Typology: Essays (university)
1 / 45
This page cannot be seen from the preview
Don't miss anything!






































26.1 Analog and Digital Signals
26.3 Binary Number System
26.5 Decimal to Binary Conversion
26.7 Octal Number System
26.9 Binary-Coded Decimal Code (BCD Code)
26.11 Three Basic Logic Gates
26.13 AND Gate
26.15 Combination of Basic Logic Gates
26.17 Exclusive OR Gate
26.19 Advantages and Disadvan- tages of Digital Electronics
26.21 Boolean Theorems
26.23 Operator Precedence
26.25 Boolean Expressions for Combinational Logic Circuits
26.27 Truth Table from Logic Cir- cuit
26.29 Sum-of-Products Form
26.31 Binary Addition
26.33 Flip - Flops
○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
continuously varying signal (voltage or cur- rent) is called an analog signal. For example, a sinusoidal voltage is an analog signal. In the previous chapter, we studied the behaviour of diodes and transistors primarily from the analog or continuous- signal point of view. In an analog electronic circuit, the output voltage changes continuously according to the input voltage variations. In other words, the output voltage can have an infinite number of values. A signal (voltage or current) which can have only two discrete values is called a digital signal. For example, a square wave is a digital signal. The semiconductors devices ( e.g. diodes, transistors etc.) can be designed for two- state operation viz. , saturation and cut off. In that case, the output voltage can have only two states ( i.e ., values), either *low or high. An electronic circuit that is de- signed for two-state operation is called a digital circuit.
The branch of electronics which deals with digital circuits is called digital electronics. When most of us hear the term digital , we immediately think of “digital calculator” or “digital computer”. This is attributed to the dramatic way the low-cost, powerful calculators and computers have become accessible to an average person. Now digital circuits are being used in many electronic products such as video games, microwave ovens and oscilloscopes. Digital techniques have also replaced a lot of the older “analog circuits” used in consumer products such as radios, TV sets and high-fidelity sound recording and playback equipment. In this chapter, we shall discuss the fundamental aspects of digital electronics.
( i ) Analog signal. A continuously varying signal (voltage or current) is called an analog sig- nal. For example, an alternating voltage varying sinusoidally is an analog signal [See Fig. 26.1]. If such an analog signal is applied to the input of a transistor amplifier, the output voltage will also vary sinusoidally. 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 (voltage or current) that can have only two discrete values is called a digital signal. For example, a square wave is a digital signal [See Fig. 26.2]. 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 and Low. 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. In other words, the transistor will have two-state operations i.e ., output is either low or high. Since digital operation has only two states ( i.e ., ON or OFF ), it is far more reliable than many-valued analog operation. It is because with two- states operation, all the signals are easily recognised as either low or high.
Fig. 26.1 Fig. 26.
An electronic circuit that handles only a digital signal is called a digital circuit.
The output voltage of a digital circuit is either low or high and no other value. In other words, digital operation is a two-state operation. These states are expressed as ( High or Low ) or ( ON or OFF ) or (1 or 0). Therefore, a digital circuit is one that expresses the values in digits 1’s or 0’s. Hence the name digital. The numbering concept that uses only the two digits 1 and 0 is the binary numbering system. Therefore, the first step would be to discuss this number system.
A number system is a code that uses symbols to count the number of items. The most common and familiar number system is the decimal number system. The decimal number system uses the symbols 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Thus, the decimal system uses 10 digits for counting the items. A binary system uses only two digits (0 and 1) for counting the items. The reader may wonder how to count the items in a binary system. Let us see how it is done.
Thus, we find that values of various positions in a decimal number system are powers of 10 i.e ., equal to the number of digits used in the system. This number is called base or radix of the system. Thus, the decimal system has base of 10 (ten).
For the decimals, the digit to the extreme right is referred to as the least significant digit ( LSD ) because its positional value or weight is the lowest. For the decimal number 642, 2 is the LSD. The left-most digit in the decimal number is the most significant digit ( MSD ) because its positional value or weight is the highest. For the decimal number 642, 6 is the MSD with a value of 600.
Binary number system. In the binary number system, only two digits (0 and 1) are used. There- fore, the base of this system is 2. In a binary number, each position has a value that is 2 times the value of the next position to its immediate right. In other words, every position can be expressed by 2 raised to some power. We know that binary number 1001 is equal to the decimal number 9. This can be readily shown as under :
1001 = 1 × 2 3 + 0 × 22 + 0 × 2 1 + 1 × 2 0 = 9 For binary numbers, the digit at the extreme right is referred to as least significant bit ( LSB ). In the binary number 1001, the 1 at the right is the LSB. The left-most digit is called the most significant bit ( MSB ). In the binary number 1001, the 1 at the left is the MSB with the value of 8 in decimal terms.
There are many methods to perform this conversion. The method described here is called double- dabble because it requires successive divisions by 2. This method can be summarised as under :
Divide progressively the decimal number by 2 and write down the remainder after each division. Continue this process till you get a quotient of 0 and remainder of 1, the conversion is now complete. The remainders, taken in reverse order, form the binary number [See Fig. 26.4].
Note that 13 is first divided by 2, giving a quotient of 6 with a remainder of 1. This remainder becomes the 2^0 position in the binary number. The 6 is then divided by 2, giving a quotient of 3 with a remainder of 0. This remainder becomes the 2 1 position in the binary number.
Continuing this procedure, the equivalent binary number is 1101. Decimal number ↓ 13 ÷ 2 = 6 with a remainder of 1 2 0 ↑ LSB 6 ÷ 2 = 3 with a remainder of 0 2 1 3 ÷ 2 = 1 with a remainder of 1 2 2 1 ÷ 2 = 0 with a remainder of 1 2 3 MSB Fig. 26. Example 26.1. Convert the decimal number 37 to its equivalent binary number.
Solution. Using double-dabble method, we find that the equivalent binary number is 100101. It is a usual practice to mention the base of the number system. The decimal system has a base of 10 while binary system has a base of 2. ∴ (37) 10 = (100101) (^2) Note. This notation avoids the confusion that may arise because decimal number also involves the digits 0 and 1. Thus, (101) 10 denotes the decimal number hundred one while the binary number (101) 2 is equivalent to decimal number 5.
Example 26.2. Convert the decimal number 23 to its equivalent binary number. Solution. Using double-dabble method, we find that the equivalent binary number is 10111. ∴ (23) 10 = (10111) 2 Note that binary number 10111 has five bits.
Binary numbers can be converted to equivalent decimal numbers quite easily. Sup- pose you are given the binary number 110011. Its conversion to equivalent deci- mal number involves the following two steps : ( i ) Place the decimal value of each position of the binary number. ( ii ) Add all the decimal values to get the decimal number. Thus, (110011) 2 = 1 × 2 5 + 1 × 2 4 + 0 × 23 + 0 × 2 2 + 1 × 2 1 + 1 × 2 0 = 32 + 16 + 0 + 0 + 2 + 1 = 51 ∴ (110011) 2 = (51) 10 Note. In binary to decimal conversion, all positions containing 0 can be ignored. Only add the decimal values of the positions where 1 appears. Thus, in case of the above binary number,
(110011) 2 = 1 × 2 5 + 1 × 2 4 + 1 × 21 + 1 × 20 = 32 + 16 + 2 + 1 = 51 Example 26.3. Convert the binary number 110001 to its equivalent decimal number. Solution. The binary number along with its decimal values of various positions is shown. ∴ (110001) 2 = 1 × 2 5 + 1 × 24 + 1 × 20 1 1 0 0 0 1 = 32 + 16 + 1 = 49 25 24 2 3 2 2 2 1 2 0 or (110001) 2 = (49) 10
The octal number system has a radix of eight so that it uses eight digits : 0, 1, 2, 3, 4, 5, 6 and 7. The position weights in the system are powers of eight. The digit positions of first six powers of eight are:
80 = 1 ; 8 1 = 8 ; 8 2 = 64 83 = 512 ; 8 4 = 4096 ; 8 5 = 32768 The octal number system is frequently used in digital circuits due to two principal reasons. First, it can be easily converted to binary. Secondly, there are significantly fewer digits in any given octal number than in the corresponding binary number so that it is much easier to work with shorter octal numbers.
1. Decimal-to-Octal Conversion. To convert a decimal number to octal, we employ the same repeated-division method that we used in decimal-to-binary conversion. However, here the division factor is 8 instead of two. The following examples illustrate decimal-to-octal conversion.
( i ) To convert decimal number 91 to octal number, the procedure is as under : Division Remainder 91 ÷ 8 = 11 3 (LSB) 11 ÷ 8 = 1 3 1 ÷ 8 = 0 1 (MSB) ∴ (91) 10 = (133) 8 ( ii ) As another example, consider the conversion of decimal number 266 to octal number. Division Remainder 266 ÷ 8 = 33 2 (LSB) 33 ÷ 8 = 4 1
Note that there are fewer digits in the octal number than in the corresponding binary number. Therefore, it is much easier to work with shorter octal numbers.
Sometimes the binary number will not have even groups of 3 bits. In that case, we can add one or two 0s to the left of the MSB of the binary number to fill the last group. This point is illustrated below for the binary number 11010110.
^011 ^010 ^110 3 2 6 Note that a 0 is placed to the left of the MSB to produce even groups of 3 bits. Example 26.4. Convert the following decimal numbers to octal equivalent. ( i ) 76 ( ii ) 255 ( iii ) 372 Solution. ( i ) Division Remainder 76 ÷ 8 = 9 4 (LSB) 9 ÷ 8 = 1 1 1 ÷ 8 = 0 1 (MSB) ∴ (76) 10 = (114) 8 ( ii ) Division Remainder 255 ÷ 8 = 31 7 (LSB) 31 ÷ 8 = 3 7 3 ÷ 8 = 0 3 (MSB) ∴ (255) 10 = (377) 8 ( iii ) Division Remainder 372 ÷ 8 = 46 4 (LSB) 46 ÷ 8 = 5 6 5 ÷ 8 = 0 5 (MSB) ∴ (372) 10 = (564) 8 Example 26.5. Convert octal number (24.6) 8 to the equivalent decimal number. Solution. (24.6) 8 = (2 × 8 1 ) + (4 × 8^0 ) + (6 × 8 – 1) = 16 + 4 + 0.75 = 20. ∴ (24.6) 8 = (20.75) (^10) Example 26.6. Convert (177) 10 to its 8-bit binary equivalent by first converting to octal. Solution. We shall first convert (177) 10 to its equivalent octal number as under : Division Remainder 177 ÷ 8 = 22 1 (LSB) 22 ÷ 8 = 2 6 2 ÷ 8 = 0 2 (MSB) ∴ (177) 10 = (261) 8 We now convert the octal number (261) 8 to its equivalent binary number as under :
Therefore, the binary equivalent is 010110001. We remove the leading zero to express the result as 8 bits
∴ (177) 10 = (10110001) 2
The hexadecimal system uses a radix of 16. Therefore, it has 16 possible digit symbols. The first ten digits in the hexadecimal system are represented by the num- bers 0 through 9 (0, 1, 2, 3, 4, 5, 6, 7, 8 and 9) and the letters A though F are used to represent the numbers 10, 11, 12, 13, 14 and 15 respectively. The adjoining table shows the relationships among hexadecimal, deci- mal and binary. Note that each hexadecimal digit rep- resents a group of four binary digits.
As is true for binary and decimal numbers, each digit in the hexadecimal system has a positional value or weight. For the right most digit of a hex (abbrevia- tion for hexadecimal) number, the positional weight is 160 (= 1), the next digit to the left has a positional weight of 16^1 (= 16) and so on. The positional weight distribu- tion of a hex number system is given below:
etc.
1. Decimal-to-Hex Conversion. To convert a decimal number to hex number, the technique is the same as used for decimal-to-binary conversion or decimal-to-octal conversion. Recall that we did decimal-to-binary conversion using repeated divi- sion by 2 and decimal-to-octal conversion using repeated division by 8. Likewise, decimal-to-hex conversion is done using repeated division by 16. Let us illustrate the decimal-to-hex conversion procedure. Suppose we are to convert the decimal number 423 to hex number.
Division Remainder 423 ÷ 16 = 26 7 (LSB) 26 ÷ 16 = 1 10 1 ÷ 16 = 0 1 (MSB) ∴ (423) 10 = (1 A7) 16 Note that 10 is represented by the letter A.
2. Hex-to-Decimal Conversion. In order to convert a hex number to its decimal equivalent, simply add up the position weight of each digit in the hex number. The following example illustrates this conversion. (356) 16 = (3 × 16 2 ) + (5 × 16 1 ) + (6 × 16 0 ) = 768 + 80 + 6 = 854 ∴ (356) 16 = (854) 10 3. Hex-to-Binary Conversion. The conversion from hex to binary is performed by convert- ing each hex digit to its 4-bit binary equivalent (See above table). The following example illustrates this point. Here, we shall convert hex number (9 F2) 16 to its binary equivalent.
Hexadecimal Decimal Binary 0 0 0000 1 1 0001 2 2 0010 3 3 0011 4 4 0100 5 5 0101 6 6 0110 7 7 0111 8 8 1000 9 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111
Note that the highest BCD value that a 4-bit binary number could represent is 9 which would be (1001) 2 in binary. Clearly, only the 4-bit binary numbers from 0000 through 1001 are used.
The adjoining table shows the BCD code. Each of the decimal digits ( through 9) is represented by its binary equivalent. Since a decimal digit can be as large as 9, four bits are required to code each decimal digit (the binary code for 9 is 1001).
Note that each decimal digit is assigned a 4-bit binary number even though the binary equivalent may require fewer than four binary places. This way, cir- cuits which use BCD always handle the string of binary bits in four - place groups. When using BCD code, remember that all zeros must be retained, unlike a binary number where leading zeros can be dropped. The BCD code is used when it is necessary to transfer decimal information into and out of a digital machine. Examples of digital machines include the digital clocks, calculators, digital voltmeters and frequency counters.
Example 26.10. What decimal number is represented by the BCD string given below? 0100 0000 0010 Solution. Divide the BCD number into 4-bit groups and convert each to decimal. ^0100 ^0000 0010 4 0 2 Therefore, the equivalent decimal number is (402) 10. Note. To avoid confusion between BCD and true binary, a BCD string is often separated into groups of 4 binary bits or a subscript BCD is sometimes attached to the string as illustrated under :
0100 0000 0010 or (^010000000010) BCD
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. Fig. 26.5 shows the basic idea of a *logic gate using switches.
Fig. 26.
BCD Decimal code digit 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9
○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
( i ) When S 1 and S 2 are open, the bulb is OFF. ( ii ) When S 1 is open and S 2 closed, the bulb is OFF. ( iii ) When S 2 is open and S 1 closed, the bulb is OFF. ( iv ) When both S 1 and S 2 are closed, the bulb is ON. Note that output ( OFF or ON ) depends upon the conditions at the input. The four possible combinations of switches S 1 and S 2 are shown in the table on the previous page. It is clear that when either of the switches ( S 1 or S 2 ) or both are open, the bulb is OFF. In binary language, when either of the inputs or both the inputs are low (0), the output is low. When both switches are closed, the bulb is ON. In terms of binary language, when both the inputs are high (1), the output is high. It is usual practice to show the conditions at the input and output of a logic gate in the binary form as shown in the table on the previous page. Such a table is called truth table.
The term “logic” is usually used to refer to a decision-making process. A logic gate makes logical decisions regarding the existence of output depending upon the nature of the input. Hence, such circuits are called logic circuits.
A logic gate is a circuit that has one or more input signals but only one output signal. All logic gates can be analysed by constructing a truth table. A truth table lists all input possibilities and the corre- sponding 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. We shall first discuss these three basic logic gates and then the combination of these gates. 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.
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.
It is called OR gate because the output is high if any or all the inputs are high. For the same reason, an OR gate is sometimes called “any or all gate”. For example, consider a 2-input OR gate. The output Y will be high if either or both inputs are high.
OR gate operation. Fig. 26.6 ( i ) shows one way to build a 2-input OR gate while Fig. †26.6 ( ii ) shows its simplified schematic diagram. The input voltages are labeled as A and B while the output voltage is Y. Note that negative terminal of the battery is grounded and corresponds to 0 state (LOW level). The positive terminal of the battery (+5 V) corresponds to 1 state (HIGH level). There are only four input-output possibilities.
○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
It is called AND gate because output is HIGH only when all the inputs are HIGH. For this reason, the AND gate is sometimes called “all or nothing gate”. For example, consider a 2-input AND gate. The output will be HIGH when both the inputs are HIGH.
AND gate operation. Fig. 26.8 ( i ) shows one way to build a 2-input AND gate while *Fig. 26. ( ii ) shows its simplified schematic diagram. There are only four input-output possibilities.
Fig. 26. ( i ) When both A and B are connected to ground, both the diodes ( D 1 and D 2 ) are forward biased and hence they conduct current. Consequently, the two diodes are grounded and output voltage is zero. In terms of binary, when A = 0 and B = 0, then Y = 0 as shown in truth table in Fig. 26.8 ( iii ). ( ii ) When A is connected to the ground and B connected to the positive terminal of the battery, diode D 1 is forward biased while diode D 2 will not conduct. Therefore, diode D 1 conducts and is grounded. Again output voltage will be zero. In binary terms, when A = 0 and B = 1, then Y = 0. This fact is shown in the truth table. ( iii ) When B is connected to the ground and A connected to the positive terminal of the battery, the roles of diodes are interchanged. Now diode D 2 will conduct while diode D 1 does not conduct. As a result, diode D 2 is grounded and again output voltage is zero. In binary terms, when A = 1 and B = 0, then Y = 0. This fact is indicated in the truth table. ( iv ) When both A and B are connected to the positive terminal of the battery, both the diodes do not conduct. Now, the output voltage is +5 V because there is no current through R (^) L.
It is clear from the truth table that for AND gate, the output is high if all the inputs are high. However, the output is low if any or all inputs are low. Fig. 26.9 shows the logic symbol of AND gate. This is the symbol you should memorise and use from now on for AND gates.
Boolean expression. The Boolean expression for AND function is A. B = Y ↑ AND symbol
where the multiplication **dot stands for the AND operation. The adjoining table shows the possi- bilities for the inputs. Table tells us that 0 ANDed with any variable equals 0. Also, 1 ANDed with 1 equals one. The AND function can be summed up as under :
0 ANDed with 0 equals 0 0 ANDed with 1 equals 0 1 ANDed with 1 equals 1
Fig. 26. ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
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.
Fig. 26. Figure 26.10 ( i ) shows a *typical inverter circuit. When A is connected to ground, the base of transistor Q 1 will become negative. This negative potential causes the transistor to cut off and collec- tor current is zero and output is + V volts. In binary terms, when A = 0, Y = 1. If sufficiently large positive voltage is applied at A , the base of the transistor will become positive, causing the transistor to conduct heavily. Therefore, the output voltage is zero. In binary terms, when A = 1, Y = 0. Fig. 26.10 ( ii ) shows truth table for an inverter. It is clear from the truth table that whatever the input to the inverter, the output assumes opposite polarity. If the input is 0, the output will be 1 ; if the input is 1, the output will be 0.
Figure 26.10 ( iii ) shows the logic symbol for NOT gate or inverter. Note that small bubble on the inverter symbol represents inversion. The Boolean expression for NOT function is
Y = A Note that bar above the input A represents inversion.
If A = 0, then (^) Y = 0 or Y = 1.
If A = 1, then Y = 1 or Y = 0.
The OR, AND and NOT gates are the three basic circuits that make up all digital circuits. We shall discuss a few combinations of these basic circuits.
( i ) 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 as shown in Fig. 26.11 ( i ). 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
Y = (^) A · B This Boolean expression can be read as Y = not A. B. To perform the Boolean algebra operation,
○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Fig. 26.
( i ) NOT gate from NAND gate. When two inputs of NAND gate are joined together so that it has one input, the resulting circuit is NOT gate. The truth table also shows this fact.
( ii ) AND gate from NAND gates. For this purpose, we use two NAND gates in a manner as shown above. The output of first NAND gate is given to the second NAND gate acting as in- verter ( i.e ., inputs of NAND gate joined). The resulting circuit is the AND gate. The output Y ′ of first NAND gate (AND gate followed by NOT gate) is inverted output of AND gate. The second NAND gate acting as inverter further inverts it so that the final output Y is that of AND gate. The truth table also shows this fact.
( iii ) OR gate from NAND gates. For this purpose, we use three NAND gates in a manner as shown above. The first two NAND gates are operated as NOT gates and their outputs are fed to the third. The resulting cir- cuit is OR gate. This fact is also indicated by the truth table.
The name exclusive OR gate is usually shortened to XOR gate. The XOR gate can be obtained by using OR, AND and NOT gates as shown in Fig. 26.14 ( i ).
Fig. 26.14 ( ii ) shows the truth table for XOR gate. The table shows that the output is HIGH (1) if any but not all of the inputs are HIGH (1). This exclusive feature eliminates the similarity to the OR gate. The OR gate truth table is also given so that you can compare the OR gate truth table with XOR gate truth table. The logic symbol for XOR gate is shown in Fig. 26.14 ( iii ). Note that the symbol is similar to that of OR gate except for the additional curved line at the input side.
Fig. 26. The logic operations in the circuit are as under :
A B (^) A B A ⋅ B = Y ′ A · B = Y ′′ Y = Y ′ + Y ″
0 0 1 1 0 0 0 1 0 0 1 0 1 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0
Note that 0 ANDed with 1 is 0 and 1 ANDed with 1 is 1.
Example 26.11. Obtain the truth table for the circuit shown in Fig. 26.15 (i). Solution. Figure 26.15 ( ii ) shows the truth table for the circuit. The truth table can be obtained very easily if the reader remembers the following simple Boolean operations :
Fig. 26.
( i ) 0 *ORed with 0 = 0 ; 1 ORed with 1 = 1 ; 1 ORed with 0 = 1 ( ii ) 0 **ANDed with 0 = 0 ; 0 ANDed with 1 = 0 ; 1 ANDed with 1 = 1 Thus, when A = 0 and B = 0, then A ORed with B = 0 i.e ., Y ′ = 0. When Y ′ (= 0) is ANDed with A (= 0), the result is 0. Again when A = 1 and B = 0, then A ORed with B is 1 i.e ., Y ′ = 1. Now Y ′ (= 1) ANDed with A (= 1), the result is 1.
Example 26.12. Obtain the truth table for the circuit shown in Fig. 26.16.
○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○
Fig. 26.
CPU is fed to the decoder which changes the binary signal back to the decimal form. The output display is in the decimal form, showing the original number 5.
The world of electronics can be classified as either digital or analog circuits. An increasing majority of applications in electronics use digital techniques to perform operations that were once performed using analog methods. It is worthwhile to give advantages and disadvantages of digital electronics.
Advantages. The chief reasons for the shift to digital technology are : ( i ) Digital systems are generally easier to design. It is because the circuits that are used are switching circuits where exact values of voltages or currents are not important, only the range (HIGH or LOW) in which they fall is important.
( ii ) Digital circuits provide greater accuracy and precision. It is because digital circuits can handle as many digits of precision as you need simply by adding more switching circuits. In analog systems, precision is usually limited to three or four digits because the values of voltage and current are directly dependent on the circuit components.
( iii ) Digital circuits are less affected by noise. Suprious fluctuations in voltage (noise) are not as critical in digital systems as in analog systems. It is because in a digital circuit, the exact value of a voltage is not important as long as the noise is not large enough to prevent us from distinguishing a HIGH from a LOW.
( iv ) More digital circuitry can be fabricated on IC chips. Analog system uses such devices (high-value capacitors, inductors, transformers) that cannot be economically integrated. For this reason, analog systems cannot achieve the same degree of integration as digital circuits.
( v ) Information storage is easy with digital circuits.
Disadvantages. ( i ) The real world is mainly analog. However, the digital circuits can handle only digital signals. This necessitates encoders and decoders which increase the cost of the equip- ment.
( ii ) There are situations where using only analog techniques is simpler and more economical. For example, the process of signal amplification is most easily accomplished using analog circuitry.
However, advantages of digital techniques outweigh the disadvantages. For this reason, we are fast switching to digital techniques.
Digital circuits perform the binary arithmetic operations with binary digits 1 and 0. These opera- tions are called logic functions or logical operations. The algebra used to symbolically describe logic functions is called Boolean algebra. Boolean algebra is a set of rules and theorems by which logical operations can be expressed symbolically in equation form and be manipulated mathemati- cally. As with the ordinary algebra, the *letters of alphabet ( e.g. A , B , C etc.) can be used to represent the variables. Boolean algebra differs from ordinary algebra in that Boolean constants and variables can have only two values ; 0 and 1. There are four connecting symbols used in Boolean algebra viz.
( i ) equals sign (=) ( ii ) plus sign (+) ( iii ) multiply sign (·) ( iv ) bar (–) ( i ) Equals sign (=). The equals sign in Boolean algebra refers to the standard mathematical equality. In other words, the logical value on one side of the sign is identical to the logical value on the other side of the sign. Suppose we are given two logical variables such that A = B. Then if A = 1, then B = 1 and if A = 0, then B = 0.
( ii ) Plus sign (+). The plus sign in Boolean algebra refers to the logical OR operation. Thus,
when the statement A + B = 1 appears in Boolean algebra, it means A ORed with B equals 1. Conse- quently, either A = 1 or B = 1 or both equal 1.
( iii ) Multiply sign (·). The multiply sign in Boolean algebra refers to AND operation. Thus, when the statement A · B = 1 appears in Boolean algebra, it means A ANDed with B equals 1. Consequently, A = 1 and B = 1. The function A · B is often written as AB , omitting the dot for convenience.
( iv ) Bar sign (–). The bar sign in Boolean algebra refers to NOT operation. The NOT has the effect of inverting (complementing) the logical value. Thus, if A = 1, then A = 0.
We now discuss the basic Boolean theorems that are useful in manipulating and simplifying Boolean expressions. For convenience, we divide the theorems into two groups :
( i ) Single variable theorems ( ii ) Multivariable theorems ( i ) Single variable theorems. These theorems refer to the condition when only one input to the logic gate is variable. Table 26.1 gives single variable Boolean theorems.
○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○