Boolean Algebra and Digital Logic


 Jemimah Brown
 1 years ago
 Views:
Transcription
1 Null3 /7/3 4:35 PM Page 93 I ve alwas loved that word, Boolean. Claude Shannon CHAPTER 3 3. Boolean Algebra and Digital Logic INTRODUCTION eorge Boole lived in England during the time Abraham Lincoln was getting Ginvolved in politics in the United States. Boole was a mathematician and logi cian who developed was of epressing logical processes using algebraic smbols, thus creating a branch of mathematics known as smbolic logic, or Boolean algebra. It wasn t until ears later that Boolean algebra was applied to computing b John Vincent Atanasoff. He was attempting to build a machine based on the same technolog used b Pascal and Babbage, and wanted to use this machine to solve linear algebraic equations. After struggling with repeated failures, Atanasoff was so frustrated he decided to take a drive. He was living in Ames, Iowa, at the time, but found himself 2 miles awa in Illinois before he suddenl realized how far he had driven. Atanasoff had not intended to drive that far, but since he was in Illinois where he could legall bu a drink in a tavern, he sat down, ordered a bourbon, and realized he had driven quite a distance to get a drink! (Atanasoff reassured the author that it was not the drink that led him to the following revelations in fact, he left the drink untouched on the table.) Eercising his phsics and mathematics backgrounds and focusing on the failures of his previous computing machine, he made four critical breakthroughs necessar in the machine s new design. He would use electricit instead of mechanical movements (vacuum tubes would allow him to do this). Because he was using electricit, he would use base 2 numbers instead of base (this correlated directl with switches that were either on or off ), resulting in a digital, rather than an analog, machine. 93
2 Null3 /7/3 4:35 PM Page Chapter 3 / Boolean Algebra and Digital Logic He would use capacitors (condensers) for memor because the store electrical charges with a regenerative process to avoid power leakage. Computations would be done b what Atanasoff termed direct logical action (which is essentiall equivalent to Boolean algebra) and not b enumeration as all previous computing machines had done. It should be noted that at the time, Atanasoff did not recognize the application of Boolean algebra to his problem and that he devised his own direct logical action b trial and error. He was unaware that in 938, Claude Shannon proved that twovalued Boolean algebra could describe the operation of twovalued electrical switching circuits. Toda, we see the significance of Boolean algebra s application in the design of modern computing sstems. It is for this reason that we include a chapter on Boolean logic and its relationship to digital computers. This chapter contains a brief introduction to the basics of logic design. It provides minimal coverage of Boolean algebra and this algebra s relationship to logic gates and basic digital circuits. You ma alread be familiar with the basic Boolean operators from a previous programming class. It is a fair question, then, to ask wh ou must stud this material in more detail. The relationship between Boolean logic and the actual phsical components of an computer sstem is ver strong, as ou will see in this chapter. As a computer scientist, ou ma never have to design digital circuits or other phsical components in fact, this chapter will not prepare ou to design such items. Rather, it provides sufficient background for ou to understand the basic motivation underling computer design and implementation. Understanding how Boolean logic affects the design of various computer sstem components will allow ou to use, from a programming perspective, an computer sstem more effectivel. For the interested reader, there are man resources listed at the end of the chapter to allow further investigation into these topics. 3.2 BOOLEAN ALGEBRA Boolean algebra is an algebra for the manipulation of objects that can take on onl two values, tpicall true and false, although it can be an pair of values. Because computers are built as collections of switches that are either on or off, Boolean algebra is a ver natural wa to represent digital information. In realit, digital circuits use low and high voltages, but for our level of understanding, and will suffice. It is common to interpret the digital value as false and the digital value as true Boolean Epressions In addition to binar objects, Boolean algebra also has operations that can be performed on these objects, or variables. Combining the variables and operators ields Boolean epressions. A Boolean function tpicall has one or more input values and ields a result, based on these input values, in the range {,}. Three common Boolean operators are AND, OR, and NOT. To better understand these operators, we need a mechanism to allow us to eamine their behav
3 Null3 /7/3 4:35 PM Page / Boolean Algebra 95 Inputs Outputs Inputs Outputs + TABLE 3. The Truth Table for AND TABLE 3.2 The Truth Table for OR iors. A Boolean operator can be completel described using a table that lists the inputs, all possible values for these inputs, and the resulting values of the operation for all possible combinations of these inputs. This table is called a truth table. A truth table shows the relationship, in tabular form, between the input values and the result of a specific Boolean operator or function on the input variables. Let s look at the Boolean operators AND, OR, and NOT to see how each is represented, using both Boolean algebra and truth tables. The logical operator AND is tpicall represented b either a dot or no smbol at all. For eample, the Boolean epression is equivalent to the epression and is read and. The epression is often referred to as a Boolean product. The behavior of this operator is characterized b the truth table shown in Table 3.. The result of the epression is onl when both inputs are, and otherwise. Each row in the table represents a different Boolean epression, and all possible combinations of values for and are represented b the rows in the table. The Boolean operator OR is tpicall represented b a plus sign. Therefore, the epression + is read or. The result of + is onl when both of its input values are. The epression + is often referred to as a Boolean sum. The truth table for OR is shown in Table 3.2. The remaining logical operator, NOT, is represented tpicall b either an overscore or a prime. Therefore, both and are read as NOT. The truth table for NOT is shown in Table 3.3. We now understand that Boolean algebra deals with binar variables and logical operations on those variables. Combining these two concepts, we can eamine Boolean epressions composed of Boolean variables and multiple logic operators. For eample, the Boolean function: F(,, z) = + z Inputs Outputs TABLE 3.3 The Truth Table for NOT
4 Null3 /7/3 4:35 PM Page Chapter 3 / Boolean Algebra and Digital Logic Inputs Outputs z z + z = F TABLE 3.4 The Truth Table for F(,,z) = + z is represented b a Boolean epression involving the three Boolean variables,, and z and the logical operators OR, NOT, and AND. How do we know which operator to appl first? The rules of precedence for Boolean operators give NOT top priorit, followed b AND, and then OR. For our previous function F, we would negate first, then perform the AND of and z, and lastl OR this result with. We can also use a truth table to represent this epression. It is often helpful, when creating a truth table for a more comple function such as this, to build the table representing different pieces of the function, one column at a time, until the final function can be evaluated. The truth table for our function F is shown in Table 3.4. The last column in the truth table indicates the values of the function for all possible combinations of,, and z. We note that the real truth table for our function F consists of onl the first three columns and the last column. The shaded columns show the intermediate steps necessar to arrive at our final answer. Creating truth tables in this manner makes it easier to evaluate the function for all possible combinations of the input values Boolean Identities Frequentl, a Boolean epression is not in its simplest form. Recall from algebra that an epression such as is not in its simplest form; it can be reduced (represented b fewer or simpler terms) to 8. Boolean epressions can also be simplified, but we need new identities, or laws, that appl to Boolean algebra instead of regular algebra. These identities, which appl to single Boolean variables as well as Boolean epressions, are listed in Table 3.5. Note that each relationship (with the eception of the last one) has both an AND (or product) form and an OR (or sum) form. This is known as the dualit principle. The Identit Law states that an Boolean variable ANDed with or ORed with simpl results in the original variable. ( is the identit element for AND; is the identit element for OR.) The Null Law states that an Boolean variable ANDed with is, and a variable ORed with is alwas. The Idempotent Law states that ANDing or ORing a variable with itself produces the original variable. The Inverse Law states that ANDing or ORing a variable with its complement
5 Null3 /7/3 4:35 PM Page / Boolean Algebra 97 Identit Name Identit Law Null (or Dominance) Law Idempotent Law Inverse Law Commutative Law Associative Law Distributive Law Absorption Law DeMorgan s Law Double Complement Law AND Form OR Form = + = = + = = + = = + = = + = + ()z = (z) (+)+z = +(+z) +z = (+)(+z) (+z) = +z (+) = + = () = + (+) = = TABLE 3.5 Basic Identities of Boolean Algebra produces the identit for that given operation. You should recognize the Commutative Law and Associative Law from algebra. Boolean variables can be reordered (commuted) and regrouped (associated) without affecting the final result. The Distributive Law shows how OR distributes over AND and vice versa. The Absorption Law and DeMorgan s Law are not so obvious, but we can prove these identities b creating a truth table for the various epressions: If the righthand side is equal to the lefthand side, the epressions represent the same function and result in identical truth tables. Table 3.6 depicts the truth table for both the lefthand side and the righthand side of DeMorgan s Law for AND. It is left as an eercise to prove the validit of the remaining laws, in particular, the OR form of DeMorgan s Law and both forms of the Absorption Law. The Double Complement Law formalizes the idea of the double negative, which evokes rebuke from high school teachers. The Double Complement Law can be useful in digital circuits as well as in our life. For eample, let be the amount of cash ou have (assume a positive quantit). If ou have no cash, ou have. When an untrustworth acquaintance asks to borrow some cash, ou can truthfull sa that ou don t have no mone. That is, = ( ) even if ou just got paid. One of the most common errors that beginners make when working with Boolean logic is to assume the following: ( ) = Please note that this is not a valid equalit! DeMorgan s Law clearl indicates that the above statement is incorrect; however, it is a ver eas mistake to make, and one that should be avoided. () () + TABLE 3.6 Truth Tables for the AND Form of DeMorgan s Law
6 Null3 /7/3 4:35 PM Page Chapter 3 / Boolean Algebra and Digital Logic Simplification of Boolean Epressions The algebraic identities we studied in algebra class allow us to reduce algebraic epressions (such as ) to their simplest forms (9 + 5). The Boolean identities can be used to simplif Boolean epressions in a similar fashion. We appl these identities in the following eamples. EXAMPLE 3. Suppose we have the function F(,) = +. Using the OR form of the Idempotent Law and treating the epression as a Boolean variable, we simplif the original epression to. Therefore, F(,) = + =. EXAMPLE 3.2 Given the function F(,,z) = z + z + z, we simplif as follows: F(,,z) = z + z + z = (z + z) + z (Distributive) = () + z (Inverse) = + z (Identit) At times, the simplification is reasonabl straightforward, as in the preceding eamples. However, using the identities can be trick, as we see in this net eample. EXAMPLE 3.3 Given the function F(,,z)= + z + z, we simplif as follows: = + z + z() (Identit) = + z + z( + ) (Inverse) = + z + (z) + (z) (Distributive) = + z + (z) + (z) (Commutative) = + z + ()z + ( z) (Associative) = + ()z + z + ( z) (Commutative) = ( + z) + z( + ) (Distributive) = () + z() (Null) = + z (Identit) Eample 3.3 illustrates what is commonl known as the Consensus Theorem. How did we know to insert additional terms to simplif the function? Unfortunatel, there is no defined set of rules for using these identities to minimize a Boolean epression; it is simpl something that comes with eperience. There are other methods that can be used to simplif Boolean epressions; we mention these later in this section.
7 Null3 /7/3 4:35 PM Page / Boolean Algebra 99 Proof (+)(+) = +++ = ++ + = ++ + = ++ = (+)+ = ()+ = + = Identit Name Distributive Law Inverse Law Idempotent Law Identit Law Distributive Law (and Commutative Law) Inverse Law Identit Law Idempotent Law TABLE 3.7 Eample Using Identities We can also use these identities to prove Boolean equalities. Suppose we want to prove that ( + )( + ) =. The proof is given in Table 3.7. To prove the equalit of two Boolean epressions, ou can also create the truth tables for each and compare. If the truth tables are identical, the epressions are equal. We leave it as an eercise to find the truth tables for the equalit in Table Complements As ou saw in Eample 3., the Boolean identities can be applied to Boolean epressions, not simpl Boolean variables (we treated as a Boolean variable and then applied the Idempotent Law). The same is true for the Boolean operators. The most common Boolean operator applied to more comple Boolean epressions is the NOT operator, resulting in the complement of the epression. Later we will see that there is a onetoone correspondence between a Boolean function and its phsical implementation using electronic circuits. uite often, it is cheaper and less complicated to implement the complement of a function rather than the function itself. If we implement the complement, we must invert the final output to ield the original function; this is accomplished with one simple NOT operation. Therefore, complements are quite useful. To find the complement of a Boolean function, we use DeMorgan s Law. The OR form of this law states that ( + ) =. We can easil etend this to three or more variables as follows: Given the function: F(,,z) = ( + + z ) Let w = ( + ). Then F(,,z) = (w + z ) = w z Now, appling DeMorgan s Law again, we get: w z = ( + ) z = z =F (,,z)
8 Null3 /7/3 4:35 PM Page Chapter 3 / Boolean Algebra and Digital Logic z z +z +z (+z) TABLE 3.8 Truth Table Representation for a Function and Its Complement Therefore, if F(,,z) = ( + + z), then F (,,z) = z. Appling the principle of dualit, we see that ( z ) = + + z. It appears that to find the complement of a Boolean epression, we simpl replace each variable b its complement ( is replaced b ) and interchange ANDs and ORs. In fact, this is eactl what DeMorgan s Law is telling us to do. For eample, the complement of + z is ( + z). We have to add the parentheses to ensure the correct precedence. You can verif that this simple rule of thumb for finding the complement of a Boolean epression is correct b eamining the truth tables for both the epression and its complement. The complement of an epression, when represented as a truth table, should have s for output everwhere the original function has s, and s in those places where the original function has s. Table 3.8 depicts the truth tables for F(,,z) = + z and its complement, F (,,z) = ( + z). The shaded portions indicate the final results for F and F Representing Boolean Functions We have seen that there are man different was to represent a given Boolean function. For eample, we can use a truth table or we can use one of man different Boolean epressions. In fact, there are an infinite number of Boolean epressions that are logicall equivalent to one another. Two epressions that can be represented b the same truth table are considered logicall equivalent. See Eample 3.4. EXAMPLE 3.4 Suppose F(,,z) = +. We can also epress F as F(,,z) = + + because the Idempotent Law tells us these two epressions are the same. We can also epress F as F(,,z) = ( + ) using the Distributive Law. To help eliminate potential confusion, logic designers specif a Boolean function using a canonical, or standardized, form. For an given Boolean function, there eists a unique standardized form. However, there are different standards that designers use. The two most common are the sumofproducts form and the productofsums form.
9 Null3 /7/3 4:35 PM Page 3.2 / Boolean Algebra The sumofproducts form requires that the epression be a collection of ANDed variables (or product terms) that are ORed together. The function F (,,z)= + z + z is in sumofproducts form. The function F 2 (,,z)= + ( + z ) is not in sumofproducts form. We appl the Distributive Law to distribute the variable in F 2, resulting in the epression + + z, which is now in sumofproducts form. Boolean epressions stated in productofsums form consist of ORed variables (sum terms) that are ANDed together. The function F (,,z) = ( + )( + z)( + z )( + z) is in productofsums form. The productofsums form is often preferred when the Boolean epression evaluates true in more cases than it evaluates false. This is not the case with the function, F, so the sumofproducts form is appropriate. Also, the sumofproducts form is usuall easier to work with and to simplif, so we use this form eclusivel in the sections that follow. An Boolean epression can be represented in sumofproducts form. Because an Boolean epression can also be represented as a truth table, we conclude that an truth table can also be represented in sumofproducts form. It is a simple matter to convert a truth table into sumofproducts form, as indicated in the following eample. EXAMPLE 3.5 Consider a simple majorit function. This is a function that, when given three inputs, outputs a if less than half of its inputs are, and a if at least half of its inputs are. Table 3.9 depicts the truth table for this majorit function over three variables. To convert the truth table to sumofproducts form, we start b looking at the problem in reverse. If we want the epression + to equal, then either or (or both) must be equal to. If + z =, then either = or z = (or both). Using this logic in reverse and appling it to Eample 3.5, we see that the function must output a when =, =, and z =. The product term that satisfies this is z (clearl this is equal to when =, =, and z = ). The second occurrence of an output value of is when =, =, and z =. The product term to guarantee an output of is z. The third product term we need is z, and the last is z. In summar, to generate a sumofproducts epression using z F TABLE 3.9 Truth Table Representation for the Majorit Function
10 Null3 /7/3 4:35 PM Page 2 2 Chapter 3 / Boolean Algebra and Digital Logic the truth table for an Boolean epression, ou must generate a product term of the input variables corresponding to each row where the value of the output variable in that row is. In each product term, ou must then complement an variables that are for that row. Our majorit function can be epressed in sumofproducts form as F(,,z) = z + z + z + z. Please note that this epression ma not be in simplest form; we are onl guaranteeing a standard form. The sumofproducts and productofsums standard forms are equivalent was of epressing a Boolean function. One form can be converted to the other through an application of Boolean identities. Whether using sumofproducts or productofsums, the epression must eventuall be converted to its simplest form, which means reducing the epression to the minimum number of terms. Wh must the epressions be simplified? A onetoone correspondence eists between a Boolean epression and its implementation using electrical circuits, as we shall see in the net section. Unnecessar product terms in the epression lead to unnecessar components in the phsical circuit, which in turn ield a suboptimal circuit. 3.3 LOGIC GATES The logical operators AND, OR, and NOT that we have discussed have been represented thus far in an abstract sense using truth tables and Boolean epressions. The actual phsical components, or digital circuits, such as those that perform arithmetic operations or make choices in a computer, are constructed from a number of primitive elements called gates. Gates implement each of the basic logic functions we have discussed. These gates are the basic building blocks for digital design. Formall, a gate is a small, electronic device that computes various functions of twovalued signals. More simpl stated, a gate implements a simple Boolean function. To phsicall implement each gate requires from one to si or more transistors (described in Chapter ), depending on the technolog being used. To summarize, the basic phsical component of a computer is the transistor; the basic logic element is the gate Smbols for Logic Gates We initiall eamine the three simplest gates. These correspond to the logical operators AND, OR, and NOT. We have discussed the functional behavior of each of these Boolean operators. Figure 3. depicts the graphical representation of the gate that corresponds to each operator. + AND Gate OR Gate NOT Gate FIGURE 3. The Three Basic Gates
11 Null3 /7/3 4:35 PM Page / Logic Gates 3 XOR (a) FIGURE 3.2 (b) a) The Truth Table for XOR b) The Logic Smbol for XOR Note the circle at the output of the NOT gate. Tpicall, this circle represents the complement operation. Another common gate is the eclusiveor (XOR) gate, represented b the Boolean epression:. XOR is false if both of the input values are equal and true otherwise. Figure 3.2 illustrates the truth table for XOR as well as the logic diagram that specifies its behavior Universal Gates Two other common gates are NAND and NOR, which produce complementar output to AND and OR, respectivel. Each gate has two different logic smbols that can be used for gate representation. (It is left as an eercise to prove that the smbols are logicall equivalent. Hint: Use DeMorgan s Law.) Figures 3.3 and 3.4 depict the logic diagrams for NAND and NOR along with the truth tables to eplain the functional behavior of each gate. NAND () + = () FIGURE 3.3 The Truth Table and Logic Smbols for NAND NOR ( + ) = ( +) FIGURE 3.4 The Truth Table and Logic Smbols for NOR
12 Null3 /7/3 4:35 PM Page 4 4 Chapter 3 / Boolean Algebra and Digital Logic ( ) ( ) = () = + AND Gate OR Gate NOT Gate FIGURE 3.5 Three Circuits Constructed Using Onl NAND Gates The NAND gate is commonl referred to as a universal gate, because an electronic circuit can be constructed using onl NAND gates. To prove this, Figure 3.5 depicts an AND gate, an OR gate, and a NOT gate using onl NAND gates. Wh not simpl use the AND, OR, and NOT gates we alread know eist? There are two reasons to investigate using onl NAND gates to build an given circuit. First, NAND gates are cheaper to build than the other gates. Second, comple integrated circuits (which are discussed in the following sections) are often much easier to build using the same building block (i.e., several NAND gates) rather than a collection of the basic building blocks (i.e., a combination of AND, OR, and NOT gates). Please note that the dualit principle applies to universalit as well. One can build an circuit using onl NOR gates. NAND and NOR gates are related in much the same wa as the sumofproducts form and the productofsums form presented earlier. One would use NAND for implementing an epression in sumofproducts form and NOR for those in productofsums form Multiple Input Gates In our eamples thus far, all gates have accepted onl two inputs. Gates are not limited to two input values, however. There are man variations in the number and tpes of inputs and outputs allowed for various gates. For eample, we can represent the epression + + z using one OR gate with three inputs, as in Figure 3.6. Figure 3.7 represents the epression z. z + + z FIGURE 3.6 A ThreeInput OR Gate Representing + + z z z FIGURE 3.7 A ThreeInput AND Gate Representing z
13 Null3 /7/3 4:35 PM Page / Digital Components 5 FIGURE 3.8 AND Gate with Two Inputs and Two Outputs We shall see later in this chapter that it is sometimes useful to depict the output of a gate as along with its complement, as shown in Figure 3.8. Note that alwas represents the actual output. 3.4 DIGITAL COMPONENTS Upon opening a computer and looking inside, one would realize that there is a lot to know about all of the digital components that make up the sstem. Ever computer is built using collections of gates that are all connected b wa of wires acting as signal gatewas. These collections of gates are often quite standard, resulting in a set of building blocks that can be used to build the entire computer sstem. Surprisingl, these building blocks are all constructed using the basic AND, OR, and NOT operations. In the net few sections, we discuss digital circuits, their relationship to Boolean algebra, the standard building blocks, and eamples of the two different categories, combinational logic and sequential logic, into which these building blocks can be placed Digital Circuits and Their Relationship to Boolean Algebra What is the connection between Boolean functions and digital circuits? We have seen that a simple Boolean operation (such as AND or OR) can be represented b a simple logic gate. More comple Boolean epressions can be represented as combinations of AND, OR, and NOT gates, resulting in a logic diagram that describes the entire epression. This logic diagram represents the phsical implementation of the given epression, or the actual digital circuit. Consider the function F(,,z) = + z (which we looked at earlier). Figure 3.9 represents a logic diagram that implements this function. We can build logic diagrams (which in turn lead to digital circuits) for an Boolean epression. +z z z FIGURE 3.9 A Logic Diagram for F(,,z) = + z
14 Null3 /7/3 4:35 PM Page 6 6 Chapter 3 / Boolean Algebra and Digital Logic Boolean algebra allows us to analze and design digital circuits. Because of the relationship between Boolean algebra and logic diagrams, we simplif our circuit b simplifing our Boolean epression. Digital circuits are implemented with gates, but gates and logic diagrams are not the most convenient forms for representing digital circuits during the design phase. Boolean epressions are much better to use during this phase because the are easier to manipulate and simplif. The compleit of the epression representing a Boolean function has a direct impact on the compleit of the resulting digital circuit; the more comple the epression, the more comple the resulting circuit. We should point out that we do not tpicall simplif our circuits using Boolean identities; we have alread seen that this can sometimes be quite difficult and time consuming. Instead, designers use a more automated method to do this. This method involves the use of Karnaugh maps (or Kmaps). The interested reader is referred to the focus section following this chapter to learn how Kmaps help to simplif digital circuits Integrated Circuits Computers are composed of various digital components, connected b wires. Like a good program, the actual hardware of a computer uses collections of gates to create larger modules, which, in turn, are used to implement various functions. The number of gates required to create these building blocks depends on the technolog being used. Because the circuit technolog is beond the scope of this tet, the reader is referred to the reading list at the end of this chapter for more information on circuit technolog. Tpicall, gates are not sold individuall; the are sold in units called integrated circuits (ICs). A chip (a small silicon semiconductor crstal) is a small electronic device consisting of the necessar electronic components (transistors, resistors, and capacitors) to implement various gates. As described in Chapter, components are etched directl on the chip, allowing them to be smaller and to require less power for operation than their discrete component counterparts. This chip is then mounted in a ceramic or plastic container with eternal pins. The necessar connections are welded from the chip to the eternal pins to form an IC. The first ICs contained ver few transistors. As we learned in Chapter, the first ICs were called SSI chips and contained up to electronic components per chip. We now have ULSI (ultra largescale integration) with more than million electronic components per chip. Figure 3. illustrates a simple SSI IC. 3.5 COMBINATIONAL CIRCUITS Digital logic chips are combined to give us useful circuits. These logic circuits can be categorized as either combinational logic or sequential logic. This section introduces combinational logic. Sequential logic is covered in Section 3.6.
15 Null3 /7/3 4:35 PM Page / Combinational Circuits 7 +5 volts DC Notch Ground FIGURE 3. A Simple SSI Integrated Circuit 3.5. Basic Concepts Combinational logic is used to build circuits that contain basic Boolean operators, inputs, and outputs. The ke concept in recognizing a combinational circuit is that an output is alwas based entirel on the given inputs. Thus, the output of a combinational circuit is a function of its inputs, and the output is uniquel determined b the values of the inputs at an given moment. A given combinational circuit ma have several outputs. If so, each output represents a different Boolean function Eamples of Tpical Combinational Circuits Let s begin with a ver simple combinational circuit called a halfadder. Consider the problem of adding two binar digits together. There are onl three things to remember: + =, + = + =, and + =. We know the behavior this circuit ehibits, and we can formalize this behavior using a truth table. We need to specif two outputs, not just one, because we have a sum and a carr to address. The truth table for a halfadder is shown in Table 3.. A closer look reveals that Sum is actuall an XOR. The Carr output is equivalent to that of an AND gate. We can combine an XOR gate and an AND gate, resulting in the logic diagram for a halfadder shown in Figure 3.. The halfadder is a ver simple circuit and not reall ver useful because it can onl add two bits together. However, we can etend this adder to a circuit that allows the addition of larger binar numbers. Consider how ou add base numbers: You add up the rightmost column, note the units digit, and carr the tens digit. Then ou add that carr to the current column, and continue in a similar fashion. We can add binar numbers in the same wa. However, we need a
16 Null3 /7/3 4:35 PM Page 8 8 Chapter 3 / Boolean Algebra and Digital Logic Inputs Outputs Sum Carr TABLE 3. The Truth Table for a HalfAdder Sum Carr FIGURE 3. The Logic Diagram for a HalfAdder circuit that allows three inputs (,, and Carr In), and two outputs (Sum and Carr Out). Figure 3.2 illustrates the truth table and corresponding logic diagram for a fulladder. Note that this fulladder is composed of two halfadders and an OR gate. Given this fulladder, ou ma be wondering how this circuit can add binar numbers, since it is capable of adding onl three bits. The answer is, it can t. However, we can build an adder capable of adding two 6bit words, for eample, b replicating the above circuit 6 times, feeding the Carr Out of one circuit into the Carr In of the circuit immediatel to its left. Figure 3.3 illustrates this idea. This tpe of circuit is called a ripplecarr adder because of the sequential generation of carries that ripple through the adder stages. Note that instead of drawing all the gates that constitute a fulladder, we use a black bo approach to depict our adder. A black bo approach allows us to ignore the details of the actual gates. We concern ourselves onl with the inputs and outputs of the circuit. This is tpicall done with most circuits, including decoders, multipleers, and adders, as we shall see ver soon. Because this adder is ver slow, it is not normall implemented. However, it is eas to understand and should give ou some idea of how addition of larger binar numbers can be achieved. Modifications made to adder designs have resulted in the carrlookahead adder, the carrselect adder, and the carrsave adder, as well as others. Each attempts to shorten the dela required to add two binar numbers.
17 Null3 /7/3 4:35 PM Page / Combinational Circuits 9 Carr In Inputs Carr In Sum Outputs Carr Out Sum Carr Out (a) FIGURE 3.2 a) A Truth Table for a FullAdder b) A Logic Diagram for a FullAdder (b) Y 5 X 5 Y X Y X Carr Out FA C 5 C 2 FA C FA C FIGURE 3.3 The Logic Diagram for a RippleCarr Adder In fact, these newer adders achieve speeds 4% to 9% faster than the ripplecarr adder b performing additions in parallel and reducing the maimum carr path. Adders are ver important circuits a computer would not be ver useful if it could not add numbers. An equall important operation that all computers use frequentl is decoding binar information from a set of n inputs to a maimum of 2 n outputs. A decoder uses the inputs and their respective values to select one specific output line. What do we mean b select an output line? It simpl means that one unique output line is asserted, or set to, while the other output lines are set to zero. Decoders are normall defined b the number of inputs and the number of outputs. For eample, a decoder that has 3 inputs and 8 outputs is called a 3to8 decoder. We mentioned that this decoder is something the computer uses frequentl. At this point, ou can probabl name man arithmetic operations the computer must be able to perform, but ou might find it difficult to propose an eample of decoding. If so, it is because ou are not familiar with how a computer accesses memor. All memor addresses in a computer are specified as binar numbers. When a memor address is referenced (whether for reading or for writing), the computer
18 Null3 /7/3 4:35 PM Page Chapter 3 / Boolean Algebra and Digital Logic first has to determine the actual address. This is done using a decoder. The following eample should clarif an questions ou ma have about how a decoder works and what it might be used for. EXAMPLE 3.6 A 3to8 decoder circuit Imagine memor consisting of 8 chips, each containing 8K btes. Let s assume chip contains memor addresses 89, chip contains memor addresses 892 6,383, and so on. We have a total of 8K 8, or 64K (65,536) addresses available. We will not write down all 64K addresses as binar numbers; however, writing a few addresses in binar form (as we illustrate in the following paragraphs) will illustrate wh a decoder is necessar. Given 64 = 2 6 and K = 2, then 64K = = 2 6, which indicates we need 6 bits to represent each address. If ou have trouble understanding this, start with a smaller number of addresses. For eample, if ou have 4 addresses addresses,, 2, and 3, the binar equivalent of these addresses is,,, and, requiring two bits. We know 2 2 = 4. Now consider eight addresses. We have to be able to count from to 7 in binar. How man bits does that require? The answer is 3. You can either write them all down, or ou recognize that 8 = 2 3. The eponent tells us the minimum number of bits necessar to represent the addresses. All addresses on chip have the format:. Because chip contains the addresses 89, the binar representation of these addresses is in the range to. Similarl, all addresses on chip have the format, and so on for the remaining chips. The leftmost 3 bits determine on which chip the address is actuall located. We need 6 bits to represent the entire address, but on each chip, we onl have 2 3 addresses. Therefore, we need onl 3 bits to uniquel identif an address on a given chip. The rightmost 3 bits give us this information. When a computer is given an address, it must first determine which chip to use; then it must find the actual address on that specific chip. In our eample, the computer would use the 3 leftmost bits to pick the chip and then find the address on the chip using the remaining 3 bits. These 3 highorder bits are actuall used as the inputs to a decoder so the computer can determine which chip to activate for reading or writing. If the first 3 bits are, chip should be activated. If the first 3 bits are, chip 7 should be activated. Which chip would be activated if the first 3 bits were? It would be chip 2. Turning on a specific wire activates a chip. The output of the decoder is used to activate one, and onl one, chip as the addresses are decoded. Figure 3.4 illustrates the phsical components in a decoder and the smbol often used to represent a decoder. We will see how a decoder is used in memor in Section 3.6. Another common combinational circuit is a multipleer. This circuit selects binar information from one of man input lines and directs it to a single output line. Selection of a particular input line is controlled b a set of selection vari
19 Null3 /7/3 4:35 PM Page 3.5 / Combinational Circuits n Inputs... Decoder... 2 n Outputs (a) (b) FIGURE 3.4 a) A Look Inside a Decoder b) A Decoder Smbol ables, or control lines. At an given time, onl one input (the one selected) is routed through the circuit to the output line. All other inputs are cut off. If the values on the control lines change, the input actuall routed through changes as well. Figure 3.5 illustrates the phsical components in a multipleer and the smbol often used to represent a multipleer. Can ou think of some situations that require multipleers? Timesharing computers multiple the input from user terminals. Modem pools multiple the modem lines entering the computer. Another useful set of combinational circuits to stud includes a parit generator and a parit checker (recall we studied parit in Chapter 2). A parit generator is a circuit that creates the necessar parit bit to add to a word; a parit S S I 3 S S I 3 S S I 2 S S I l l l 2 Multipleer One input is rolled to output l 3 I 2 S S I I I S S Control lines (a) FIGURE 3.5 a) A Look Inside a Multipleer b) A Multipleer Smbol (b)
20 Null3 /7/3 4:35 PM Page 2 2 Chapter 3 / Boolean Algebra and Digital Logic checker checks to make sure proper parit (odd or even) is present in the word, detecting an error if the parit bit is incorrect. Tpicall parit generators and parit checkers are constructed using XOR functions. Assuming we are using odd parit, the truth table for a parit generator for a 3bit word is given in Table 3.. The truth table for a parit checker to be used on a 4bit word with 3 information bits and parit bit is given in Table 3.2. The parit checker outputs a if an error is detected and otherwise. We leave it as an eercise to draw the corresponding logic diagrams for both the parit generator and the parit checker. There are far too man combinational circuits for us to be able to cover them all in this brief chapter. Comparators, shifters, programmable logic devices these are all valuable circuits and actuall quite eas to understand. The interested reader is referred to the references at the end of this chapter for more information on combinational circuits. However, before we finish the topic of combinational logic, there is one more combinational circuit we need to introduce. We have covered all of the components necessar to build an arithmetic logic unit (ALU). Figure 3.6 illustrates a ver simple ALU with four basic operations AND, OR, NOT, and addition carried out on two machine words of 2 bits each. The control lines, f and f, determine which operation is to be performed b the z P Error Detected? z Parit Bit TABLE 3. Parit Generator TABLE 3.2 Parit Checker
21 Null3 /7/3 4:35 PM Page / Sequential Circuits 3 Input B B A A f f Decoder Carr Overflow Half Adder Full Adder Output C C FIGURE 3.6 A Simple TwoBit ALU CPU. The signal is used for addition (A + B); for NOT A; for A OR B, and for A AND B. The input lines A and A indicate 2 bits of one word, while B and B indicate the second word. C and C represent the output lines. 3.6 SEUENTIAL CIRCUITS In the previous section we studied combinational logic. We have approached our stud of Boolean functions b eamining the variables, the values for those variables, and the function outputs that depend solel on the values of the inputs to the functions. If we change an input value, this has a direct and immediate impact on the value of the output. The major weakness of combinational circuits is that there is no concept of storage the are memorless. This presents us with a bit of a dilemma. We know that computers must have a wa to remember values. Consider a much simpler digital circuit needed for a soda machine. When ou put
22 Null3 /7/3 4:35 PM Page 4 4 Chapter 3 / Boolean Algebra and Digital Logic mone into a soda machine, the machine remembers how much ou have put in at an given instant. Without this abilit to remember, it would be ver difficult to use. A soda machine cannot be built using onl combinational circuits. To understand how a soda machine works, and ultimatel how a computer works, we must stud sequential logic Basic Concepts A sequential circuit defines its output as a function of both its current inputs and its previous inputs. Therefore, the output depends on past inputs. To remember previous inputs, sequential circuits must have some sort of storage element. We tpicall refer to this storage element as a flipflop. The state of this flipflop is a function of the previous inputs to the circuit. Therefore, pending output depends on both the current inputs and the current state of the circuit. In the same wa that combinational circuits are generalizations of gates, sequential circuits are generalizations of flipflops Clocks Before we discuss sequential logic, we must first introduce a wa to order events. (The fact that a sequential circuit uses past inputs to determine present outputs indicates we must have event ordering.) Some sequential circuits are asnchronous, which means the become active the moment an input value changes. Snchronous sequential circuits use clocks to order events. A clock is a circuit that emits a series of pulses with a precise pulse width and a precise interval between consecutive pulses. This interval is called the clock ccle time. Clock speed is generall measured in megahertz (MHz), or millions of pulses per second. Common ccle times are from one to several hundred MHz. A clock is used b a sequential circuit to decide when to update the state of the circuit (when do present inputs become past inputs?). This means that inputs to the circuit can onl affect the storage element at given, discrete instances of time. In this chapter we eamine snchronous sequential circuits because the are easier to understand than their asnchronous counterparts. From this point, when we refer to sequential circuit, we are impling snchronous sequential circuit. Most sequential circuits are edgetriggered (as opposed to being leveltriggered). This means the are allowed to change their states on either the rising or falling edge of the clock signal, as seen in Figure 3.7. Rising Edge Falling Edge High Low FIGURE 3.7 A Clock Signal Indicating Discrete Instances of Time
23 Null3 /7/3 4:35 PM Page / Sequential Circuits FlipFlops A leveltriggered circuit is allowed to change state whenever the clock signal is either high or low. Man people use the terms latch and flipflop interchangeabl. Technicall, a latch is level triggered, whereas a flipflop is edge triggered. In this book, we use the term flipflop. In order to remember a past state, sequential circuits rel on a concept called feedback. This simpl means the output of a circuit is fed back as an input to the same circuit. A ver simple feedback circuit uses two NOT gates, as shown in Figure 3.8. In this figure, if is, it will alwas be. If is, it will alwas be. This is not a ver interesting or useful circuit, but it allows ou to see how feedback works. A more useful feedback circuit is composed of two NOR gates resulting in the most basic memor unit called an SR flipflop. SR stands for set/reset. The logic diagram for the SR flipflop is given in Figure 3.9. We can describe an flipflop b using a characteristic table, which indicates what the net state should be based on the inputs and the current state,. The notation (t) represents the current state, and (t + ) indicates the net state, or the state the flipflop should enter after the clock has been pulsed. Figure 3.2 shows the actual implementation of the SR sequential circuit and its characteristic table. An SR flipflop ehibits interesting behavior. There are three inputs: S, R, and the current output (t). We create the truth table shown in Table 3.3 to illustrate how this circuit works. For eample, if S is and R is, and the current state, (t), is, then the net state, (t + ), is also. If S is and R is, and (t) is, then (t+) is. Actual inputs of (,) for (S,R) result in no change when the clock is pulsed. Following a similar argument, we can see that inputs (S,R) = (,) force the net state, (t + ), to regardless of the current state (thus forcing a reset on the circuit output). When (S,R) = (,), the circuit output is set to. FIGURE 3.8 Eample of Simple Feedback S R C FIGURE 3.9 An SR FlipFlop Logic Diagram
24 Null3 /7/3 4:35 PM Page 6 6 Chapter 3 / Boolean Algebra and Digital Logic S R S R (t +) (t) (no change) (reset to ) (set to ) undefined (a) FIGURE 3.2 a) The Actual SR FlipFlop b) The Characteristic Table for the SR FlipFlop (b) S R Present State (t) Net State (t +) undefined undefined TABLE 3.3 Truth Table for SR FlipFlop There is one oddit with this particular flipflop. What happens if both S and R are set to at the same time? This forces both and to, but how can = =? This results in an unstable circuit. Therefore, this combination of inputs is not allowed in an SR flipflop. We can add some conditioning logic to our SR flipflop to ensure that the illegal state never arises we simpl modif the SR flipflop as shown in Figure 3.2. This results in a JK flipflop. JK flipflops were named after the Teas Instruments engineer, Jack Kilb, who invented the integrated circuit in 958. Another variant of the SR flipflop is the D (data) flipflop. A D flipflop is a true representation of phsical computer memor. This sequential circuit stores one bit of information. If a is asserted on the input line D, and the clock is pulsed, the output line becomes a. If a is asserted on the input line and the clock is pulsed, the output becomes. Remember that output represents the current state of the circuit. Therefore, an output value of means the circuit is currentl storing a value of. Figure 3.22 illustrates the D flipflop, lists its characteristic table, and reveals that the D flipflop is actuall a modified SR flipflop.
25 Null3 /7/3 4:35 PM Page / Sequential Circuits 7 J K (t +) J K C (t ) (no change) (reset to ) (set to ) (t ) J K S C R (a) FIGURE 3.2 (b) a) A JK FlipFlop b) The JK Characteristic Table c) A JK FlipFlop as a Modified SR FlipFlop (c) D D (t +) D S C C R (a) (b) (c) FIGURE 3.22 a) A D FlipFlop b) The D Characteristic Table c) A D FlipFlop as a Modified SR FlipFlop Eamples of Sequential Circuits Latches and flipflops are used to implement more comple sequential circuits. Registers, counters, memories, and shift registers all require the use of storage, and are therefore implemented using sequential logic. Our first eample of a sequential circuit is a simple 4bit register implemented using four D flipflops. (To implement registers for larger words, we would simpl need to add flipflops.) There are four input lines, four output lines, and a clock signal line. The clock is ver important from a timing standpoint; the registers must all accept their new input values and change their storage elements at the same time. Remember that a snchronous sequential circuit cannot change state unless the clock pulses. The same clock signal is tied into all four D flipflops, so the change in unison. Figure 3.23 depicts the logic diagram for our 4 bit register, as well as a block diagram for the register. In realit, phsical components have additional lines for power and for ground, as well as a clear line (which gives the abilit to reset the entire register to all zeros). However, in this tet, we are willing to leave those concepts to the computer engineers and focus on the actual digital logic present in these circuits. Another useful sequential circuit is a binar counter, which goes through a predetermined sequence of states as the clock pulses. In a straight binar counter, these states reflect the binar number sequence. If we begin counting in binar:
26 Null3 /7/3 4:35 PM Page 8 8 Chapter 3 / Boolean Algebra and Digital Logic In D Out In D Out In 2 D Out 2 Clock In 3 D Out 3 In In In 2 In 3 Register Out Out Out 2 Out 3 (a) FIGURE 3.23 a) A 4Bit Register b) A Block Diagram for a 4Bit Register (b),,,,..., we can see that as the numbers increase, the loworder bit is complemented each time. Whenever it changes state from to, the bit to the left is then complemented. Each of the other bits changes state from to when all bits to the right are equal to. Because of this concept of complementing states, our binar counter is best implemented using a JK flipflop (recall that when J and K are both equal to, the flipflop complements the present state). Instead of independent inputs to each flipflop, there is a count enable line that runs to each flipflop. The circuit counts onl when the clock pulses and this count enable line is set to. If count enable is set to and the clock pulses, the circuit does not change state. You should eamine Figure 3.24 ver carefull, tracing the circuit with various inputs to make sure ou understand how this circuit outputs the binar numbers from to. You should also check to see which state the circuit enters if the current state is and the clock is pulsed. We have looked at a simple register and a binar counter. We are now read to eamine a ver simple memor circuit. The memor depicted in Figure 3.25 holds four 3bit words (this is tpicall denoted as a 4 3 memor). Each column in the circuit represents one 3bit word. Notice that the flipflops storing the bits for each word are snchronized via the clock signal, so a read or write operation alwas reads or writes a complete word. The inputs In,In, and In 2 are the lines used to store, or write, a 3bit word to memor. The lines S and S are the address lines used to select which word in
CHAPTER 3 Boolean Algebra and Digital Logic
CHAPTER 3 Boolean Algebra and Digital Logic 3.1 Introduction 121 3.2 Boolean Algebra 122 3.2.1 Boolean Expressions 123 3.2.2 Boolean Identities 124 3.2.3 Simplification of Boolean Expressions 126 3.2.4
More informationLogic Design 2013/9/5. Introduction. Logic circuits operate on digital signals
Introduction Logic Design Chapter 2: Introduction to Logic Circuits Logic circuits operate on digital signals Unlike continuous analog signals that have an infinite number of possible values, digital signals
More informationBoolean Algebra and Digital Circuits Part 3: Logic Gates and Combinatorial Circuits
Boolean Algebra and Digital Circuits Part 3: Logic Gates and Combinatorial Circuits Logic Gates a gate implements a simple boolean function such as AND, OR or NOT constructed using a few transistors basic
More information4 Combinational Components
Chapter 4 Combinational Components Page of 8 4 Combinational Components In constructing large digital circuits, instead of starting with the basic gates as building blocks, we often start with larger building
More informationChapter 4. Gates and Circuits. Chapter Goals. Chapter Goals. Computers and Electricity. Computers and Electricity. Gates
Chapter Goals Chapter 4 Gates and Circuits Identify the basic gates and describe the behavior of each Describe how gates are implemented using transistors Combine basic gates into circuits Describe the
More informationChapter 2: Boolean Algebra and Logic Gates. Boolean Algebra
The Universit Of Alabama in Huntsville Computer Science Chapter 2: Boolean Algebra and Logic Gates The Universit Of Alabama in Huntsville Computer Science Boolean Algebra The algebraic sstem usuall used
More informationDigital Logic Design. Basics Combinational Circuits Sequential Circuits. PuJen Cheng
Digital Logic Design Basics Combinational Circuits Sequential Circuits PuJen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction
More informationIntroduction to Logic Circuits
April 5, 999 4:05 g02ch2 Sheet number Page number 7 black chapter 2 Introduction to Logic Circuits 2. d2 d4, d7 d5 7 April 5, 999 4:05 g02ch2 Sheet number 2 Page number 8 black 8 CHAPTER 2 Introduction
More informationCS61c: Representations of Combinational Logic Circuits
CS61c: Representations of Combinational Logic Circuits J. Wawrzynek October 12, 2007 1 Introduction In the previous lecture we looked at the internal details of registers. We found that every register,
More information1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.
File: chap04, Chapter 04 1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1. 2. True or False? A gate is a device that accepts a single input signal and produces one
More informationThe equation for the 3input XOR gate is derived as follows
The equation for the 3input XOR gate is derived as follows The last four product terms in the above derivation are the four 1minterms in the 3input XOR truth table. For 3 or more inputs, the XOR gate
More informationDownloaded from www.heinemann.co.uk/ib. equations. 2.4 The reciprocal function x 1 x
Functions and equations Assessment statements. Concept of function f : f (); domain, range, image (value). Composite functions (f g); identit function. Inverse function f.. The graph of a function; its
More informationDigital Electronics Detailed Outline
Digital Electronics Detailed Outline Unit 1: Fundamentals of Analog and Digital Electronics (32 Total Days) Lesson 1.1: Foundations and the Board Game Counter (9 days) 1. Safety is an important concept
More information5.2 Inverse Functions
78 Further Topics in Functions. Inverse Functions Thinking of a function as a process like we did in Section., in this section we seek another function which might reverse that process. As in real life,
More informationModule3 SEQUENTIAL LOGIC CIRCUITS
Module3 SEQUENTIAL LOGIC CIRCUITS Till now we studied the logic circuits whose outputs at any instant of time depend only on the input signals present at that time are known as combinational circuits.
More information1.10 (a) Effects of logic gates AND, OR, NOT on binary signals in a processor
Chapter 1.10 Logic Gates 1.10 (a) Effects of logic gates AND, OR, NOT on binary signals in a processor Microprocessors are the central hardware that runs computers. There are several components that make
More informationFigure 2.1(a) Bistable element circuit.
3.1 Bistable Element Let us look at the inverter. If you provide the inverter input with a 1, the inverter will output a 0. If you do not provide the inverter with an input (that is neither a 0 nor a 1),
More informationSAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 5. Combinational & Sequential Circuits
SAMPLE OF THE STUD MATERIAL PART OF CHAPTER 5 5. Introduction Digital circuits can be classified into two types: Combinational digital circuits and Sequential digital circuits. 5.2 Combinational Digital
More informationIntroduction Number Systems and Conversion
UNIT 1 Introduction Number Systems and Conversion Objectives 1. Introduction The first part of this unit introduces the material to be studied later. In addition to getting an overview of the material
More informationSequential Circuits Sequential circuits combinational circuits clocked sequential circuits gate delay
Sequential Circuits Sequential circuits are those with memory, also called feedback. In this, they differ from combinational circuits, which have no memory. The stable output of a combinational circuit
More information4 BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION
4 BOOLEAN ALGEBRA AND LOGIC SIMPLIFICATION BOOLEAN OPERATIONS AND EXPRESSIONS Variable, complement, and literal are terms used in Boolean algebra. A variable is a symbol used to represent a logical quantity.
More informationGates, Circuits, and Boolean Algebra
Gates, Circuits, and Boolean Algebra Computers and Electricity A gate is a device that performs a basic operation on electrical signals Gates are combined into circuits to perform more complicated tasks
More informationThe Graph of a Linear Equation
4.1 The Graph of a Linear Equation 4.1 OBJECTIVES 1. Find three ordered pairs for an equation in two variables 2. Graph a line from three points 3. Graph a line b the intercept method 4. Graph a line that
More informationCSE 220: Systems Fundamentals I Unit 7: Logic Gates; Digital Logic Design: Boolean Equations and Algebra
CSE 220: Systems Fundamentals I Unit 7: Logic Gates; Digital Logic Design: Boolean Equations and Algebra Logic Gates Logic gatesare simple digital circuits that take one or more binary inputs and produce
More informationCOMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design
PH315 COMINATIONAL and SEUENTIAL LOGIC CIRCUITS Hardware implementation and software design A La Rosa I PURPOSE: To familiarize with combinational and sequential logic circuits Combinational circuits
More informationQ (x 1, y 1 ) m = y 1 y 0
. Linear Functions We now begin the stud of families of functions. Our first famil, linear functions, are old friends as we shall soon see. Recall from Geometr that two distinct points in the plane determine
More informationBasics of Digital Logic Design
CSE 675.2: Introduction to Computer Architecture Basics of Digital Logic Design Presentation D Study: B., B2, B.3 Slides by Gojko Babi From transistors to chips Chips from the bottom up: Basic building
More information1.6 Graphs of Functions
.6 Graphs of Functions 9.6 Graphs of Functions In Section. we defined a function as a special tpe of relation; one in which each coordinate was matched with onl one coordinate. We spent most of our time
More information2.4 Inequalities with Absolute Value and Quadratic Functions
08 Linear and Quadratic Functions. Inequalities with Absolute Value and Quadratic Functions In this section, not onl do we develop techniques for solving various classes of inequalities analticall, we
More informationFlipFlops, Registers, Counters, and a Simple Processor
June 8, 22 5:56 vra235_ch7 Sheet number Page number 349 black chapter 7 FlipFlops, Registers, Counters, and a Simple Processor 7. Ng f3, h7 h6 349 June 8, 22 5:56 vra235_ch7 Sheet number 2 Page number
More informationC3: Functions. Learning objectives
CHAPTER C3: Functions Learning objectives After studing this chapter ou should: be familiar with the terms oneone and manone mappings understand the terms domain and range for a mapping understand the
More informationCHAPTER TEN. 10.1 New Truth Table Symbols. 10.1.1 Edges/Transitions. Memory Cells
CHAPTER TEN Memory Cells The previous chapters presented the concepts and tools behind processing binary data. This is only half of the battle though. For example, a logic circuit uses inputs to calculate
More informationBasics of Digital Logic Design
Basics of Digital Logic Design Dr. Arjan Durresi Louisiana State University Baton Rouge, LA 70810 Durresi@Csc.LSU.Edu LSUEd These slides are available at: http://www.csc.lsu.edu/~durresi/csc3501_07/ Louisiana
More information1. Digital Logic Circuits
1 Digital Logic ircuits 1. Digital Logic ircuits Many scientific, industrial and commercial advances have been made possible by the advent of computers. Digital Logic ircuits form the basis of any digital
More informationDigital Logic: Boolean Algebra and Gates
Digital Logic: Boolean Algebra and Gates Textbook Chapter 3 CMPE2 Summer 28 Basic Logic Gates CMPE2 Summer 28 Slides by ADB 2 Truth Table The most basic representation of a logic function Lists the output
More informationSimplification of Rational Expressions and Functions
7.1 Simplification of Rational Epressions and Functions 7.1 OBJECTIVES 1. Simplif a rational epression 2. Identif a rational function 3. Simplif a rational function 4. Graph a rational function Our work
More informationA Little Perspective Combinational Logic Circuits
A Little Perspective Combinational Logic Circuits COMP 251 Computer Organization and Architecture Fall 2009 Motivating Example Recall our machine s architecture: A Simple ALU Consider an ALU that can perform
More informationTeaching Digital Circuit Design to MiddleSchool Students
Paper ID #650 Teaching Digital Circuit Design to MiddleSchool Students Dr. Christopher R. Carroll, Universit of Minnesota Duluth Dr. Carroll received his undergraduate education at Georgia Tech, and received
More informationChapter 5: Sequential Circuits (LATCHES)
Chapter 5: Sequential Circuits (LATCHES) Latches We focuses on sequential circuits, where we add memory to the hardware that we ve already seen Our schedule will be very similar to before: We first show
More informationGraphing Linear Equations
6.3 Graphing Linear Equations 6.3 OBJECTIVES 1. Graph a linear equation b plotting points 2. Graph a linear equation b the intercept method 3. Graph a linear equation b solving the equation for We are
More informationFORDHAM UNIVERSITY CISC 3593. Dept. of Computer and Info. Science Spring, 2011. The Binary Adder
FORDHAM UNIVERITY CIC 3593 Fordham College Lincoln Center Computer Organization Dept. of Computer and Info. cience pring, 2011 1 Introduction The Binar Adder The binar adder circuit is an important building
More information4.1 PiecewiseDefined Functions
Section 4.1 PiecewiseDefined Functions 335 4.1 PiecewiseDefined Functions In preparation for the definition of the absolute value function, it is etremel important to have a good grasp of the concept
More informationLESSON EIII.E EXPONENTS AND LOGARITHMS
LESSON EIII.E EXPONENTS AND LOGARITHMS LESSON EIII.E EXPONENTS AND LOGARITHMS OVERVIEW Here s what ou ll learn in this lesson: Eponential Functions a. Graphing eponential functions b. Applications of eponential
More informationZeros of Polynomial Functions. The Fundamental Theorem of Algebra. The Fundamental Theorem of Algebra. zero in the complex number system.
_.qd /7/ 9:6 AM Page 69 Section. Zeros of Polnomial Functions 69. Zeros of Polnomial Functions What ou should learn Use the Fundamental Theorem of Algebra to determine the number of zeros of polnomial
More informationDigital Logic Circuits
Digital Logic Circuits Digital describes any system based on discontinuous data or events. Typically digital is computer data or electronic sampling of an analog signal. Computers are digital machines
More informationCounters and Decoders
Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4bit ripplethrough decade counter with a decimal readout display. Such a counter
More informationELG3331: Lab 3 Digital Logic Circuits
ELG3331: Lab 3 Digital Logic Circuits What does Digital Means? Digital describes any system based on discontinuous data or events. Typically digital is computer data or electronic sampling of an analog
More informationChapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language
Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,
More informationLecture 8: Synchronous Digital Systems
Lecture 8: Synchronous Digital Systems The distinguishing feature of a synchronous digital system is that the circuit only changes in response to a system clock. For example, consider the edge triggered
More informationHaving read this workbook you should be able to: recognise the arrangement of NAND gates used to form an SR flipflop.
Objectives Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an SR flipflop. describe how such a flipflop can be SET and RESET. describe the disadvantage
More informationSequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )
Sequential Logic (Materials taken from: Principles of Computer Hardware by Alan Clements ) Sequential vs. Combinational Circuits Combinatorial circuits: their outputs are computed entirely from their present
More informationOutput depends on sequence of previous inputs Sequence of previous this is history History is a state that captures how you got here
Sequential Logic Output depends on sequence of previous inputs Sequence of previous this is history History is a state that captures how you got here " E.g., 35 cents vending = cents + cents + cents +
More informationEE 110 Practice Problems for Exam 2: Solutions, Fall 2008
EE 110 Practice Problems for Exam 2: Solutions, Fall 2008 1. Circle T (true) or F (false) for each of these Boolean equations. (a). T FO An 8to1 multiplexer requires 2 select lines. (An 8to1 multiplexer
More informationAnytime plan TalkMore plan
CONDENSED L E S S O N 6.1 Solving Sstems of Equations In this lesson ou will represent situations with sstems of equations use tables and graphs to solve sstems of linear equations A sstem of equations
More informationINVESTIGATIONS AND FUNCTIONS 1.1.1 1.1.4. Example 1
Chapter 1 INVESTIGATIONS AND FUNCTIONS 1.1.1 1.1.4 This opening section introduces the students to man of the big ideas of Algebra 2, as well as different was of thinking and various problem solving strategies.
More informationBinary Adders: Half Adders and Full Adders
Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order
More informationBOOLEAN ALGEBRA & LOGIC GATES
BOOLEAN ALGEBRA & LOGIC GATES Logic gates are electronic circuits that can be used to implement the most elementary logic expressions, also known as Boolean expressions. The logic gate is the most basic
More informationFORDHAM UNIVERSITY CISC 3593. Dept. of Computer and Info. Science Spring, 2011. Lab 2. The FullAdder
FORDHAM UNIVERSITY CISC 3593 Fordham College Lincoln Center Computer Organization Dept. of Computer and Info. Science Spring, 2011 Lab 2 The FullAdder 1 Introduction In this lab, the student will construct
More informationFigure 2.4(f): A T flip flop
If the T input is in 0 state (i.e., J = K = 0) prior to a clock pulse, the Q output will not change with the clock pulse. On the other hand, if the T input is in 1 state (i.e., J = K = 1) prior to a clock
More informationCS311 Lecture: Sequential Circuits
CS311 Lecture: Sequential Circuits Last revised 8/15/2007 Objectives: 1. To introduce asynchronous and synchronous flipflops (latches and pulsetriggered, plus asynchronous preset/clear) 2. To introduce
More informationPolynomial and Rational Functions
Chapter Section.1 Quadratic Functions Polnomial and Rational Functions Objective: In this lesson ou learned how to sketch and analze graphs of quadratic functions. Course Number Instructor Date Important
More informationl What have discussed up until now & why: l C Programming language l More lowlevel then Java. l Better idea about what s really going on.
CS211 Computer Architecture l Topics Digital Logic l Transistors (Design & Types) l Logic Gates l Combinational Circuits l KMaps Class Checkpoint l What have discussed up until now & why: l C Programming
More informationDigital Electronics Lab
LAB MANUAL Digital Electronics Lab (EE224F) Vikas Sharma (Lab Incharge) Dayal C. Sati (Faculty Incharge) DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING Page STUDENTS GUIDELINES There is Hr 4
More information(Or Gate) (And Gate) (Not Gate)
6 March 2015 Today we will be abstracting away the physical representation of logical gates so we can more easily represent more complex circuits. Specifically, we use the shapes themselves to represent
More informationMathematical goals. Starting points. Materials required. Time needed
Level A7 of challenge: C A7 Interpreting functions, graphs and tables tables Mathematical goals Starting points Materials required Time needed To enable learners to understand: the relationship between
More informationUNIT I NUMBER SYSTEM AND BINARY CODES
1 UNIT I NUMBER SYSTEM AND BINARY CODES 1.0 Aims and Objectives 1.1 Introduction 1.2 Number System 1.2.1 Decimal Number System 1.2.2 Bistable Devices 1.2.3 Binary Number System 1.2.4 Octal number System
More information#5. Show and the AND function can be constructed from two NAND gates.
Study Questions for Digital Logic, Processors and Caches G22.0201 Fall 2009 ANSWERS Digital Logic Read: Sections 3.1 3.3 in the textbook. Handwritten digital lecture notes on the course web page. Study
More informationExclusive OR/Exclusive NOR (XOR/XNOR)
Exclusive OR/Exclusive NOR (XOR/XNOR) XOR and XNOR are useful logic functions. Both have two or more inputs. The truth table for two inputs is shown at right. a XOR b = 1 if and only if (iff) a b. a XNOR
More informationLecture 10. Latches and FlipFlops
Logic Design Lecture. Latches and FlipFlops Prof. Hyung Chul Park & Seung Eun Lee Sequential Logic Outputs of sequential logic depend on current inputs and prior input values Sequential logic might explicitly
More informationComp 150 Booleans and Digital Logic
Comp 150 Booleans and Digital Logic Recall the bool date type in Python has the two literals True and False and the three operations: not, and, or. The operations are defined by truth tables (see page
More informationAffine Transformations
A P P E N D I X C Affine Transformations CONTENTS C The need for geometric transformations 335 C2 Affine transformations 336 C3 Matri representation of the linear transformations 338 C4 Homogeneous coordinates
More informationSECTION 25 Combining Functions
2 Combining Functions 16 91. Phsics. A stunt driver is planning to jump a motorccle from one ramp to another as illustrated in the figure. The ramps are 10 feet high, and the distance between the ramps
More information28. Minimize the following using Tabular method. f(a, b, c, d, e)= m(0,1,9,15,24,29,30) + d(8,11,31) 29. Minimize the following using Kmap method.
Unit1 1. Show Karnaugh map for equation Y = F(A,B,C) = S m(1, 2, 3, 6, 7) 2. Show Karnaugh map for equation Y = F(A,B,C,D) = S m(1, 2, 3, 6, 8, 9, 10, 12, 13, 14) 3. Give SOP form of Y = F(A,B,C,D) =
More informationCHAPTER 6 DESIGN OF SEQUENTIAL LOGIC CIRCUITS IN QCA
6 CHAPTER 6 DESIGN OF SEQUENTIAL LOGIC CIRCUITS IN QCA 6. INTRODUCTION The logic circuits whose outputs at any instant of time depend not only on the present inputs but also on the past outputs are known
More information1. Realization of gates using Universal gates
1. Realization of gates using Universal gates Aim: To realize all logic gates using NAND and NOR gates. Apparatus: S. No Description of Item Quantity 1. IC 7400 01 2. IC 7402 01 3. Digital Trainer Kit
More informationSystems of Linear Equations: Solving by Substitution
8.3 Sstems of Linear Equations: Solving b Substitution 8.3 OBJECTIVES 1. Solve sstems using the substitution method 2. Solve applications of sstems of equations In Sections 8.1 and 8.2, we looked at graphing
More information3.Basic Gate Combinations
3.Basic Gate Combinations 3.1 TTL NAND Gate In logic circuits transistors play the role of switches. For those in the TTL gate the conducting state (on) occurs when the baseemmiter signal is high, and
More informationSynchronous Sequential Logic
Chapter 5 Synchronous Sequential Logic 5 Outline! Sequential Circuits! Latches! FlipFlops! Analysis of Clocked Sequential Circuits! State Reduction and Assignment! Design Procedure 52 Sequential Circuits!
More informationSequential Circuits. Chapter 4 S. Dandamudi
Sequential Circuits Chapter 4 S. Dandamudi Outline Introduction Clock signal Propagation delay Latches SR latch Clocked SR latch D latch JK latch Flip flops D flip flop JK flip flop Example chips Example
More informationD.2. The Cartesian Plane. The Cartesian Plane The Distance and Midpoint Formulas Equations of Circles. D10 APPENDIX D Precalculus Review
D0 APPENDIX D Precalculus Review SECTION D. The Cartesian Plane The Cartesian Plane The Distance and Midpoint Formulas Equations of Circles The Cartesian Plane An ordered pair, of real numbers has as its
More information8.7 Systems of NonLinear Equations and Inequalities
8.7 Sstems of NonLinear Equations and Inequalities 67 8.7 Sstems of NonLinear Equations and Inequalities In this section, we stud sstems of nonlinear equations and inequalities. Unlike the sstems of
More informationCS 226: Digital Logic Design
CS 226: Digital Logic Design 0 1 1 I S 0 1 0 S Department of Computer Science and Engineering, Indian Institute of Technology Bombay. 1 of 44 Objectives In this lecture we will introduce: 1. Synchronous
More informationChapter 2 Digital Components. Section 2.1 Integrated Circuits
Chapter 2 Digital Components Section 2.1 Integrated Circuits An integrated circuit (IC) is a small silicon semiconductor crystal, called a chip, containing the electronic components for the digital gates
More informationIn Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the current
Module 12 In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the current inputs. The following topics will be on sequential
More informationZero and Negative Exponents and Scientific Notation. a a n a m n. Now, suppose that we allow m to equal n. We then have. a am m a 0 (1) a m
0. E a m p l e 666SECTION 0. OBJECTIVES. Define the zero eponent. Simplif epressions with negative eponents. Write a number in scientific notation. Solve an application of scientific notation We must have
More informationUnit 2: Number Systems, Codes and Logic Functions
Unit 2: Number Systems, Codes and Logic Functions Introduction A digital computer manipulates discrete elements of data and that these elements are represented in the binary forms. Operands used for calculations
More informationComputer Science. 19. Combinational Circuits. Computer Science. Building blocks Boolean algebra Digital circuits Adder circuit. Arithmetic/logic unit
PA R T I I : A L G O R I T H M S, M A C H I N E S, a n d T H E O R Y PA R T I I : A L G O R I T H M S, M A C H I N E S, a n d T H E O R Y Computer Science 9. Combinational Circuits Computer Science 9.
More informationKarnaugh Maps (K Maps) K Maps with 3 and 4 Variables
Karnaugh Maps (K Maps) Karnugh map is a graphical representation of a truth table The map contains one cell for each possible minterm adjacent cells differ in onl one literal, i.e., or Two variables, F
More informationECE Digital Logic Design. Laboratory Manual
ECE 1315 Digital Logic Design Laboratory Manual Guide to Assembling your Circuits Dr. Fernando RíosGutiérrez Dr. Rocio AlbaFlores Dr. Chris Carroll Department of Electrical and Computer Engineering University
More informationFunctions and Graphs CHAPTER INTRODUCTION. The function concept is one of the most important ideas in mathematics. The study
Functions and Graphs CHAPTER 2 INTRODUCTION The function concept is one of the most important ideas in mathematics. The stud 21 Functions 22 Elementar Functions: Graphs and Transformations 23 Quadratic
More information7. Latches and FlipFlops
Chapter 7 Latches and FlipFlops Page 1 of 18 7. Latches and FlipFlops Latches and flipflops are the basic elements for storing information. One latch or flipflop can store one bit of information. The
More informationLogic Revision. AQA ASLevel Computing COMP2. 98 minutes. 95 marks. Page 1 of 40
Logic Revision AQA ASLevel Computing COMP2 2014 98 minutes 95 marks Page 1 of 40 Q1. The figure below shows a logic circuit. (a) Complete the truth table below for the logic circuit shown in the above
More information2.0 Chapter Overview. 2.1 Boolean Algebra
Thi d t t d ith F M k 4 0 2 Boolean Algebra Chapter Two Logic circuits are the basis for modern digital computer systems. To appreciate how computer systems operate you will need to understand digital
More informationChapter 5 Latch and flipflop
257 Chapter 5 Latch and flipflop «from the ground up I2013b  Copyright Daniele Giacomini  appunti2@gmail.com http://a3.informaticalibera.net 5.1 Propagation delay..................................
More informationCounters. Nonsynchronous (asynchronous) counters A 2bit asynchronous binary counter High
Counters Learning objectives Understanding the operation and characteristics of asynchronous and synchronous counters Analyze counter circuits and counter timing diagrams Determine the sequence of a counter
More informationUpon completion of unit 1.1, students will be able to
Upon completion of unit 1.1, students will be able to 1. Demonstrate safety of the individual, class, and overall environment of the classroom/laboratory, and understand that electricity, even at the nominal
More informationLinear Inequality in Two Variables
90 (7) Chapter 7 Sstems of Linear Equations and Inequalities In this section 7.4 GRAPHING LINEAR INEQUALITIES IN TWO VARIABLES You studied linear equations and inequalities in one variable in Chapter.
More informationLogic in Computer Science: Logic Gates
Logic in Computer Science: Logic Gates Lila Kari The University of Western Ontario Logic in Computer Science: Logic Gates CS2209, Applied Logic for Computer Science 1 / 49 Logic and bit operations Computers
More informationSection 5: The Jacobian matrix and applications. S1: Motivation S2: Jacobian matrix + differentiability S3: The chain rule S4: Inverse functions
Section 5: The Jacobian matri and applications. S1: Motivation S2: Jacobian matri + differentiabilit S3: The chain rule S4: Inverse functions Images from Thomas calculus b Thomas, Wier, Hass & Giordano,
More informationLogic gate implementation and circuit minimization
Logic gate implementation and circuit minimization Lila Kari The University of Western Ontario Logic gate implementation and circuit minimization CS2209, Applied Logic for Computer Science 1 / 48 Why binary?
More information