Digital Electronics – Binary Codes ”; Previous Next Binary codes are one of the important concepts in digital electronics. A binary code is a type of digital code consisting of two digits, 0 and 1. Binary codes act as the primary language in any digital computing system. Binary codes can represent different types of information such as numbers, letters, images, videos, etc. In this chapter, we will explain the basics of binary codes, their working, advantages, limitations, and applications. What are Binary Codes? Binary codes are used to represent text, numbers, images, or other types of information in the form of 0 and 1, i.e., binary digits. Binary codes form the primary language of a digital computing system like a computer. All digital system can understand and manipulate information expressed in binary language only. In the case of binary codes, each digit is called a binary digit or bit. Binary codes represents information using 0 and 1. In a digital system, the binary codes are organized into segments like bits or bytes. A bit is either a binary 0 or 1. When 8 bits are grouped together, then it is called a byte. Each byte represents a piece of information in a digital system. Types of Binary Codes Binary codes can be classified into the following major types − Weighted Binary Codes Non-weighted Binary Codes Alphanumeric Code Binary Coded Decimal (BCD) Error Detecting Code Error Correction Code Let us discuss each type of code in detail. Weighted Binary Codes Weighted binary codes are a type of binary code in which each bit position has a specific weight associated with its positional value. In weighted binary codes, the positional weights are defined in terms powers of 2. The value of each bit depends on its position in the binary code. Thus, in a given weighted binary code, the rightmost bit has the least weight and the leftmost bit has the highest weight. In general, the weight of nth bit in a weighted binary code is given by, nth bit = 2n For example, let a 4-bit weighted binary code 1011. The value of the code is, 1 × 23 + 0 × 22 + 1 × 21 + 1 × 20 1 × 8 + 0 × 4 + 1 × 2 + 1 × 1 8 + 0 + 2 + 1 = 11 It is clear that the rightmost bit has a positional weight of 20 = 1, whereas the leftmost bit has a positional weight of 23 = 8. Examples of weighted binary codes are 8421 BCD code, 5211 code, 2421 code, etc. Non-Weighted Binary Codes In digital electronics, the type of digital or binary codes in which each bit position does not have a specific weight associated with it is known as a non-weighted binary code. In non-weighted binary codes, the value of the bit does not depend on the position within the number. Each bit position has an equal positional value. Examples of non-weighted binary codes include Excess-3 code and Gray code. Excess-3 Code Excess-3 code is also called as XS-3 code. It is a type of non-weighted code used to express decimal numbers. Excess-3 code words are derived from the 8421 BCD code words adding (0011)2 or (3)10 to each code word in 8421. Excess-3 codes are obtained as follows − Take a look at the following example − Gray Code Gray codes are a type of non-weighted code. They are not arithmetic codes, which means there are no specific weights assigned to the bit position. Gray codes have a very special feature that, only one bit will change each time the decimal number is incremented (see the figure below). As only one bit changes at a time, gray codes are also known unit distance code. Gray codes are cyclic codes and they cannot be used in arithmetic operation. Gray codes are popularly used in Shaft Position encoders. A shaft position encoder produces a code word that represents the angular position of the shaft. Alphanumeric Codes A binary digit or bit can represent only two states ”0” or ”1”. But this is not enough for communication between two computers because there we need many more symbols for communication. These symbols are required to represent 26 alphabets with capital and small letters, numbers from 0 to 9, punctuation marks and other symbols. Alphanumeric codes are the codes that represent numbers and alphabetic characters. Mostly such codes also represent other characters such as symbol and various instructions necessary for conveying information. Alphanumeric codes are binary codes that use character encoding schemes that represent both numbers and alphabetic characters. Alphanumeric codes are mainly used in applications involving character representation and information exchange. Some common examples of alphanumeric codes are ASCII (American Standard Code for Information Interchange), Extended ASCII, EBCDIC (Extended Binary Coded Decimal Interchange Code), Unicode, etc. An alphanumeric code should at least represent 10 digits and 26 letters of the alphabet, i.e., total 36 items. The following three alphanumeric codes are very commonly used for data representation − American Standard Code for Information Interchange (ASCII) Extended Binary Coded Decimal Interchange Code (EBCDIC) Five bit Baudot Code ASCII code is a 7-bit code, whereas EBCDIC is an 8-bit code. ASCII code is more commonly used, while EBCDIC is used primarily in large IBM computers. Binary Coded Decimal (BCD) Binary coded decimal or BCD is a binary code used to represent decimal numbers in their digital format. In this code, each decimal digit is represented by a 4-bit binary number. BCD is a way to express each of the decimal digits with a binary code.
Category: digital-electronics
Signed Binary Arithmetic
Signed Binary Arithmetic ”; Previous Next In this chapter, let us discuss about the basic arithmetic operations, which can be performed on any two signed binary numbers using 2’s complement method. The basic arithmetic operations are addition and subtraction. Addition of two Signed Binary Numbers Consider the two signed binary numbers A & B, which are represented in 2’s complement form. We can perform the addition of these two numbers, which is similar to the addition of two unsigned binary numbers. But, if the resultant sum contains carry out from sign bit, then discard (ignore) it in order to get the correct value. If resultant sum is positive, you can find the magnitude of it directly. But, if the resultant sum is negative, then take 2’s complement of it in order to get the magnitude. Example 1 Let us perform the addition of two decimal numbers +7 and +4 using 2’s complement method. The 2’s complement representations of +7 and +4 with 5 bits each are shown below. $$\mathrm{(+7)_{10} \: = \: (00111)_{2}}$$ $$\mathrm{(+4)_{10} \: = \: (00100)_{2}}$$ The addition of these two numbers is $$\mathrm{(+7)_{10} \: + \: (+4)_{10} \: = \: (00111)_{2} \: + \: (00100)_{2}}$$ $$\mathrm{\Rightarrow \: (+7)_{10} \: + \: (+4)_{10} \: = \: (01011)_{2}}$$ The resultant sum contains 5 bits. So, there is no carry out from sign bit. The sign bit ‘0’ indicates that the resultant sum is positive. So, the magnitude of sum is 11 in decimal number system. Therefore, addition of two positive numbers will give another positive number. Example 2 Let us perform the addition of two decimal numbers -7 and -4 using 2’s complement method. The 2’s complement representation of -7 and -4 with 5 bits each are shown below. $$\mathrm{(−7)_{10} \: = \: (11001)_{2}}$$ $$\mathrm{(−4)_{10} \: = \: (11100)_{2}}$$ The addition of these two numbers is $$\mathrm{(−7)_{10} \: + \: (−4)_{10} \: = \: (11001)_{2} \: + \: (11100)_{2}}$$ $$\mathrm{\Rightarrow \: (−7)_{10} \: + \: (−4)_{10} \: = \: (110101)_{2}}$$ The resultant sum contains 6 bits. In this case, carry is obtained from sign bit. So, we can remove it Resultant sum after removing carry is (−7)10 + (−4)10 = (10101)2. The sign bit ‘1’ indicates that the resultant sum is negative. So, by taking 2’s complement of it we will get the magnitude of resultant sum as 11 in decimal number system. Therefore, addition of two negative numbers will give another negative number. Subtraction of two Signed Binary Numbers Consider the two signed binary numbers A & B, which are represented in 2’s complement form. We know that 2’s complement of positive number gives a negative number. So, whenever we have to subtract a number B from number A, then take 2’s complement of B and add it to A. So, mathematically we can write it as A – B = A + (2”s complement of B) Similarly, if we have to subtract the number A from number B, then take 2’s complement of A and add it to B. So, mathematically we can write it as B – A = B + (2”s complement of A) So, the subtraction of two signed binary numbers is similar to the addition of two signed binary numbers. But, we have to take 2’s complement of the number, which is supposed to be subtracted. This is the advantage of 2’s complement technique. Follow, the same rules of addition of two signed binary numbers. Example 1 Let us perform the subtraction of two decimal numbers +7 and +4 using 2’s complement method. The subtraction of these two numbers is $$\mathrm{(+7)_{10} \: − \: (+4){10} \: = \: (+7)_{10} \: + \: (−4)_{10}}$$ The 2’s complement representation of +7 and -4 with 5 bits each are shown below. $$\mathrm{(+7)_{10} \: = \: (00111)_{2}}$$ $$\mathrm{(+4)_{10} \: = \: (11100)_{2}}$$ $$\mathrm{\Rightarrow \: (+7)_{10} \: + \: (+4)_{10} \: = \: (00111)_{2} \: + \: (11100)_{2} \: = \: (00011)_{2}}$$ Here, the carry obtained from sign bit. So, we can remove it. The resultant sum after removing carry is $$\mathrm{(+7)_{10} \: + \: (+4)_{10} \: = \: (00011)_{2}}$$ The sign bit ‘0’ indicates that the resultant sum is positive. So, the magnitude of it is 3 in decimal number system. Therefore, subtraction of two decimal numbers +7 and +4 is +3. Example 2 Let us perform the subtraction of two decimal numbers +4 and +7 using 2’s complement method. The subtraction of these two numbers is $$\mathrm{(+4)_{10} \: − \: (+7)_{10} \: = \: (+4)_{10} \: + \: (−7)_{10}}$$ The 2’s complement representation of +4 and -7 with 5 bits each are shown below. $$\mathrm{(+4)_{10} \: = \: (00100)_{2}}$$ $$\mathrm{(-7)_{10} \: = \: (11001)_{2}}$$ $$\mathrm{\Rightarrow \: (+4)_{10} \: + \: (-7)_{10} \: = \: (00100)_{2} \: + \: (11001)_{2} \: = \: (11101)_{2}}$$ Here, carry is not obtained from sign bit. The sign bit ‘1’ indicates that the resultant sum is negative. So, by taking 2’s complement of it we will get the magnitude of resultant sum as 3 in decimal number system. Therefore, subtraction of two decimal numbers +4 and +7 is -3. Print Page Previous Next Advertisements ”;
Simplifications of Boolean Algebra ”; Previous Next What is a Karnaugh Map (K-Map)? K-Map is a graphical tool used for simplifying Boolean expressions represented in their standard form to obtain their minimal form. The K-Map is basically a graph or chart that composed of an arrangement of adjacent cells or squares, where each cell represents a particular combination of variables of the function either in sum or product form. The number of cells in the K-Map depends upon number of variables in the Boolean function, i.e., K-map has 2n adjacent cells, where n is the number of variables in the Boolean expression. Therefore, the number of cells in a 2 variable K-map are 4 (22), in 3 variable KMap, the number of cells are 8 (23), in 4 variable K-map, the number of cells are 16 (24), and so on. However, we can use the K Map for any number of variables. But, for simplifying Boolean functions in variables more than 5, it becomes tedious. Now, let us discuss the procedure of simplifying a Boolean expression using K-Map. Steps to Simplify a Boolean Expression using K Map The following steps are involving in simplification of a given Boolean expression by using K-Map − Step 1 − Select a K-Map as per the number of variables in the given Boolean function. Step 2 − Identify the minterms (in SOP form) or maxterms (in POS form). Step 3 − For SOP (Sum of Products) Form, put 1s in cells of the K-Map with respect to the minterms of given function. Read the K-Map as follows − Read the K-map for 1s which are not adjacent to any other 1. These 1s are the isolated minterms, thus they are to be read as they are, because they cannot be combine in groups. Read the K-map for 1s which are adjacent only one other 1. Combine such minterms in 2-squares. Read the K-map for quads (4-squares), octets (8-squares), and so on of adjacent 1s even if they have some 1s which are already combined in other groups. The only thing to remember that they must geometrically form a rectangle or a square. Read the K-map for any 1s that have not been grouped yet and group them into bigger squares or rectangles if possible. Finally, obtain product terms of all the groups, and then sum up them to form the minimal SOP expression. For POS (Product of Sums) Form, put 0s in cells of the K-Map with respect to the maxterms of given function. Read the K-Map as follows − Read the K-map for 0s which are not adjacent to any other 0. These 0s are the isolated maxterms, thus they are to be read as they are, because they cannot be combine in groups. Read the K-map for 0s which are adjacent only one other 0. Combine such maxterms in 2-squares. Read the K-map for quads (4-squares), octets (8-squares), and so on of adjacent 0s even if they have some 0s which are already combined in other groups. The only thing to remember that they must geometrically form a rectangle or a square. Read the K-map for any 0s that have not been combined yet and combine them into bigger squares or rectangles if possible. Finally, obtain sum terms of all the groups, and then product them to form the minimal POS expression. Let us understand this procedure of simplifying Boolean expression using K-map with the help of some solved examples. Example 1 Simplify the following 3-variable Boolean function in SOP form using K-Map. $$\mathrm{F(P, \: Q, \:R) \: = \: \sum m ( 0, \: 1, \: 3, \: 5, \: 7)}$$ Solution The K-Map representation of the given Boolean function is shown in Figure-1. The simplification of this K-map is done as per the following steps − There are no isolated 1s. The minterm m1 forms a 4-square with minterms m3, m5, and m7. Make it and read it as R. The minterm m0 forms a 2-square with the minterm m1. Make it and read it as $\mathrm{\bar{P} \: \bar{Q}}$ Write all the product terms in SOP form. Thus, the simplified SOP expression is, $$\mathrm{F \: = \: R \: + \: \bar{P}\bar{Q}}$$ Example 2 Simplify the following 3-variable Boolean function in POS form using K-Map. $$\mathrm{F(A, \: B, \: C) \: = \: \Pi \: M(1, \: 2, \: 4, \: 6)}$$ Solution The POS K-map representation of the given Boolean function is shown in Figure-2. The simplification of this POS K-map is done as per the following steps − The maxterm M1 has no adjacency. Thus, keep it as it is and read it as $\mathrm{(A \: + \: B \: + \: \bar{C})}$. The maxterm M2 has only one adjacency M6. Hence, expand the maxterm M2 into a 2-square with the maxterm M6 and read the 2-square as $\mathrm{(\bar{B} \: + \: C)}$. The maxterm M4 also has only one adjacency M6. Hence, expand the maxterm M4 into a 2-square with the maxterm M6 and read the 2-square as $\mathrm{(\bar{A} \: + \: C)}$. Write all the sum terms in POS form. Therefore, the simplified POS expression is, $$\mathrm{F \: = \: (A \: + \: B \: + \: \bar{C}) \: (\bar{B} \: + \: C) \: (\bar{A} \: + \: C)}$$ Example 3 Simplify the following 4-variable Boolean function in SOP form to obtain the minimal SOP expression. $$\mathrm{F(A, \: B, \: C, \:D) \: = \: \sum \: m( 0,\: 1, \:3, \: 5, \: 7, \: 6, \: 10, \: 13, \: 14, \: 15)}$$ Solution
Number Systems
Digital Electronics – Number Systems ”; Previous Next A digital number system is a positional number system that has some symbols called digits. It provides a complete set of digits, operators, and rules to perform operations. In a digital number system, the number of digits used determines the base of the number system. For example, the binary number system has two digits (0 and 1), hence, the base of the binary number system is 2. Digital number systems form the foundation of the modern computing technologies and digital electronics. They are used to represent, process, and manipulate the information using a digital system. In this chapter, we will discuss the fundamental concepts of different types of digital number systems. Types of Digital Number Systems In digital electronics, the following four types of digital number systems are mainly used − Binary Number System Decimal Number System Octal Number System Hexadecimal Number System Let’s discuss each of these number systems in detail. Binary Number System Binary number system is the fundamental building block behind the implementation and working of all digital systems. Binary number system has two symbols or digits, i.e., 0 and 1. Hence, these two digits are used to represent information and perform all the digital operations. Each binary digit is called a bit. Since there are two digits are used in the binary number system, hence its base is 2. Therefore, the value of a binary number is calculated as the sum of powers of 2. Binary digits are used in digital system to represent their ON and OFF states. Where, 0 is used to represent the OFF state of the digital system and 1 is used to represent the ON state of the system. Overall, the binary number system forms the foundation of computation, digital communication, and digital information storage. Example Consider the binary number 1101.011. The integer part of this number is 1101 and the fractional part of this number is 0.011. The digits 1, 0, 1 and 1 of the integer part have weights of 20, 21, 22, 23 respectively. Similarly, the digits 0, 1 and 1 of fractional part have weights of 2-1, 2-2, 2-3 respectively. Mathematically, we can write it as, $$\mathrm{1101.011 \: = \: (1 \: \times \: 2^{3}) \: + \:(1 \: \times \: 2^{2}) \: + \: (0 \: \times \: 2^{1}) \: + \: (1 \: \times \: 2^{0}) \: + \: (0 \: \times \: 2^{−1}) \: + \: (1 \: \times \: 2^{−2}) \: + \: (1 \: \times \: 2^{−3})}$$ After simplifying the right-hand side terms, we will get a decimal number, which is an equivalent of binary number on left-hand side. Decimal Number System Decimal number system is not inherently a digital number system. But it is widely used to represent the digital information in a human readable format. Decimal number system is a base 10 number system having 10 unique digits i.e., 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. It is the standard number system used by human beings to represent information in a natural way. However, a digital system cannot directly process the information represented in decimal form, so it is converted into binary form and then processed. The base of the decimal number system is 10. So, the value of a decimal number is calculated by the sum of powers of 10. Example Consider the decimal number 1358.246. The integer part of this number is 1358 and the fractional part of this number is 0.246. The digits 8, 5, 3 and 1 have weights of (10)0, (10)1, (10)2 and (10)3 respectively. Similarly, the digits 2, 4 and 6 have weights of (10)-1, (10)-2 and (10)-3 respectively. Mathematically, we can write it as, $$\mathrm{1358.246 \: = \: (1 \: \times \: 10^{3}) \: + \:(3 \: \times \: 10^{2}) \: + \: (5 \: \times \: 10^{1}) \: + \: (8 \: \times \: 10^{0}) \: + \: (2 \: \times \: 10^{−1}) \: + \: (4 \: \times \: 10^{−2}) \: + \: (6 \: \times \: 10^{−3})}$$ After simplifying the right-hand side terms, we will get the decimal number, which is on the left-hand side. Octal Number System The octal number system is another type of digital number system used in the field of digital electronics to represent information. It is a base 8 number system having eight unique digits i.e., 0, 1, 2, 3, 4, 5, 6, and 7. It is important note that the octal number system is equivalent to 3-bit binary number system as 23 = 8. Hence, this number system can be used in computing and digital electronic applications. The value of an octal number is obtained by the sum of powers of 8, as 8 is the base of the octal number system. Octal number system is used in the field of digital electronics to represent binary information in compact form, permissions in Linux or Unix systems, IPv6 address, binary machine code instructions, in error detection algorithms, etc. Example Consider the octal number 1457.236. Integer part of this number is 1457 and fractional part of this number is 0.236. The digits 7, 5, 4 and 1 have weights of (8)0, (8)1, (8)2 and (8)3 respectively. Similarly, the digits 2, 3 and 6 have weights of (8)-1, (8)-2, (8)-3 respectively. Mathematically, we can write it as, $$\mathrm{1457.236 \: = \: (1 \: \times \: 8^{3}) \: + \:(4 \: \times \: 8^{2}) \: + \: (5 \: \times \: 8^{1}) \: + \: (7 \: \times \: 8^{0}) \: + \: (2 \: \times \: 8^{−1}) \: + \: (3 \: \times \: 8^{−2}) \: + \: (6 \: \times \: 8^{−3})}$$ After simplifying the
Five Variable K-Map
5 Variable K-Map in Digital Electronics ”; Previous Next K-Map or Karnaugh Map is a simplification technique used to minimize a given complex Boolean function. K-Map or Karnaugh Map is a graph or chart which is composed of an arrangement of adjacent cells, where each cell of the K-Map represents a particular combination of variables in either sum or product form. The K-map can be used to simplify Boolean functions involving any number of variables. But, the simplification of a Boolean function using K-map becomes very complex for expressions involving five or more variables. Therefore, in actual practice, the K-map is limited to six variables. The number of cells in a K-map depends upon the number of variables in the given Boolean function. A K-map will have 2n cells or squares, where n is the number of variables in the Boolean expression. Therefore, for a two variable function, the K-map will have 22 = 4 cells, for a three variable Boolean function, the K-map will have 23 = 8 cells, and for four variable Boolean function, the K-map will have 24 = 16 cells, and so on. Here, we will discuss five variable K-Map and will use it to simplify Boolean functions in 5 variables. So let’s start with the introduction of 5 variable K-map. Five Variable K-Map A five variable K-map is used to minimize a 5-variable Boolean expression to its reduced form. The following are the important characteristics of a 5 variable K-map − A five variable K-map have 32 (25) cells or squares, and each cell of the K-map represents either a minterm or a maxterm of the Boolean expression. If the given Boolean function is expressed in SOP (Sum of Products) form, then the minterms of five variables Boolean function are designated as m0,m1,m2,m3 … m31. Where, m0 is corresponding to $\mathrm{\lgroup \overline{A} \: \overline{B} \: \overline{C} \: \overline{D} \: \overline{E} \rgroup}$, m1 is corresponding to $\mathrm{\lgroup \overline{A} \: \overline{B} \: \overline{C} \: \overline{D} E \rgroup}$,… and m31 is corresponding to $\mathrm{\lgroup ABCDE \rgroup}$. On the other hand, if the 5 variable Boolean function is expressed in POS (Product of Sums) form, then the maxterms of the function are designated as M0, M1, M2,… M31. Where, M0 represents $$\mathrm{\lgroup A \: + \: B \: + \: C \: + \: D \: + \: E \rgroup}$$ M1 represents $$\mathrm{\lgroup A \: + \: B \: + \: C \: + \: D \: + \: \overline{E} \rgroup}$$ M31 represents $$\mathrm{\lgroup \overline{A} \: + \: \overline{B} \: + \: \overline{C} \: + \: \overline{D} \: + \: \overline{E} \rgroup}$$. The 32 cells of the five variable K-map are divided into two blocks of 16 cells each, which are arranged side by side. The left block represents minterms (or maxterms) from m0 to m15 (or M0 to M15. Wheck, thck, th). In the left block, the first variable (let A) is a 0. The right block represents minterms (or maxterms) from m16 to m31 (or M16 to M31), in this block A is a 1. In the five variable K-map, we can form 2-squares, 4-squares, 8-squares, 16-squares, or 32-squares by involving its two blocks. Also, squares are considered adjacent in these two blocks, when one block superimposes on the top of another. A five variable SOP K-map is shown in Figure 1. A five variable POS K-map is represented in Figure 2. Now, let us discuss some solved examples to understand the application of a 5 variable K map in reducing a given 5-variable Boolean function in either SOP form or POS form. Example 1 Reduce the following 5 variable Boolean function in SOP form using the five variable K map. $$\mathrm{f \lgroup A,B,C,D,E \rgroup \: = \: \sum \: m \lgroup 0,1,2,4,7,8,12,14,15,16,17,18,20,24,28,30,31 \rgroup }$$ Solution The SOP K-map representation of the given SOP Boolean function is shown in Figure 3. Explanation The minimization of the given 5 variable Boolean function using the five variable K-map (Figure 3) is done as per the following steps − There are no isolated 1s in the K-map. The minterm m0 can form an 8-square with m4, m8, m12, m16, m20, m24, and m28. So make it and read it as − $$\mathrm{\lgroup \overline{D} \: \overline{E} \rgroup} $$ The minterms m0, m1, m16, and m17 form a 4-square. Make it and read it as − $$\mathrm{\lgroup \overline{B} \: \overline{C} \: \overline{D} \rgroup} $$ The minterms m0, m2, m16, and m18 form a 4-square. Make it and read it as − $$\mathrm{\lgroup \overline{B} \: \overline{C} \: \overline{E} \rgroup}$$ The minterms m7 and m15 form a 2-square. Make it and read it as − $$\mathrm{\lgroup \overline{A}CDE \rgroup} $$ The minterms m14, m15, m30 and m31 form a 4-square. Make it and read it as − $$\mathrm{\lgroup BCD \rgroup} $$ Finally, write all the product terms in SOP form. Hence, the minimal SOP expression of the given 5 variable Boolean function is, $$\mathrm{f(A,B,C,D,E) \ = \: \overline{A}CDE \: + \: \overline{B} \: overline{C} \: \overline{D} \: + \: \overline{B} \: \overline{C} \: \overline{E} \: + \: BCD \: + \: \overline{D} \: \overline{E}}$$ Example 2 Minimize the following 5 variable Boolean function in POS form using the five variable K map. $$\mathrm{f \lgroup A,B,C,D,E \rgroup \: = \: \prod \: M \lgroup 3,5,6,9,10,11,13,19,21,22,23,25,26,27,29 \rgroup}$$ Solution The POS K-map representation of the given POS Boolean function is shown in Figure 4. Explanation The minimization of the given 5 variable Boolean function using the five variable K-map (figure-4) is done as per the following steps − There are no isolated zeros in the K-map. The maxterms M9, M13, M25, and M29 form a 4 – square. Make
K-Map Minimization
Digital Electronics – K-Map Minimization ”; Previous Next What is Karnaugh Map? In realization of digital electronic systems, the simplification of Boolean expressions is one of the most crucial steps because it reduces the hardware complexity and cost of production. There are several tools and methods available for simplifying complex Boolean expression. K-Map or Karnaugh Map is one of such simplification methods. K-Map was developed by Maurice Karnaugh in the year of 1953. It is a visual or graphical method used to simplify the Boolean expressions. K-Map is one of the most efficient simplification tools when the number of variables in the Boolean expression are less than or equal to four. However, for five, six, and more variables, the K-Map becomes quite difficult. The K-Map or Karnaugh map makes the use of two dimensional table for simplification of the Boolean functions. The size of this table increases considerably with the increase in the number of variables in the Boolean functions. Some typical examples of K-Map of two variable, three variable, and four variables are shown in Figure-1. From Figure-1, it is clear that the number of squares or cells in the Karnaugh map depends on the number of variables in the expression. If n is the number of variables in the given Boolean function, then the corresponding Karnaugh map (K-Map) will have 2n squares or cells. For examples, if the number of variables in the Boolean function is 3, then the corresponding K-Map will have 8 (= 23) cells. Structure of Karnaugh Map All the Karnaugh maps or K-Maps have a generalized similar structure as shown in Figure-1. A typical K-Map has a table of certain cells. On the top-left corner of this table, a set of variables are represented as A, B, C, D. These variables are basically the input variables involved in the logical expression that requires to be simplified. The values of these inputs variables in binary form are represented along their respective sides, i.e., on the top and left of the table. From the above examples, it can be observed that the binary numbers along the top and left of the K-Map are not in their normal binary order, instead they are in the gray code. The Gray code is used to ensure that the two physically adjacent cells are actually adjacent. This makes the process of grouping easier during minimization of the Boolean expression. For providing simplicity in reading the K-Map, each cell of the K-Map is assigned a decimal number represented at the bottom-right corner of the cell. For example, in the three variable K-map (figure-1), the second cell of the K-Map represents a bit pattern 001, hence this cell is represented by its decimal equivalent 1. K-Map Simplification The procedure of K-Map or Karnaugh map simplification is started with the entering the values of the variables, either in their SOP (Sum of Products) form or in POS (Product of Sums) form, in the right K-map cells. After that we need to group the maximum number of 1s (in the case of SOP form) or the maximum number of 0s (in the case of POS form). Each of these groups must be in powers of 2 and must be carried on in decreasing order only. Once the grouping is done, each group has to be expressed in terms of combinations of input variables which are corresponding to the common binary values along the associated rows and columns. At last, all the combinations express the output expression of the Boolean function. Advantages of Karnaugh Map The following are the important advantages of the Karnaugh map − For simplifying Boolean expression, the K-map does not require the knowledge of theorems of Boolean algebra. Karnaugh map involves less number of steps in simplification process of logical expressions as compared to other simplification techniques. Limitations of Karnaugh Map The following are the major limitations of the Karnaugh map − The most significant limitation of the Karnaugh map is that it is only efficient when the Boolean expression has less number of variables. It becomes quite complicated with the higher number of variables in the logical expression. The simplification of a Boolean function having more than or equal to five variables using K-Map is quite complex. It is very difficult to get equations correct with more than 5 variables using the K-map. Conclusion The Karnaugh map or K-Map is an efficient tool for simplifying Boolean expression up to 4 variables. It is an easy method for simplification of logic expression because it does not make the use of Boolean algebra theorems. Another advantage of K-Map is that it is a visual method of simplification. However, the K-map becomes complex and inefficient when the variables in the logical expression are equal to or more than 5. Print Page Previous Next Advertisements ”;
Types of Digital Systems
Types of Digital Systems ”; Previous Next A system is defined as a group of various components interconnected together to perform a specific task. For example, a digital computer consists of several components such as monitor, CPU (Central Processing Unit), memory, keyboard, mouse, printer, and more. All these components are connected together to accomplish certain tasks. Hence, a computer can be termed as a system. We can broadly classify systems into the following two categories − Analog Systems Digital Systems An analog system is a type of system that operates on continuous time signals, while a digital system is one that can work on discrete time signals. Read this chapter to learn the basics of digital systems and their types. What is a Digital System? A type of electronic system that is designed to store, manipulate, and communicate digitally represented information is termed as a digital system. Some common examples of digital systems include smartphone, laptops, smartwatch, tablet, desktop computers, etc. The working of a digital system is entirely based on digital signals or binary signals. Where, a digital signal is a type of signal that is represented as a discrete-elements. It can have two possible states namely high or low. The high state is denoted by the logic 1 and the low state is denoted by the logic 0. In a digital system, if the state of the signal is logic 1, the system will be on, and if the state of the signal is 0, the system will be off. Characteristics of Digital Systems Today, digital systems are widely used in almost every aspect of life. This is because of their high reliability and efficiency. The following are some key characteristics of digital systems − Digital systems are relative less complex to implement as they use binary number system having only two digits to represent the state of a system. In digital systems, the information is represented in the form of a group of 0s and 1s i.e., bits. This is called binary or digital representation of information. Digital systems rely on digital signals having two well-defined discrete states. This makes digital systems more reliable and efficient in terms of processing, storage, and communication of information. Digital systems use logical mathematics and operations to perform computing tasks. Digital systems can be manufactured in the form of integrated circuits (ICs) of very small sizes. Digital systems can be easily programmed to perform repeated tasks that reduces human efforts and cost. Digital systems are highly immune to noise and distortions. Types of Digital Systems Digital systems can be classified based on various parameters. Here are some important types of digital systems that we commonly use in practice − Combinational Digital Systems A combinational logic circuit or system is a type of digital circuit that performs logical operations and produces output depending on the present inputs. Hence, the output of a combinational digital circuit does not depend on the past inputs and outputs of the system. Example − The common examples of combinational digital systems are binary adders, subtractors, logic gates, multiplexers, demultiplexers, etc. Sequential Digital Systems A type of digital system that has a memory element to store past history of the system operation is called a sequential digital system. Therefore, the output of a digital system depends on both present inputs and past outputs of the system. Example of sequential digital systems are flip-flops, registers, memory devices, counters, etc. Programmable Logic Devices (PLDs) A programmable logic device is one that can be programmed to perform a specific task automatically. Example of programmable logic devices are microcontrollers, PLCs, etc. Digital Communication Systems A digital communication system is a type of digital system used for transmission and reception of information in the form of digital signals. Example of digital communication systems are internet, intranet, mobile communication system, Wi-Fi, etc. Digital Control Systems A digital control system is a computerized control system used to monitor and regulate the behavior of a dynamic system. Example − Digital control systems are extensively used in robotics, industrial automation, etc. Conclusion In conclusion, digital systems are modern systems known for their high speed and reliability. A digital system utilizes digital signals to store, process, and communicate the information. In this chapter, we explained the basics of digital systems and their types. Traverse to the next chapter to learn all about the types of signals used in the field of electronics engineering. Print Page Previous Next Advertisements ”;
SOP and POS Form
Logical Expression in SOP and POS Form ”; Previous Next Before focusing on logical expression in SSOP (Standard Sum of Products) form and SPOS (Standard Product of Sum) form, let us have a brief introduction the “Sum of Products” and “Product of Sum” forms. SOP (Sum of Products) Form The SOP or Sum of Products form is a form of expressing a logical or Boolean expression. In SOP, different product terms of input variables are logically ORed together. Therefore, in the case of SOP form, we first logically AND the input variables, and then all these product terms are summed together with the help of logical OR operation. For example − $$\mathrm{\mathit{f} \lgroup A,B,C \rgroup \: = \: ABC \: + \: \bar{A}BC \: + \: AB \bar{C}}$$ This is a logical expression in three variables. Here, ABC, A”BC, and ABC” are the three product terms which are summed together to get the expression in SOP form. POS (Product of Sum) Form The POS or Product of Sum form is another form used to represent a logical expression. In POS form, different sum terms of input variables are logically ANDed together. Hence, if we want to express a logical expression in POS form, for that we first logically OR all the input variables and then these sum terms are ANDed using AND operation. For example − $$\mathrm{\mathit{f} \lgroup A,B,C \rgroup \: = \: \lgroup A \: + \: B \: + \: C \rgroup \lgroup \bar{A} \: + \: B \: + \: C \rgroup \lgroup A \: + \: B \: + \: \bar{C} \rgroup}$$ Here, f is a logical expression in three variables. From this example, it can be seen that there are three sum terms which are ANDed together to obtain the POS form of the given expression. Now, let us discuss the Standard Sum of Products (SSOP) form and Standard Product of Sum (SPOS) form in detail. A Boolean or logical expression can be represented into two standard forms namely, SSOP Form SPOS Form Standard Sum of Products (SSOP) Form The Standard Sum of Products (SSOP) form is a form of expressing a logical expression in which the logical expression is represented as the sum of a number of product terms where each product term will contain all the variables of the logical expression either in complemented or un-complemented form. Since, each product term of the SSOP form contains all the variables, hence it is also known as Expanded Sum of Products form. The SSOP form is also known Disjunctive Canonical Form (DCF) or Canonical Sum of Products Form or Normal Sum of Products Form. We can simply obtain the standard sum of products form of a logical expression from the truth table by determining the sum of all the terms that correspond to those combinations for which the given logical expression (say f) has the value 1. We can also obtain the standard sum of products (SSOP) form of an expression from the sum of products (SOP) form by using Boolean algebra. For example, $$\mathrm{\mathit{f} \lgroup A,B,C \rgroup \: = \: A \bar{B} \: + \: B \bar{C}}$$ This is a logical expression in three variables, but it is expressed in SOP form. We can convert this expression into SSOP form using Boolean algebra as follows. $$\mathrm{\mathit{f}\lgroup A,B,C \rgroup \: = \: A \bar{B} \lgroup C \: + \: \bar{C} \rgroup \: + \: B \bar{C} \lgroup A \: + \: \bar{A} \rgroup}$$ $$\mathrm{\mathit{f}\lgroup A,B,C \rgroup \: = \: A \bar{B}C \: + \: A \bar{B} \: \bar{C} \: + \: AB \bar{C} \: + \: \bar{A}BC}$$ This is the Standard Sum of Products form of the given logical expression. We can notice that in the SSOP form, each product term contains all the variables of the logic function either in complemented or un-complemented form. Each of these product terms is called a minterm. A logical function or expression in ‘n” variables can have maximum 2n minterms. The sum of minterms of a logical expression whose value is 1 is called the standard sum of products form of the expression. Standard Product of Sum (SPOS) Form The Standard Product of Sums (SPOS) form is a form of expressing a logical function in which the logical expression is represented as the product of a number of sum terms where each sum term will contain all the variables of the logical expression either in complemented or un-complemented form. SPOS form is also known as Conjunctive Canonical Form (CCF) or Expanded Product of Sums Form or Normal Product of Sums Form or Canonical Product of Sums Form. The SPOS form of each term is derived by considering the combinations of variables for which the output is equal to 0. Each term is a sum of all the variables of the expression. In the SPOS form, a variable appears in its complemented form if it has a value of 1 in the combination, and it appears in un-complemented form if it has a value of 0 in the combination. In the case of standard product of sums form, a term which contains each of the n variables of the function in either complemented or un-complemented form is called a maxterm. For a logical function in n variables, there could be at the most 2nmaxterms. The product of maxterms of a logical expression whose value is 0 is called the standard product of sums form of the expression. Similar to the SSOP form, we can obtain the standard product of sums form from the truth table of the logical expression by determining the product of all the sum terms that correspond to those combinations of variables for which the given logical expression (say f) has the value equal to
Two Level Logic Realization
Two Level Logic Realization ”; Previous Next The maximum number of levels that are present between inputs and output is two in two level logic. That means, irrespective of total number of logic gates, the maximum number of Logic gates that are present (cascaded) between any input and output is two in two level logic. Here, the outputs of first level Logic gates are connected as inputs of second level Logic gate(s). Consider the four Logic gates AND, OR, NAND & NOR. Since, there are 4 Logic gates, we will get 16 possible ways of realizing two level logic. Those are AND-AND, AND-OR, ANDNAND, AND-NOR, OR-AND, OR-OR, OR-NAND, OR-NOR, NAND-AND, NAND-OR, NANDNAND, NAND-NOR, NOR-AND, NOR-OR, NOR-NAND, NOR-NOR. These two level logic realizations can be classified into the following two categories. Degenerative Form Non-degenerative Form Degenerative Form If the output of two level logic realization can be obtained by using single Logic gate, then it is called as degenerative form. Obviously, the number of inputs of single Logic gate increases. Due to this, the fan-in of Logic gate increases. This is an advantage of degenerative form. Only 6 combinations of two level logic realizations out of 16 combinations come under degenerative form. Those are AND-AND, AND-NAND, OR-OR, OR-NOR, NAND-NOR, NORNAND. In this section, let us discuss some realizations. Assume, A, B, C & D are the inputs and Y is the output in each logic realization. AND-AND Logic In this logic realization, AND gates are present in both levels. Below figure shows an example for AND-AND logic realization. We will get the outputs of first level logic gates as Y1 = AB and Y2 = CD These outputs, Y1 and Y2 are applied as inputs of AND gate that is present in second level. So, the output of this AND gate is $$\mathrm{Y\:=\:Y_{1}Y_{2}}$$ Substitute Y1 and Y2 values in the above equation. $$\mathrm{Y \: = \: (AB)(CD)}$$ $$\mathrm{\Rightarrow \: Y \: = \: ABCD}$$ Therefore, the output of this AND-AND logic realization is ABCD. This Boolean function can be implemented by using a 4 input AND gate. Hence, it is degenerative form. AND-NAND Logic In this logic realization, AND gates are present in first level and NAND gate(s) are present in second level. The following figure shows an example for AND-NAND logic realization. Previously, we got the outputs of first level logic gates as Y1 = AB and Y2 = CD These outputs, Y1 and Y2 are applied as inputs of NAND gate that is present in second level. So, the output of this NAND gate is $$\mathrm{Y \: = \:(Y_{1}Y_{2})”}$$ Substitute Y1 and Y2 values in the above equation. $$\mathrm{Y \: = \: ((AB)(CD))”}$$ $$\mathrm{\Rightarrow \: Y \: = \: (ABCD)”}$$ Therefore, the output of this AND-NAND logic realization is (ABCD)”. This Boolean function can be implemented by using a 4 input NAND gate. Hence, it is degenerative form. OR-OR Logic In this logic realization, OR gates are present in both levels. The following figure shows an example for OR-OR logic realization. We will get the outputs of first level logic gates as Y1 = A + B and Y2 = C + D. These outputs, Y1 and Y2 are applied as inputs of OR gate that is present in second level. So, the output of this OR gate is $$\mathrm{Y \:= \: Y_{1}\:+\:Y_{2}}$$ Substitute Y1 and Y2 values in the above equation. $$\mathrm{Y \: = \: (A\:+\:B) \: + \: (C\:+\:D)}$$ $$\mathrm{\Rightarrow \: Y \:=\:A\:+\:B\:+\:C\:+\:D}$$ Therefore, the output of this OR-OR logic realization is A + B + C + D. This Boolean function can be implemented by using a 4 input OR gate. Hence, it is degenerative form. Similarly, you can verify whether the remaining realizations belong to this category or not. Non-degenerative Form If the output of two level logic realization can”t be obtained by using single logic gate, then it is called as non-degenerative form. The remaining 10 combinations of two level logic realizations come under nondegenerative form. Those are AND-OR, AND-NOR, OR-AND, OR-NAND, NAND-AND, NANDOR, NAND-NAND, NOR-AND, NOR-OR, NOR-NOR. Now, let us discuss some realizations. Assume, A, B, C & D are the inputs and Y is the output in each logic realization. AND-OR Logic In this logic realization, AND gates are present in first level and OR gate(s) are present in second level. Below figure shows an example for AND-OR logic realization. Previously, we got the outputs of first level logic gates as Y1 = AB and Y2 = CD. These outputs, Y1 and Y2 are applied as inputs of OR gate that is present in second level. So, the output of this OR gate is $$\mathrm{Y\:=\:Y_{1}\:+\:Y_{2}}$$ Substitute Y1 and Y2 values in the above equation $$\mathrm{Y\:=\:AB\:+\:CD}$$ Therefore, the output of this AND-OR logic realization is AB + CD. This Boolean function is in Sum of Products form. Since, we can’t implement it by using single logic gate, this AND-OR logic realization is a non-degenerative form. AND-NOR Logic In this logic realization, AND gates are present in first level and NOR gate(s) are present in second level. The following figure shows an example for AND-NOR logic realization. We know the outputs of first level logic gates as Y1 = AB and Y2 = CD These outputs, Y1 and Y2 are applied as inputs of NOR gate that is present in second level. So, the output of this NOR gate is $$\mathrm{Y \:=\:(Y_{1}\:+\:Y_{2})”}$$ Substitute Y1 and Y2 values in the above equation. $$\mathrm{Y\:=\:(AB\:+\:CD)”}$$ Therefore, the output of this AND-NOR logic realization is (AB + CD)”. This Boolean function is in AND-OR-Invert form. Since, we can’t
Don”t Care Condition
Don”t Care Condition in K-Maps ”; Previous Next K-Map or Karnaugh Map is a graphical method of simplifying Boolean expression. A K-Map composed of an arrangement of adjacent squares or cells, where each cell represent a particular combination of variables in sum or product form. In the K-map method, there is a useful condition namely, Don’t Care Condition, which helps in simplifying a Boolean function. The don’t care condition makes the grouping of variables in K-map easy. In this tutorial, we will understand the “don’t care” concept in K-map reduction with the help of solved examples. Sometimes, in a Boolean expression for certain input combinations, the value of the output is not specified either due to invalid input combinations or due to the precise value of output is of no importance. These input combinations for which the values of the Boolean function are not specified are called don’t care combinations. Don’t care combinations are also referred to as optional combinations. In K-map, don’t care combinations are represented by “X” or “d” or “ϕ”. For example, in 8421 binary code, the binary combination 1010, 1011, 1100, 1101, 1110, and 1111 are the invalid terms and their corresponding outputs are don’t care combinations. Similarly, in Excess-3 code, the combinations 0000, 0001, 0010, 1101, 1110, and 1111 do not occur, hence these are called don’t care combinations. When we deal with SOP (Sum of Products) K-map, each don’t care term is treated as a 1, if it helps in reduction of the expression, otherwise it is considered as a 0 and left alone. On the other hand, when we are using POS (Product of Sums) K-map, each don’t care term is considered as a 0, if it is helpful in reduction of the expression, otherwise it is treated as a 1 and left alone. Also, we can convert a Standard Sum of Products (SSOP) expression with don’t care terms into a Standard Product of Sums (SPOS) expression by keeping the don’t care terms as they are, and writing the missing minterms of the SSOP form as the maxterms of the SPOS form. Similarly, we can convert a standard product of sums (SPOS) expression with don’t care terms into a standard sum of products (SSOP) expression by keeping the don’t care terms of the SPOS expression as they are, and writing the missing maxterms of the SPOS expression as the minterms of the SSOP expression. Now, let us discuss some solved examples to understand the don’t care condition in K-map. Example 1 Minimize the following 4-variable Boolean expression in SOP form using K-map. $$\mathrm{\mathit{f}\lgroup A,B,C,D\rgroup=\sum m \lgroup 0,1,4,5,6,10,13\rgroup +d \lgroup 2,3 \rgroup}$$ Solution The SOP K-map representation of the given Boolean function is shown in Figure 1. As we can see in the given expression, there are two don’t care terms which are denoted by X on the K-map. Explanation The reduction of the expression is done as per the following steps − The minterms m0, m1, m4 and m5 form a 4-square. Make it and read it as $\mathrm{\lgroup \bar{A} \: \bar{C}\rgroup}$. The minterms m10 and m11 form a 4-sqaure with two don’t care terms m2 and m3. Make it and read it as $\mathrm{\bar{B}C}$. The minterms m0, m4, m6 and the don’t care term m2 together form a 4-square. Make it and read it as $\mathrm{\bar{A} \: \bar{D}}$. The minterms m5 and m13 form a 2-square. Make it and read it as $\mathrm{B\bar{C}D}$. Finally, write all the product terms in SOP form. Therefore, the minimal Boolean expression is, $$\mathrm{\mathit{f} \lgroup A,B,C,D \rgroup \: = \: \bar{A} \: \bar{C} \: + \: \bar{B}C \: + \: \bar{A} \: \bar{D} \: + \: B \bar{C}D}$$ Example 2 Minimize the following 4-variable Boolean expression in POS form using K map. $$\mathrm{\mathit{f} \lgroup A,B,C,D \rgroup \: = \: \prod M \lgroup 1,5,6,12,13,14 \rgroup \: + \: d \lgroup 2,4 \rgroup}$$ Solution The POS K-map representation of the given Boolean function is shown in Figure-2. There are two don’t care terms in the expression which are represented by X on the K-map. Explanation The reduction of the given function is done as per the following steps − The maxterms M5, M12 and M13 and don’t care term M4 form a 4-square. Make it and read it as $\mathrm{\bar{B} \: + \: C}$. The maxterms M6, M12, and M14 and don’t care term M4 form a 4-square. Make it and read it as $\mathrm{\bar{B} \: + \: D}$. The maxterms M1 and M5 form a 2-square. Make it and read it as $\mathrm{A \: + \: C \: + \: \bar{D}}$ Write all the sum terms in POS form. Therefore, the minimal Boolean expression is, $$\mathrm{\mathit{f} \lgroup A,B,C,D \rgroup \: = \: \lgroup \bar{B} \: + \: C \rgroup \: + \: \lgroup \bar{B} \: + \: D \rgroup \: + \: \lgroup A \: + \: C \: + \: \bar{D} \rgroup}$$ Conclusion This is all about don’t care conditions in K-maps. As we discussed in the above sections of this tutorial, that the don’t care condition is a significant and powerful concept that helps in minimization of Boolean function using K-map. Print Page Previous Next Advertisements ”;