Anda di halaman 1dari 48

DIGITAL PRINCIPLES AND SYSTEM DESIGN

Unit I : BOOLEAN ALGEBRA AND LOGIC GATES

Basic Digital Concepts

By converting continuous analog signals into a _nite number of discrete states, a process called digitization, then to the extent that the states are su_ciently well separated so that noise does create errors, the resulting digital signals allow the following (slightly idealized): storage over arbitrary periods of time flawless retrieval and reproduction of the stored information flawless transmission of the information

Some information is intrinsically digital, so it is natural to process and manipulate it using purely digital techniques. Examples are numbers and words.

The drawback to digitization is that a single analog signal (e.g. a voltage which is a function of time, like a stereo signal) needs many discrete states, or bits, in order to give a satisfactory reproduction. For example, it requires a minimum of 10 bits to determine a voltage at any given time to an accuracy of _ 0:1%. For transmission, one now requires 10 lines instead of the one original analog line. NUMBER SYSTEMS Decimal, Binary, Octal, and Hexadecimal Systems

The familiar decimal number system has base or radix . It referred to as base because it uses ten digits . These digits are referred to as the coefficients of the

decimal 10 system. Thus, in the decimal system the coefficients are multiplied by the appropriate powers of 10 to form a number. For example, the decimal number 58392.46 is interpreted as:

Table shows the first 16 numbers of the decimal, binary, octal, and hexadecimal systems.

Binary, Octal, and Hexadecimal to Decimal Conversions A number in base other than base 10, can be converted to its decimal equivalent using the following

steps: 1. Express the given number in the form of (1.1). 2. Add the terms following the rules of decimal addition.

Example 1

Convert the binary number Solution:

to its decimal equivalent.

Example 2 Convert the octal number Solution: to its decimal equivalent.

Decimal to Binary, Octal, and Hexadecimal Conversions An integer decimal number can be converted to any other base, say , by repeatedly dividing the given decimal number by until the quotient becomes zero. The first remainder obtainedbecomes the least significant digit, and the last remainder becomes the most significant digit of the base number. A fractional decimal number can be converted to any other base, say , by repeatedly multiplying the given decimal number by until a number with zero fractional part is obtained. A mixed (integer and fractional) decimal number can be converted to any other base number, say , by first converting the integer part, then converting the fractional part, and finally combining these two parts.

Example 1

Convert the decimal number Solution:

to its binary equivalent.

In the last step above, the quotient is0 ; therefore, the conversion is completed and thus we have.

Example 2 Convert the decimal number Solution: to its binary equivalent.

We observe that, for this example, the conversion is endless; this is because the given fractional

Decimal to Binary, Octal, and Hexadecimal Conversions Decimal number is not an exact sum of negative powers of 2.

Example Convert the decimal number Solution: to its binary equivalent.

Since the fractional part of the last step above is 0, the conversion is complete and thus

Conversion from decimal-to -octal is accomplished by repeated division by 8 for the integer part, and by repeated multiplication by 8 for the fractional part.

Example Convert the decimal number Solution: We first convert the integer part, next the fractional part, and then we combine these. to its octal equivalent.

Binary- Octal-Hexadecimal Conversions

Example

Operations in Binary, Octal, and Hexadecimal Systems

Binary System Operations

The binary number system employs the numbers 0and 1only; therefore, the possible combinations of binary addition are:

Example 1

Example 2

Octal System Operations The addition of octal numbers is also very similar to decimal numbers addition except that when the sum of two or more octal numbers exceeds seven, a carry occurs just as a carry occurs when the sum of two or more decimal numbers exceeds nine. Table summarizes the octal addition. This table can also be used for octal subtraction as it will be illustrated by Example

TABLE : Table for Addition and subtraction of octal numbers

Example

Hexadecimal System Operations Hexadecimal addition and subtraction is accomplished similarly to that of addition and subtraction with octal numbers except that we use Table. When Table . below is used for addition, we first locate the least significant digit of the first number (augend) in the upper row of the table,and then we locate the least significant digit of the second number (addend) in the left most column of the table. The intersection of the augend with the addend gives the sum of these two numbers. We follow the same procedure for all other digits from right to left.

Example 1

Example 2

Complements of Numbers

The subtraction operation is simplified by the use of the complements of numbers. For each base-b system there are two useful types of complements, the bs- complement, and the (b 1)s- complement - complements and

the nines- complements, for the base- 2 we have the twos- complements and ones- complements, for the base- 8 we have the eights- complements and sevens- complements, and for the base- 16 we have the sixteens- complements and the fifteens- complements.

Tens- Complement The tens- complement of a number can be found by subtracting the first non-zero least significant digit and all zeros to the right of it from 10; then, we subtract all other digits from 9. Example

Nines- Complement The ninescomplement of a number can be found by subtracting every digit of that number From 9. Example 1 Find the nines - complement of 23567 Solution: We subtract every digit of the given number from 9 and we find that the ninescomplement of 23567 is 76432. Example 2 Find the nines- complement of 37.562 Solution:

We subtract every digit of the given number from 9 and we find that the ninescomplement of 23567 is 76432 . Therefore, the ninescomplement of 37.562 is 62.437. Twos -Complement The twos -complement of a number can be found by leaving all the least significant zeros and the least significant one unchanged and then replacing all zeros with ones and all ones with zeros in all the other digits. Example Find the twos -complement of 1101100 Solution: Starting from the right side of the given number we leave 100 unchanged and then for the remaining digits, i.e, 1101 we replace the ones with zeros and the zero with one. Therefore, the twos -complement of 1101100 is 0010100. Example Find the twos -complement of 0.1011 Solution: We leave the lsd (last 1) unchanged and we replace the ones with zeros and the zero with one.

Ones- Complement The ones -complement of a number can be found by replacing all zeros with ones and all ones with zeros.

Example 1

Example 2

Subtraction with Tens and Twos- Complements

Example

Example

Subtraction with Nines and Ones- Complements

Example

Example

Binary Codes Binary Coded Decimal (BCD)

Example

Weighted Binary Codes If each position of a number represents a specific weight then the coding scheme is called weighted binary code. In such coding the bits are multiplied by their corresponding individual weight, and then the sum of these weighted bits gives the equivalent decimal digit.

BCD Code or 8421 Code The full form of BCD is Binary-Coded Decimal. Since this is a coding scheme relating decimal and binary numbers, four bits are required to code each decimal number. For example, (35)10 is represented as 0011 0101 using BCD code, rather than (100011)2. From the example it is clear that it requires more number of bits to code a decimal number using BCD code than using the straight binary code. However, in spite of this disadvantage it is convenient to use BCD code for input and output operations in digital systems. The code is also known as 8-4-2-1 code. This is because 8, 4, 2, and 1 are the weights of the four bits of the BCD code. The weight of the LSB is 20 or 1, that of the next higher order bit is 21 or 2, that of the next higher order bit is 22 or 4, and that of the MSB is 23 or 8. Therefore, this is a weighted code and arithmetic operations can be performed using this code, which will be discussed later on. The bit assignment 0101, for example, can be interpreted by the weights to represent the decimal digit 5 because 0 8 + 1 4 + 0 2 + 1 1 = 5. Since four binary bits are used the maximum decimal equivalent that may be coded is 1510 (i.e., 11112). But the maximum decimal digit available is 910. Hence the binary codes 1010, 1011, 1100, 1101, 1110, 1111, representing 10, 11, 12, 13, 14, and 15 in decimal are never being used in BCD code. So these six codes are called forbidden codes and the group of these codes is called the forbidden group in BCD code. BCD code for decimal digits 0 to 9 is shown in Table Example 1 Give the BCD equivalent for the decimal number 589 Solution : The decimal number is BCD code is 5 8 9 1001

0101 1000

Hence, (589)10 = (010110001001)BCD Example 2. Give the BCD equivalent for the decimal number 69.27. Solution. The decimal number 6 BCD code is 0110 9 1001 2 0010 7 0111

Hence, (69.27)10 = (01101001.00100111)BCD

84-2-1 Code It is also possible to assign negative weights to decimal code, as shown by the 842-1 code. In this case the bit combination 0101 is interpreted as the decimal digit 3, as obtained from 0 8 + 1 4 + 0 (2) + 1 (1) = 3. This is a self-complementary code, that is, the 9s complement of the decimal number is obtained just by changing the 1s to 0s and 0s to 1s, or in effect by getting the 1s complement of the corresponding number. For example, if we change the 1s to 0s and 0s to 1s in the previous example we have 1010, which is interpreted as decimal 6, as obtained from 1 8 + 0 4 + 1 (2) + 0 (1) = 6. And 6 is the 9s complement of 3. This property is useful when arithmetic operations are done internally with decimal numbers (in a binary code) and subtraction is calculated by means of 9s complement. 2421 Code Another weighted code is 2421 code. The weights assigned to the four digits are 2, 4, 2, and 1. The 2421 code is the same as that in BCD from 0 to 4; however, it varies from 5 to 9. For example, in this case the bit combination 0100 represents decimal 4; whereas the bit combination 1101 is interpreted as the decimal 7, as obtained from 2 1 + 1 4 + 0 2 + 1 1 = 7. This is also a self-complementary code, that is, the 9s complement of the decimal number is obtained by changing the 1s to 0s and 0s to 1s. The 2421 codes for decimal numbers 0 through 9 are shown in Table Non-weighted Codes These codes are not positionally weighted. It basically means that each position of the binary number is not assigned a fixed value. Excess-3 codes and Gray codes are such non-weighted codes.

Excess-3 Code

A decimal code that has been used in some old computers is Excess-3 code. This is a Non-weighted code. This code assignment is obtained from the corresponding value of 4-bit binary code after adding 3 to the given decimal digit. Here the maximum value may be 11002. Since the maximum decimal digit is 9 we have to add 3 to 9 and then get the BCD equivalent. Like 84-2-1 and 2421 codes Excess-3 is also a self-complementary code, that is, the 9s complement of the decimal number is obtained by changing the 1s to 0s and 0s to 1s.

This self-complementary property of the code helps considerably in performing subtraction operation in digital systems. Example 1 Convert (367)10 into its Excess-3 code. Solution. The decimal number is 3 Add 3 to each bit Sum 6 7

+3 +3 +3 6 9 10

Converting the above sum into 4-bit binary equivalent, we have a 4-bit binary equivalent of 0110 1001 1010 Hence, the Excess-3 code for (367)10 = 0110 1001 1010

Example 2 Convert (58.43)10 into its Excess-3 code. Soluton. The decimal number is Add 3 to each bit Sum 5 +3 8 4 3

+3 +3 +3 7 6

8 11

Converting the above sum into 4-bit binary equivalent, we have a 4-bit binary equivalent of 1000 1011 0111 0110 Hence, the Excess-3 code for (367)10 = 10001011.01110110

Binary codes for decimal digits

Gray Code Gray code belongs to a class of code known as minimum change code, in which a number changes by only one bit as it proceeds from one number to the next. Hence this code is not useful for arithmetic operations. This code finds extensive use for shaft encoders, in some types of analog-to-digital converters, etc. Gray code is reflected code and is shown in Table. The Gray code may contain any number of bits. Here we take the example of 4-bit Gray code. The code shown in Table is only one of many such possible codes. To obtain a different reflected code, one can start with any bit combination and proceed to obtain the next bit combination by changing only one bit from 0 to 1 or 1 to 0 in any desired random fashion, as long as two numbers do not have identical code assignments. The Gray code is not a weighted code.

Four-bit reflected code Now we try to analyze the name Reflected Code. If we look at the Table 2.3 we can consider seven virtual mirrors m1, m2, m3, m4, m5, m6, and m7 placed. Now, for mirrorm1, if we consider the MSB as the refractive index of the input and output medium then leaving out the MSB we can see that all of the eight combinations of three bits each have their corresponding reflected counterparts. Similarly, for mirrors m2 and m5, if we now leave the actual MSB we can consider the combination of three bits where now we consider the third bit as the new MSB. And similar arguments follow for mirror m1. Similarly, we may analyze the cases for mirrors m3, m4, m6, and m7.

Binary and Gray codes

Conversion of a Binary Number into Gray Code Any binary number can be converted into equivalent Gray code by the following steps: (i) The MSB of the Gray code is the same as the MSB of the binary number; (ii) The second bit next to the MSB of the Gray code equals the Ex-OR of the MSB and Second bit of the binary number; it will be 0 if there are same binary bits or it will be 1 for different binary bits; (iii) The third bit for Gray code equals the exclusive-OR of the second and third bits of the binary number, and similarly all the next lower order bits follow the same mechanism.

Example. Convert (101011)2 into Gray code.

Solution.

Conversion of Gray Code into a Binary Number Any Gray code can be converted into an equivalent binary number by the following steps: (i) the MSB of the binary number is the same as the MSB of the Gray code; (ii) the second bit next to the MSB of the binary number equals the Ex-OR of the MSB of the binary number and second bit of the Gray code; it will be 0 if there are same binary bits or it will be 1 for different binary bits; (iii) the third bit for the binary number equals the exclusive-OR of the second bit of the binary number and third bit of the Gray code, and similarly all the next lower order bits follow the same mechanism. Example. Convert the Gray code 101101 into a binary number. Solution. Step 1. The MSB of the binary number is the same as the MSB of the Gray code

Step 2. Perform the ex-OR between the MSB of the binary number and the second bit of the Gray code. The result is 1, which is the second bit of the binary number.

Step 3. Perform the ex-OR between the second bit of the binary number and the third bit of the Gray code. The result is 0, which is the third bit of the binary number.

Step 4. Perform the ex-OR between the third bit of the binary number and the fourth bit of the Gray code. The result is 1, which is the fourth bit of the binary number.

Step 5. Perform the ex-OR between the fourth bit of the binary number and the fi fth bit of the Gray code. The result is 1, which is the fi fth bit of the binary number.

Step 6. Perform the ex-OR between the fi fth bit of the binary number and the sixth bit of the Gray code. The result is 0, which is the last bit of the binary number.

After completing the conversion, the binary number of the Gray code 101101 is 110110. Error-detection Codes Parity Bit Coding Technique Binary information may be transmitted through some form of communication medium such as wires or radio waves or fiber optic cables, etc. Any external noise introduced into a physical communication medium changes bit values from 0 to 1 or vice versa. An error detection code can be used to detect errors during transmission. The detected error cannot be corrected, but its presence is indicated. A parity bit is an extra bit included with a message to make the total number of 1s either odd or even. A message of four bits and a parity bit, P, are shown in Table. In (a), P is chosen so that the sum of all 1s is odd (including the parity bit). In (b), P is chosen so that the sum of all 1s is even (including the parity bit). In the sending end, the message (in this case the first four bits) is applied to a parity generation circuit where the required P bit is generated. The message, including the parity bit, is transferred to its destination. In the receiving end, all the incoming bits (in this case five) are applied to a parity check circuit to check the proper parity adopted. An error is detected if the checked parity does not correspond to the adopted one.

Check Sums As we have discussed above the parity bit technique fails for double errors, hence we use the Check Sums method in such case. Initially any word A 10010011 is transmitted; next another word B 01110110 is transmitted. The binary digits in the two words are added and the sum obtained is retained in the transmitter. Then any other word C is transmitted and added to the previous sum retained in the transmitter and the new sum is now retained. In a similar manner, each word is added to the previous sum already retained; after transmitting all the words, the final sum, which is called the Check Sum, is also transmitted. The same operation is done at the receiving end and the final sum, which has been obtained here, is being checked against the transmitted Check Sum. There is no error if the two sums are equal. Error-correcting Codes We have already discussed two coding techniques that may be used in transmission to detect errors. But, unfortunately, those discussed above are not capable of correcting the errors. For correction of errors we will now discuss a code called the Hamming code. Hamming Code This coding had been developed by R. W. Hamming where one or more parity bits are added to a data character methodically in order to detect and correct errors. The number of bits changed from one code word to another is known as Hamming distance. Let us consider Ai and Aj to be any two code words in any particular block code. Now

the Hamming distance dij between the two vectors Ai and Aj is defined by the number of components in which they differ. Assuming that dij is determined for each pair of code words, the minimum value of dij is called the minimum Hamming distance, dmin. For example,

Alphanumeric Codes Many applications of the computer require not only handling of numbers, but also of letters. To represent letters it is necessary to have a binary code for the alphabet. In addition, the same binary code must represent the decimal numbers and some other special characters. An alphanumeric code is a binary code of a group of elements consisting of ten decimal digits, the 26 letters of the alphabet (both in uppercase and lowercase), and a certain number of special symbols such as #, /, &, %, etc. The total number of elements in an alphanumeric code is greater than 36. Therefore it must be coded with a minimum number of 6 bits (26 = 64, but 25 = 32 is insufficient). One possible 6-bit alphanumeric code is given in Table. It is used in many computers to represent alphanumeric characters and symbols internally and therefore can be called internal code. Frequently there is a need to represent more than 64 characters, including the lowercase letters and special control characters. For this reason the following two codes are normally used ASCII The full form of ASCII (pronounced as-kee) is American Standard Code for Information Interchange, used in most microcomputers. It is actually a 7-bit code, where a character is represented with seven bits. The character is stored as one byte with one bit remaining unused. But often the extra bit is used to extend the ASCII to represent an additional 128 characters. Some of the codes are shown in Table. EBCDIC The full form of EBCDIC is Extended Binary Coded Decimal Interchange Code. It is also an alphanumeric code generally used in IBM equipment and in large computers for communicating alphanumeric data. For the different alphanumeric characters the code grouping

in this code is different from the ASCII code. It is actually an 8-bit code and a ninth bit is added as the parity bit. Hollerith Code Generally this code is used in punched cards. A punched card consists of 12 rows and 80 columns. An alphanumeric character is represented by each column of 12 bits each by punching holes in the appropriate rows. The presence of a hole represents a 1 and its absence indicates 0. The 12 rows are marked starting from the top, as 12, 11, 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. The first three rows are called the zone punch and the last nine are called the numeric punch. The code used here is called the Hollerith code. The letters are represented as two holes in a column, one in zone punch and the other in numeric punch; decimal digits are represented as a single hole in a numeric punch. Special characters are represented as one, two, or three holes in a column; while the zone is always used, the other two holes, if used, are in a numeric punch with the eighth punch being commonly used. The Hollerith code is BCD and hence the transition from EBCDIC is simple. The Hollerith code is used in the card readers and punches of large computers, while EBCDIC may be used within the computer. Partial list of alphanumeric codes

Boolean algebra Boolean algebra is an algebraic structure defined by a set of elements ,B, together with two binary operators,+ and., provider that the following postulates are satisfied.

T7: Null Law (a) 0 + A = A (b) 1 A = A (c) 1 + A = 1 (d) 0 A = 0

T8 :Double Negation Law

T9 :Absorption Law

T10 : De Morgan's Theorem

Example 1: Using theorems,

BOOLEAN FUNCTIONS Binary variables have two values, either 0 or 1. A Boolean function is an expression formed with binary variables, the two binary operators AND and OR, one unary operator NOT, parentheses and equal sign. The value of a function may be 0 or 1, depending on the values of variables present in the Boolean function or expression. For example, if a Boolean function is expressed algebraically as F = ABC then the value of F will be 1, when A = 1, B = 0, and C = 1. For other values of A, B, C the value of F is 0.Boolean functions can also be represented by truth tables. A truth table is the tabular form of the values of a Boolean function according to the all possible values of its variables. Foran n number of variables, 2n combinations of 1s and 0s are listed and one column represents function values according to the different combinations. For example, for three variables the Boolean function F = AB + C truth table can be written as below in Figure

A Boolean function from an algebraic expression can be realized to a logic diagram composed of logic gates. Figure 3.11 is an example of a logic diagram realized by the basic gates like AND, OR, and NOT gates. In subsequent chapters, more logic diagrams with various gates will be shown

SIMPLIFICATION OF BOOLEAN EXPRESSIONS Example 1: Simplify the Boolean function F=AB+ BC + BC. Solution. F = AB + BC + BC = AB + C(B + B) = AB + C Example 2: Simplify the Boolean function F = AB + (AC) + ABC(AB + C). Solution. F = AB + (AC) + ABC(AB + C) = AB + A + C+ ABC.AB + ABC.C

= AB + A + C + 0 + ABC (B.B = 0 and C.C = C) = ABC + ABC + A + C + ABC (AB = AB(C + C) = ABC + ABC) = AC(B + B) + C(AB + 1) + A = AC + C+A (B + B = 1 and AB + 1 = 1) = AC + (AC) =1 CANONICAL AND STANDARD FORMS Logical functions are generally expressed in terms of different combinations of logical variables with their true forms as well as the complement forms. Binary logic values obtained by the logical functions and logic variables are in binary form. An arbitrary logic function can be expressed in the following forms. (i) Sum of the Products (SOP) (ii) Product of the Sums (POS) Sum of Products (SOP). The logical sum of two or more logical product terms is Referred to as a sum of products expression. It is basically an OR operation on AND operated variables. For example, Y = AB + BC + AC or Y = AB + BC + AC are sum of products expressions. Product of Sums (POS). Similarly, the logical product of two or more logical sum terms is called a product of sums expression. It is an AND operation on OR operated variables. For example, Y = (A + B + C)(A + B + C)(A + B + C) or Y = (A + B + C)(A + B + C) are product of sums expressions However, Boolean functions are also sometimes expressed in nonstandard forms like F = (AB + CD)(AB + CD), which is neither a sum of products form nor a product of sums form. However, the same expression can be converted to a standard form with help of various Boolean properties, as F = (AB + CD)(AB + CD) = ABCD + ABCD

KARNAUCH MAPS

Boolean algebra is the basis for any simplification of logic circuits. One of the easiest ways to simplify logic circuits is to use the karnaugh map method. This graphic method is bascd on Boolean theorems. It is only one of several methods used by logic designers to simplify logic circuits. Karnaugh maps are sometimes referred to as K maps. The first step in the Karnaugh mapping procedure is to develop a minterm Boolean expression from a truth table. Consider the familiar truth table in Fig. 1.a. Each 1 in the Y column of the truth table produces two variables ANDed together. These ANDed groups are then ORed to form a sum-of-products (minterm) type of Boolean expression .This expression will be referred to as the unsimpified Boolean expression. The second step in the mapping procedure is to plot 1s in the Karnaugh map in Fig. 1.c. Each ANDed set of variables from the minterm expression is placed in the appropriate square of the map. The map is just a very special output column of the truth table. The third step is to loop adjacent groups of two, four, or eight Is together. The fourth step is to eliminate variables.

USING THREE VARIABLE:.

In summary, the steps in simplifying a logic expression using a Karnaugh map are as follows: 1. Write a minterm Boolean expression from the truth table. 2. Plot a 1 on the map for each ANDed group of variables. (The number of 1s in the Y column of the truth table will equal the number of Is on the map.) 3. Draw loops around adjacent groups of two, four, or eight 1s on the map. (The loops may overlap.) 4. Eliminate the variable(s) that appear(s) with its (their) complement(s) within a loop, and save the variable(s) that is (are) left. 5. Logically OR the groups that remain to form the simplified minterm expression. SOLVED PROBLEMS:
1) Write the unsimplified minterm Boolean expression for the truth table

Solution:

2)

Draw a 3-variable Karnaugh map. Plot four 1s on the map from the Boolean expression

developed in Prob.1. Draw the appropriate loops around groups of Is on the map.

Solution:

3)

Write the simplified Boolean expression based on the Karnaugh map from Prob.2.

Solution:

KARNAUGH MAPS WITH FOUR VARIABLES: Consider the truth table with four variables in Fig.3.a. The first step in simplification by using a Karnaugh map is to write the minterm Boolean expression. The lengthy unsimplified minterm expression appears in Fig.3.b. An ANDed group for four variables is written for each 1 in the Y column of the truth table. The second step is to plot 1s on the Karnaugh map. Nine 1s are plotted onthe map in Fig ,Each 1 on the map represents an ANDed group of terms from the unsimplified expression. The third step is to loop adjacent groups of 1s. Adjacent groups of eight, four, or two 1sare looped. Larger loops provide more simplification. Two loops have been drawn in Fig. 3.c. The larger loop contains eight 1s. The fourth step is to eliminate variables. The large loop in eliminates the A , B , and C variables. This leaves the D term. The small loop contains two 1s and eliminates the D variable. That leaves the term. The fifth step is to logically OR

the remaining terms. Figure 3.d shows the remaining groups ORed to form the simplified minterm expression .The amount of simplification in this example is

obvious when the two Boolean expressions in Fig.3 are compared.

Fig.3: Using a four-variable map

Consider the 3-variable Karnaugh map in Fig. 4.a. The letters have been omitted from the edges of the map to simplify the illustration. How many loops can be drawn on this map? There are no adjacent groups of 1 , and therefore no loops are drawn in Fig. 4.a. No simplification is possible in the example shown in Fig. 4 a.
s

Fig :4 Some unusual looping variations The 3-variable Karnaugh map in Fig. 4.b contains two Is. Think of the top and bottom edges of the map as being connected as if rolled into a tube. The 1s can then be looped into a group of two, as shown in Fig. 4.b. One variable can thus be eliminated.

Consider the 4-variable Karnaugh maps in Fig. 4.c and d. The top and bottom edges of the map are considered connected for looping purposes in Fig. 4.c. The 1s can then be looped into a group of four Is, and two terms can be eliminated. In Fig. 4.d the right edge of the map is considered connected to the left edge. The four 1s are looped into a single loop. Two variables are thus eliminated. Another looping variation is illustrated in Fig. 4.e. The corners of the map are considered connected as if the map were wrapped around a ball. The four 1s in {he corners of the map are then looped into a single loop. The single loop of four 1s thereby eliminates two variables.

SOLVED PROBLEMS:

1) Write the unsimplified minterm Boolean expression for the truth table.

2) Draw a 4-variable Karnaugh map. Plot five 1s on the map for the Boolean expression

Draw the appropriate loops around groups of Is on the map.

Solution:

USING MAPS WITH MAXTERM EXPRESSIONS:

A different form of the Karnaugh map is used with maxterm Boolean expressions. The steps for simplifying maxterm expressions are as follows:

1. Write a maxterm Boolean expression from the truth table. (Note the inverted form in Fig.5 a.) 2. Plot a 1 on the map for each ORed group of variables. The number of OS in the Y column of the truth table will equal the number of 1s on the map. 3. Draw loops around adjacent groups of two, four, or eight 1s on the map. 4. Eliminate the variable(s) that appear(s) with its (their) complement(s) within a loop, and save the variable(s) that is (are) left. 5. Logically AND the groups that remain to form the simplified maxterm expression. The first step in simplifying a maxterm expression by using a Karnaugh map is to write the expression in unsimplified form. Figure 5 a illustrates how a maxterm is written for each 0 in the Y column of the truth table. The terms of the ORed group are inuerted from the way they appear in the truth table. The ORed groups are then ANDed to form the unsimplified maxterm Boolean expression in Fig. 5 b.

The second step is to plot Is on the map for each ORed group. The three maxterms in the unsimplified expression are placed as three 1s on the reuised Karnaugh map (Fig. 5 c).

The third step is to loop adjacent groups of eight, four, or two 1s on the map. Two loops have been drawn on the map in Fig. 5 c. Each loop contains two 1s. The fourth step is to eliminate variables. The shaded loop in Fig. 5 c is shown to eliminate the A variable. This leaves the maxterm ( B + C). The partially unshaded loop is shown to eliminate the B variable. The maxterm mapping procedure and Karnaugh map are different from those used for minterm expressions. Both techniques should be tried on a truth table to find the less costly logic circuit. A 4-variable Karnaugh map for maxterm expressions is illustrated in Fig.. Note the special pattern of letters on the left and top edges of the map. Care must always be used to position all the terms correctly when drawing maps.

SOLVED PROBLEMS:

1)

Write the unsimplified rnaxterm Boolean expression for the truth table.

Solution:

DONT CARES ON KARNAUGH MAPS: There are six combinations (1010, 1011, 1100, 1101, 1110, and 1111) are not used by the BCD code. These combinations are called dont cares when plotted on a Karnaugh map. The dont cares may have some effect on simplifying any logic diagram that might be constructed. Suppose a problem specifying that a warning light would come ON when the BCD count reached 1001 (decimal 9); see the truth table in Fig. 6. See 1 is placed in the output column ( Y ) of the truth table after the input 1001. The six dont cares (Xs from the truth table) are plotted as Xs on the map. An X on the map means that square can be either a 1 or a 0. A loop is drawn around adjacent 1s. The Xs on the map can be considered Is, so the single loop is drawn around the 1 and three Xs. Remember that only groups of two, four, or eight adjacent 1s and Xs are looped together. The loop contains four squares, which will eliminate two variables. The B and C variables are eliminated, leaving the simplified Boolean expression D - A = Y in Fig. 6 c.

SOLVED PROBLEMS:

1)

Draw a 4-variable minterm Karnaugh map. Plot two 1s and six Xs (for the dont cares) on

the map based on the truth table.

solution:

THE TABULATION METHOD The Karnaugh map method is a very useful and convenient tool for simplification of Boolean functions as long as the number of variables does not exceed four (at the most six). But if the number of variables increases, the visualization and selection of patterns of adjacent Cells in the Karnaugh map become complicated and difficult. The tabular method, also Known as the Quine-McCluskey method, overcomes this difficulty. It is a specific step-by-step Procedure to achieve guaranteed simplified standard form of expression for a function. The following steps are followed for simplified ation by the tabular or Quine-McCluskey Method. 1. An exhaustive search is done to find the terms that may be included in the simplified Functions. These terms are called prime implicants. 2. Form the set of prime implicants, essential prime implicants are determined by preparing a prime implicants chart.

3. The minterms that are not covered by the essential prime implicants, are taken into consideration by selecting some more prime implications to obtain an optimized Boolean expression. Determination of Prime Implicants The Prime implicants are obtained by the following procedure: 1. Each minterm of the function is expressed by its binary representation. 2. The minters are arranged according to increasing index (index is defined as the Number of 1s in a minter). Each set of minterms possessing the same index are separated by lines. 3. Now each of the minterms is compared with the minterms of a higher index. For each pair of terms that can combine, the new terms are formed. If two minterms are differed by only one variable, that variable is replaced by a - (dash) to form the new term with one less number of literals. A line is drawn in when all the minterms of one set is compared with all the minterms of a higher index. 4. The same process is repeated for all the groups of minterms. A new list of terms is Obtained after the first stage of elimination is completed. 5. At the next stage of elimination two terms from the new list with the - of the same Position differing by only one variable is compared and again another new term is Formed with a less number of literals. 6. The process is to be continued until no new match is possible. 7. All the terms that remain unchecked i.e., where no match is found during the process, Are considered to be the prime implicates. Prime Implicit Chart 1. After obtaining the prime implicates, a chart or table is prepared where rows are Represented by the prime implicates and the columns are represented by the minters of the function. 2. Crosses are placed in each row to show the composition of the minterms that makes the prime implicants. 3. A completed prime implicant table is to be inspected for the columns containing only a single cross. Prime implicants that cover the minterms with a single cross are called the essential prime implicants. The above process to find the prime implicants and preparation of the chart can beillustrated by the following examples.

Example: Obtain the minimal sum of the products for the function F (A, B, C, D) = (1, 4, 6, 7, 8, 9, 10, 11, 15). Solution : The table in Figure 4.28 shows the step-by-step procedure the Quine- McCluskey method uses to obtain the simplified expression of the above function. Column I consists of the decimal equivalent of the function or the minterms and column II is the corresponding binary representation. They are grouped according to their index i.e., Number of 1s in the binary equivalents. In column III, two minterms are grouped if they are differed by only a single variable and equivalent terms are written with a - in the place where the variable changes its logic value. As an example, minterms 1 (0001) and 9 (1001) are grouped and written as 1,9 ( 001) and so on for the others. Also, the terms of column II, which are considered to form the group in column III, are marked with .

Example 1: Obtain the minimal sum of the products for the function F (A,B,C,D) = (1, 2, 3, 7, 8, 9, 10, 11, 14, 15) by the Quine-McClusky method.

Example 2: Using the Quine-McClusky method, obtain the minimal sum of the Products expression for the function F(A, B, C, D) = (1, 3, 4, 5, 9, 10, 11) + (6, 8). Example 3: Using the Karnaugh map method obtain the minimal sum of the Products and product of sums expressions for the function

LOGIC GATES
Digital systems are said to be constructed by using logic gates. These gates are the AND, OR, NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are described below with the aid of truth tables.

AND gate : The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is sometimes omitted i.e. AB
TRUTH TABLE

The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are high. A dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is sometimes omitted i.e. AB

OR gate:

TRUTH TABLE

The OR gate is an electronic circuit that gives a high output (1) if one or more of its inputs are high. A plus (+) is used to show the OR operation.

NOT gate:

TRUTH TABLE

The NOT gate is an electronic circuit that produces an inverted version of the input at its output. It is also known as an inverter. If the input variable is A, the inverted output is known as NOT A. This is also shown as A', or A with a bar over the top, as shown at the outputs. The diagrams below show two ways that the NAND logic gate can be configured to produce a NOT gate. It can also be done using NOR logic gates in the same way.

NAND gate:

TRUTH TABLE

This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND gate with a small circle on the output. The small circle represents inversion.

NOR gate:

TRUTH TABLE

This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The outputs of all NOR gates are low if any of the inputs are high. The symbol is an OR gate with a small circle on the output. The small circle represents inversion.

EXOR gate:

TRUTH TABLE

The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both, of its two inputs are high. An encircled plus sign () is used to show the EOR operation.

EXNOR gate:

TRUTH TABLE

The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output if either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small circle on the output. The small circle represents inversion. The NAND and NOR gates are called universal functions since with either one the AND and OR functions and NOT can be generated. Note: A function in sum of products form can be implemented using NAND gates by replacing all AND and OR gates by NAND gates. A function in product of sums form can be implemented using NOR gates by replacing all AND and OR gates by NOR gates.

Anda mungkin juga menyukai