Latches

Digital Electronics – Latches ”; Previous Next A latch is an asynchronous sequential circuit whose output changes immediately with the change in the applied input. A latch is used to store 1 bit information in a digital system, so it is considered as the most elementary memory element. In this chapter, we will explain in detail about latches in digital electronics along with their types and applications. What is a Latch? In digital electronics, a latch is an asynchronous sequential circuit that can store 1-bit information. It is used as the fundamental memory element in digital circuits. A latch can have two stable states namely, set and reset. The set state is denoted by the logic 1 and the reset state is represented by the logic 0. Due to these two stable states, a latch is also known as a bistable-multivibrator. The state of a latch toggles according to the applied input. The most important thing to be noted about latches is that they do not have a clock signal for synchronization. That is why they are called asynchronous sequential circuits. The logic gates are the fundamental building blocks of latches. Since there is no synchronization and clock signal used. Hence, the latches operate immediately on the application of input signals. Characteristics of Latches Some key characteristics of latches are explained below − Latches can store 1-bit of digital information that can be represented using either logic 0 or logic 1. Thus, the latches are mainly used as memory elements in digital circuits. Latches have a feedback mechanism that allows them to maintain their current state as it is until the next input is applied. The operation of latches is completely controlled by applied inputs that means the output of the latches updates based on the change in the input signals. Types of Latches The following are the main types of latches that used in digital circuits and systems − SR Latch JK Latch D Latch T Latch Let us now discuss about each type of latch in detail. SR Latch The SR latch is a type of latch which has two input lines designated as S and R. Where, S represents the Set input and R represents the Reset input. Thus, it is also known as Set-Reset Latch. The SR latch has two stable states namely Set state (S) and Reset state (R). The block diagram of the SR latch is shown in the following figure. In the case of SR latch, the S input sets the output Q to 1 and Q” to 0. On the other hand, the R input sets the output Q to 0 and Q” to 1. In case, when both S and R inputs are high, the latch is said to be in forbidden state. The complete operation of the SR latch for different input combinations is described in the following truth table − Inputs Outputs Comment S R Q Q” 0 0 Q Q” No change 0 1 0 1 Reset state 1 0 1 0 Set state 1 1 X X Forbidden state The SR latch can be implemented by connecting two NOR gates in a cross-coupled manner as shown in the following figure. JK Latch The JK latch is another type of latch which has two inputs namely, J and K. Here, the input J is similar to S input and the input K is similar to R input in an SR latch. The operation of the JK latch is similar to that of the SR latch but it does not have the forbidden state. Instead, it has a toggle state in which the outputs Q and Q” swap their states when both inputs J and K are 1. Therefor, the JK latch is mainly designed to overcome the problem of forbidden state in the SR latch. The block diagram of the JK latch is shown in the following figure − The truth table given below describes the operation of the JK latch for different input combinations − Inputs Outputs Comment J K Q Q” 0 0 Q Q” No change 0 1 0 1 Reset state 1 0 1 0 Set state 1 1 Q” Q Toggle state From this truth table, it is clear that the problem of forbidden state is addressed by implementing the toggle state. The logic circuit of the JK latch consists of a combination of two NOR gates and two AND gates as shown in the following figure. D Latch The D Latch, also known as Data latch or transparent latch, is a type of bistable multivibrator which has two input signals namely, D (Data) input and E (Enable) input. The output Q of the D latch is same as the input applied at the D input line as long as the E input is high. When the E input goes low, the output of the D latch is held as it is until the new input is applied to the D input. The block diagram of the D latch is shown in the following figure. The truth table given below explains the operation of the D latch − Inputs

Three Variable K-Map

3 Variable K-Map in Digital Electronics ”; Previous Next A K-Map or Karnaugh Map is a graphical method that used for simplifying the complex algebraic expressions in Boolean functions. This method avoid the use of complex theorems and equations manipulations. A K-Map is basically a special form of a truth table that can easily map out the values of parameters and gives a simplified Boolean expression. K-Map method is best suited for such Boolean functions that have two to four variables. However, it can be used for Boolean functions having five or six variables as well, but its process becomes more difficult with the increased number of variables in the function. Therefore, in practice, we mostly use Two-Variable K-Map, Three-Variable K-Map, and Four-Variable K-Map. But, sometimes, the Five-Variable K-Map and Six-Variable K-Map are also used to derive the Boolean expressions. Here, we will discuss the 3 Variable K-Map and its application to simplify a complex Boolean function. Three-Variable K-Map We can use the K-Map to simplify a Boolean function of three-variables. A Boolean function in three variables (A, B, C) can be expressed in the standard sum of product (SOP) form that can have total eight possible combinations, which are as follows − $$\mathrm{(A”B”C”), (A”B”C), (A”BC”), (A”BC), (AB”C”), (AB”C), (ABC”), (ABC)}$$ We can designate each of these combinations by m0, m1, m2, m3, m4, m5, m6, and m7 respectively. Each of these terms are called a min-term. In these combinations, A is called MSB (Most Significant Bit) and C is called LSB (Least Significant Bit). In terms of POS (Product of Sum) form, the eight possible combinations of the three variables Boolean expression are as follows − $$\mathrm{(A+B+C), (A+B+C”), (A+B”+C), (A+B”+C”), (A”+B+C), (A”+B+C”), (A”+B”+C), (A”+B”+C”)}$$ Each one of these combinations are often designated by M0, M1, M2, M3, M4, M5, M6, and M7 respectively. Each of these terms is called a maxterm. Similar to the minterm, A is called MSB (Most Significant Bit) and C is called LSB (Least Significant Bit). Therefore, a three variable K-Map has eight (23) squares or cells, and each square on the K-Map represents a minterm of a maxterm as shown in the following figure. Here, the small number on the bottom right corner of each cell indicates the minterm or maxterm designation. The binary numbers along the top of the K-Map indicates the condition of variables B and C for each column. The binary number along the left side of the map against each row represents the condition of the variable A for that row. For example, the binary number of 10 on the top of the fourth column in the above figure indicates that the variable B appears in non-complimented form and the variable C appears in complimented form in all the minterms in that column. The binary number 0 on the left of the first row on the K-map indicates that the variable A appears in its complimented form in all the minterms, and the binary number 1 on the left of the second row on the K-Map indicates that the variable A appears in its non-complimented form in all the minterms. Also, note that the binary numbers on top of the K-map are not in the normal binary order, but they are actually in the Gray code. The use of Gray code in K-map ensures that the two physically adjacent cells are actually adjacent which means their minterms or maxterms differs by one variable only. Numerical Example Map the following three-variable Boolean expression on K-Map. $$\mathrm{f \: = \: \overline{A} \: \overline{B} \: C \: + \: A \: \overline{B} \: C \: + \: \overline{A} \: B \: \overline{C} \: + \: A \: \overline{B} \: \overline{C} \: + \: A \: B \: C}$$ Solution In the given Boolean expression, the minterms are − $$\mathrm{\overline{A} \: \overline{B} \: C \: = \: 001; \: A \: \overline{B} \: C \: = \: 101; \: \overline{A} \: B \: \overline{C} \: = \: 010; \: A \: \overline{B} \: \overline{C} \: = \: 100; \: ABC \: = \: 111}$$ Therefore, $$\mathrm{m_{1} \: = \: \overline{A} \: \overline{B} \: C \: = \: 001}$$ $$\mathrm{m_{5} \: = \: A \: \overline{B} \: C \: = \: 101}$$ $$\mathrm{m_{2} \: = \: \overline{A} \: B \: \overline{C} \: = \: 010}$$ $$\mathrm{m_{4} \: = \: A \: \overline{B} \: \overline{C} \: = \: 100}$$ $$\mathrm{m_{7} \: = \: ABC \: = \: 111}$$ Hence, the expression is given by, $$\mathrm{f \: = \: \sum \: m (1, \: 5, \: 2, \: 4, \: 7)}$$ The K-map of this expression is shown in the following figure − Conclusion From the above discussion, we may conclude that the three variable K-Map is a graphical method used to simplify the complex three variable Boolean function. A three-variable Kmap has eight squares or cells. Print Page Previous Next Advertisements ”;

DeMorgan”s Theorem

Digital Electronics – DeMorgan”s Theorem ”; Previous Next In Boolean algebra, several rules are defined to perform operations in digital logic circuits. Boolean algebra is a tool to perform operation on binary digits, i.e. 0 and 1. These two binary digits 0 and 1 are used to denote FALSE and TRUE states of a digital circuit at input and output ends. Boolean algebra, developed by George Boole, uses 0s and 1s to create truth tables and logic expressions of digital circuits like AND, OR, NOT, etc. which are used to analyze and simplify the complex circuits. There were another English mathematician Augustus DeMorgan who explained the NAND and NOR operations as NOT AND and NOT OR operations respectively. This explanation was named De Morgan”s Theorem. In this tutorial, we will discuss the DeMorgan”s theorem in detail. What is DeMorgan”s Theorem? DeMorgan”s Theorem is a powerful theorem in Boolean algebra which has a set of two rules or laws. These two laws were developed to show the relationship between two variable AND, OR, and NOT operations. These two rules enable the variables to be negated, i.e. opposite of their original form. Therefore, DeMorgan”s theorem gives the dual of a logic function. Now, let us discuss the two laws of DeMorgan”s theorem. DeMorgan”s First Theorem (Law 1) DeMorgan”s First Law states that the complement of a sum (ORing) of variables is equal to the product (ANDing) of their individual complements. In other words, the complement of two or more ORed variables is equivalent to the AND of the complements of each of the individual variables, i.e. $$\mathrm{\overline{A+B} \: = \: \bar{A} cdot \bar{B}}$$ Or, it may also be represented as, $$\mathrm{\lgroup A \: + \: B \rgroup” \: = \: A”cdot B”}$$ The logic implementation of left side and right side of this law is shown in Figure 1. Thus, DeMorgan”s first law proves that the NOR gate is equivalent to a bubbled AND gate. The following truth table shows the proof of this law. Left Side Right Side Input Output Input Output A B (A + B)” A” B” A”· B” 0 0 1 1 1 1 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 This truth table proves that the Boolean expression on the left is equivalent to that on the right side of the expression of DeMorgan”s first law. Also, the first law of DeMorgan”s theorem can be extended to any number of variables, or a combination of variables. For example, $$\mathrm{\overline{A \: + \: B \: + \: C \: + \: D \: + \: E \: + \: \dotso} \: = \: \bar{A} \: \bar{B} \: \bar{C} \: \bar{D} \: \bar{E} \: \dotso}$$ Also, $$\mathrm{\overline{ABC \: + \: DE \: + \: FGH \: + \: \dotso}\: = \: \overline{\lgroup ABC \rgroup}.\overline{\lgroup DE \rgroup}.\overline{\lgroup FGH\rgroup}.\dotso}$$ From the above discussion, we may conclude that the DeMorgan”s First Law converts an expression from a sum form under a NOT sign to a product form. DeMorgan”s Second Theorem (Law 2) DeMorgan”s second law states that the complement of the product (ANDing) of variables is equivalent to the sum (ORing) of their individual complements. In other words, the complement of two or more ANDed variables is equal to the sum of the complement of each of the individual variables, i.e., $$\mathrm{\overline{AB} \: = \: \overline{A} \: + \: \overline{B}}$$ It may also be represented as, $$\mathrm{\lgroup AB \rgroup” \: = \: A” \: + \: B”}$$ The logic implementation of left and right sides of this expression is shown in Figure 2. Hence, DeMorgan”s second law proves that the NAND gate is equivalent to a bubbled OR gate. The following truth table shows the proof of this law. Left Side Right Side Input Output Input Output A B AB A” B” A” + B” 0 0 0 1 1 1 0 1 1 1 0 1 1 0 1 0 1 1 1 1 1 0 0 0 This truth table proves that the Boolean expression on the left side is equivalent to that on the right side of the expression of DeMorgan”s second law. Similar to the first law, we may extend the DeMorgan”s second law for any number of variables or combination of variables. For example, $$\mathrm{\overline{ABCDE \dotso} \: = \: \overline{A} \: + \: \overline{B} \: + \: \overline{C} \: + \: \overline{D} \: + \: \overline{E} \: + \: \dotso}$$ And, for a combination of variables, $$\mathrm{\overline{\lgroup ABC \rgroup} \overline{\lgroup DE \rgroup} \overline{\lgroup FG \rgroup \dotso} \: = \: \overline{ABC} \: + \: \overline{DE} \: + \: \overline{FG}}$$ Hence, from the above discussion, we can conclude that DeMorgan”s second law transforms a product form of variables or combination of variables under a NOT sign into a sum form. Therefore, DeMorgan”s laws transforms an AND operation into an OR operation, and an OR operation into an AND operation. This principle is called duality. Example 1 Apply DeMorgan”s theorem to the following Boolean expression, $$\mathrm{F \: = \: \overline{AB \overline{ \lgroup C \: +

Laws of Boolean Algebra

Laws of Boolean Algebra ”; Previous Next Boolean algebra is a mathematical tool that deals with logical operations and binary number system. It builds the foundation of digital electronics and computer science. The laws and rules in Boolean algebra are the sets of logical statements or expressions upon which all the logical expressions are built. Each law of the Boolean algebra can be interpreted as an operation performed by a logic circuit like a logic gate. In this chapter, we will learn about laws and rules of Boolean algebra that are used to simplify the logical functions and Boolean expressions. These laws and rules are essential tools in Boolean algebra that help to reduce the complexity and optimize the digital circuits and systems. Let us learn the primary laws and rules of Boolean algebra in detail that are used to perform logical operations. Laws of Boolean Algebra All the important laws and rules of Boolean algebra are explained below − Rules of Logical Operations There are three basic logical operations namely, AND, OR, and NOT. The following table highlights the rules associated with these three logical operations − AND Operation OR Operation NOT Operation 0 AND 0 = 0 0 OR 0 = 0 NOT of 0 = 1 0 AND 1 = 0 0 OR 1 = 1 NOT of 1 = 0 1 AND 0 = 0 1 OR 0 = 1 1 AND 1 = 1 1 OR 1 = 1 These rules of Boolean algebra can be implemented using logic gates. AND Laws In Boolean algebra, there are four AND laws given below − Law 1 − A · 0 = 0 (This law is called null law). Law 2 − A · 1 = A (This law is called identity law). Law 3 − A · A = A Law 4 − A · A” = 0 OR Laws There are four OR laws described below − Law 1 − A + 0 = A (This law is called null law). Law 2 − A + 1 = 1 (This law is called identity law). Law 3 − A + A = A Law 4 − A + A” = 1 Complementation Laws There are following five complementation laws in Boolean algebra − Law 1 − 0” = 1 Law 2 − 1” = 0 Law 3 − If A = 0, Then A” = 1 Law 4 − If A = 1, Then A” = 0 Law 5 − (A”)” = A (This is called double complementation law) Commutative Laws There are following two commutative laws in Boolean algebra − Law 1 − According to this law, the operation A OR B produces the same output as the operation B OR A, i.e., A + B = B + A Hence, the order of the variables does not affect the OR operation. This law can be extended to any number of variables. For example, for three variables, it will be, A + B + C = C + B + A = B + C + A = C + A + B Law 2 − According to this law, the output of the A AND B operation is same as that of the B AND A operation, i.e., A · B = B · A This law states that the order in which the variables are ANDed does not affect the result. We can extend this law to any number of variables. For example, for three variables, we get, A · B · C = A · C · B = C · B · A = C · A · B Associative Laws Associative laws define the ways of grouping the variables. There are two associative laws as described below. Law 1 − The expression A OR B ORed with C results the same as the A Ored with B OR C, i.e., (A + B) + C = A + (B + C) This law can be extended to any number of variables. For example, for 4 variables, we get, (A + B + C) + D = A + (B + C + D) = (A + B) + (C + D) Law 2 − The expression A AND B ANDed with C results the same as the expression A ANDed with B AND C, i.e., (A · B) · C = A · (B · C) We can extend this law to any number of variables. For example, if we have 4 variables, then (ABC)D = A(BCD) = (AB)·(CD) Distributive Laws In Boolean algebra, there are the following two distributive laws that allow for multiplying or factoring out of expressions. Law 1 − According to this law, we OR several variables and then AND the result with a single variable. It gives the same result as the expression in which the single variable is ANDed with each of the several variables and then ORed the product terms, i.e., A · (B + C) = AB + AC We can extend this law to any number of variables. For example, A(BC + DE) = ABC + ADE AB(CD + EF) = ABCD + ABEF Law 2 − According to this law, if we AND several variables and then the result is ORed with a single variable. It gives the same result as we OR the single variable with each

Max Term Representation

Maxterm Representation of Boolean Expression ”; Previous Next The K-Map or Karnaugh Map is a systematic method of simplifying a complex Boolean function or expression. The K-Map is basically a graph or a chart which consists of a certain number of adjacent cells. Each cell represents a particular combination of variables in either sum or product form. However, we can use the K-Map for simplifying a Boolean function in any number of variables, but it becomes tedious for functions involving five or more variables. In actual practice, we usually use K-Map for simplification of Boolean functions in upto six variables. A Boolean function in n variables can have 2n possible combinations of product terms in sum of products (SOP) form, or 2n possible combinations of sum terms in product of sums (POS) form. Therefore, for a Boolean function in 2 variables, the K-map will have 22 = 4 cells, for a function in 3 variables, it will have 23 = 8 cells, and so on. A Boolean function can be expressed in two canonical or standard form namely SSOP (Standard Sum of Products) Form and SPOS (Standard Product of Sums) Form. A SSOP form is one in which a Boolean function is expressed as a sum of product terms, where each term of the expression contains all the variables of the function in either complemented or un-complemented form. Each product term of the logic expression in SSOP form is referred to as a minterm. For example, $$\mathrm{Y \: = \: AB \: + \: \overline{A}B}$$ Here, Y is a Boolean function in two variables A and B. The terms AB and AB” are the minterms of the function. In the SPOS form, a Boolean function is expressed as a product of sum terms, where each sum term, called maxterm, contains all the variables of the function in either complemented or non-complemented form. For example, $$\mathrm{Y \: = \: \lgroup A \: + \: B\rgroup \: .\: \lgroup \overline{A} \: + \: B \rgroup}$$ Here, Y is a Boolean function in two variables A and B, and the terms (A+B) and (A”+B) are the two maxterms of the function. This article is primarily meant for explaining how to represent a Boolean function in Max Term form on a K-map. So, let us discuss the maxterm representation or plotting zeros on K map. Plotting Zeros (Maxterm Representation) As we already discussed that each sum term in a standard POS form expression is called a maxterm. A maxterm is denoted by the uppercase letter M with a subscript which denotes the decimal designation of that maxterm. For representing a standard POS expression on to the K-map, zeros are plotted in the cells corresponding to the maxterms which are represented in the expression, and no entries are made in the cells corresponding to the maxterms which are not present in the expression. Now, for better understanding of the concept of plotting zeros or maxterm representation, let us discuss some solved examples. Example 1 Plot the following 2 variable Boolean expression on the K-Map. $$\mathrm{Y \: = \: \lgroup A \: + \: B \rgroup\lgroup A \: + \: \overline{B} \rgroup\lgroup \overline{A} \:+ \: B \rgroup}$$ Solution The given Boolean expression in terms of maxterms can be represented as, $$\mathrm{Y \: = \: M_{3} cdot M_{2} cdot M_{1} \: = \: \prod M \lgroup 0, \: 1, \: 2 \rgroup}$$ The maxterm representation of this function on the K-map is shown in Figure-1. Example 2 Plot the following 3 variables Boolean function on the K-Map. $$\mathrm{Y \: = \: \lgroup A \: + \: B \: + \: C \rgroup\lgroup \overline{A} \: + \: \overline{B} \: + \: C\rgroup\lgroup A \: + \: B \: + \: \overline{C}\rgroup\lgroup \overline{A} \: + \: B \: + \: \overline{C} \rgroup\lgroup \overline{A} \: + \: \overline{B} \: + \: \overline{C}\rgroup}$$ Solution The given Boolean function in terms of maxterms can be represented as, $$\mathrm{Y \: = \: M_{0} cdot M_{1}cdot M_{5} cdot M_{6} cdot M_{7} \: = \: \prod M \lgroup 0, \: 1, \: 5, \: 6, \: 7 \rgroup}$$ The maxterm representation of this function on the K-map is shown in Figure 2. Hence, this is all about plotting zeros or maxterm representation of Boolean expression on the K-map. Tutorial Problems Try to solve the following tutorial problems to understand the concept more clearly. Q1. Plot the following Boolean expression in maxterm representation on the K-map. $$\mathrm{f( A, \: B) \: = \: (A \: + \: B)cdot(\overline{A} \: + \: B).(\overline{A} \: + \: \overline{B})}$$ Q2. Plot the following 3 variable Boolean function in maxterm representation on the K map. $$\mathrm{f(A, \: B, \: C) \: = \: (A \: + \: B \: + \: \overline{C})cdot(A \: + \: \overline{B} \: + \: C)cdot( \overline{A} \: + \: \overline{B} \: + \: C)cdot(\overline{A} \: + \: B \: + \: \overline{C})}$$ Print Page Previous Next Advertisements ”;

Six Variable K-Map

6 Variable K-Map in Digital Electronics ”; Previous Next Read this chapter to learn how you can use the K-Map (Karnaugh Map) to reduce a Boolean function in six variables. Let”s start with a brief introduction to Karnaugh Map (K-Map). Karnaugh Map (K-Map) The Karnaugh Map or K-Map is a graphical method of reducing a Boolean function to its minimal form. The K-Map can be defined as a chart or a graph that is composed of an arrangement of adjacent squares or cells, where each cell represents a particular combination of variables of the Boolean expression either in sum or product form. A typical 2 Variable K-Map is represented in Figure-1. In actual practice, we generally use a K-map upto 6 variables. However, K-map can be used for any number of variables, but for variables 5 or more, it becomes tedious. Now, let us discuss the six variable K-map and its application to reduce a Boolean function to the minimal form. Six Variable K-Map A six variable K-Map is used to reduce a Boolean expression of six variables (say A, B, C, D, E, F). It has 64 (26) adjacent cells or squares. Where, each cell represents a combination of variables of the function. For a 6-variable Boolean function in SOP form, the possible combinations of the input variables are as follows − $$\mathrm{\bar{A}\bar{B}\bar{C}\bar{D}\bar{E}\bar{F}, \: \bar{A}\bar{B}\bar{C}\bar{D}\bar{E}F, \: \bar{A}\bar{B}\bar{C}\bar{D}E\bar{F}, \: \dots \: ABCDEF}$$ The minterm designations of these combinations of variables are m0, m1, m2 … m63 respectively. Similarly, for a 6-variables Boolean function in POS form, the possible combinations of input variables are as follows − $$\mathrm{\left ( A \: + \: B \: + \: C \: + \: D \: + \: E \: + \: F \right ), \: \left ( A \: + \: B \: + \: C \: + \: D \: + \: E \: + \: \bar{F} \right ), \: \left ( A \: + \: B \: + \: C \: + \: D \: + \: \bar{E} \: + \: F \right ), \: \dots \: \left ( \bar{A} \: + \: \bar{B} \: + \: \bar{C} \: + \: \bar{D} \: + \: \bar{E} \: + \: \bar{F} \right )}$$ The maxterm designations of these combinations of variables are M0, M1, M2, … M63 respectively. As already mentioned, the six variable K-map has 64 cells which are divided into 4-blocks of 16 squares each. Each cell on the K-map represents a minterm or a maxterm. In the case of 6 variable K-map, the values of variables A and B remain the same for all minterms (or maxterms) in each block of 16 squares. The 64 cells of a six variable K-map are divided into 4 blocks as follows − Block 1 − This is the top left block. This block represents minterms from m0 to m15, (or maxterms from M0 to M15). In this block, the variable A is a 0 and the variable B is also a 0. Block 2 − This is the top right block. This block represents minterms from m16 to m31, (or maxterms from M16 to M31). In this block, the variable A is a 0 and the variable B is a 1. Block 3 − This is the bottom left block. This block represents minterms from m32 to m47, (or maxterms from M32 to M47). In this block, the variable A is a 1 and the variable B is a 0. Block 4 − This is the bottom right block. This block represents minterms from m48 to m63, (or maxterms from M48 to M63). In this block, the variable A is a 1 and the variable B is also a 1. While simplification, the 6-variable K-map may contain 2-squares, 4-squares, 8-squares, 16- squares, 32-squares, or a 64-square by involving all the four blocks of the map. In a six variable K-Map, when a block is superimposed on the top of another block, which is either above or below or beside of the first block, and the squares coincide with one another. Then, the squares are considered adjacent in the two blocks. It is also important to note that the diagonal elements such as m10 and m58, m15 and m63, m18 and m34, m29 and m45 are not adjacent to each other. A six variable SOP K-map is represented in Figure-2. A six variable POS K-map is represented in Figure-3. Now, let us understand the utilization of the six variable K-map for minimization of a six variable Boolean function with the help of solved numerical examples. Example 1 Minimize the following 6 variable Boolean function using K-map. $$\mathrm{f \: = \: \sum \: m(1, 3, 4, 5, 6, 9, 11, 12, 14, 15, 17, 19, 20, 21, 22, 23,25, 27, 28, 30, 33, 35, 36, 38, 41, 43, 44, 46, 49, 51, 52, 54, 57, 59, 60, 62)}$$ Solution The 6-variable SOP K-map representation of the given Boolean function is shown in Figure-4. The reduction of this function is done as per the following steps − There are no isolated 1s in the K-map. The minterm m1 forms a 16-square with minterms m3, m9, m11, m17, m19, m25, m27, m33, m35, m41, m43, m49, m51, m57, and m59. Make it and read it as − $$\mathrm{\bar{D}F}$$ The minterm m4 forms a 16-square with minterms m6, m12, m14, m20, m22, m28, m30, m36, m38, m44, m46, m52, m54, m60, and m62. Make it and read it as − $$\mathrm{\bar{F}D}$$ The minterm m5 can form a 4-square with minterms m4, m20, and m21, or with m1, m17, and m21. We will make it with minterms m4, m20, and m21, and read it as − $$\mathrm{\bar{A}\bar{C}D\bar{E}}$$ The minterm m21

Binary Codes

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.

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 ”;

Simplification using Boolean Algebra

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