Chapter 3 Objectives • Understand the relationship between Boolean logic and digital computer circuits. Chapter 3 • Learn how to design simple logic circuits. • Understand how digital circuits work together to Boolean Algebra and form complex computer systems. Digital Logic 2 3.1 Introduction 3.1 Introduction • In the latter part of the nineteenth century, George • In the middle of the twentieth century, computers Boole incensed philosophers and mathematicians were commonly known as � thinking machines � and alike when he suggested that logical thought could � electronic brains. � be represented through mathematical equations . – Many people were fearful of them. – How dare anyone suggest that human thought could be • Nowadays, we rarely ponder the relationship encapsulated and manipulated like an algebraic formula? between electronic digital computers and human logic. Computers are accepted as part of our lives. • Computers, as we know them today, are – Many people, however, are still fearful of them. implementations of Boole's Laws of Thought . • In this chapter, you will learn the simplicity that – John Atanasoff and Claude Shannon were among the first constitutes the essence of the machine. to see this connection. John von Neumann: “ Theory of Self-Reproducing Automata ” (1966) G. Boole: “ An Investigation of the Laws of Thought ” (1854) 3 4
3.2 Boolean Algebra 3.2 Boolean Algebra • Boolean algebra is a mathematical system for • A Boolean operator can be the manipulation of variables that can have completely described using a one of two values. truth table . – In formal logic, these values are � true � and � false. � • The truth table for the – In digital systems, these values are � on � and � off, � Boolean operators AND and 1 and 0, or � high � and � low � . OR are shown at the right • Boolean expressions are created by • The AND operator is also performing operations on Boolean variables. known as a Boolean product . – Common Boolean operators include AND, OR, and The OR operator is the NOT. Boolean sum . 5 6 3.2 Boolean Algebra 3.2 Boolean Algebra • The truth table for the • A Boolean function has: Boolean NOT operator is • At least one Boolean variable, shown at the right. • At least one Boolean operator, and • The NOT operation is most • At least one input from the set {0,1}. often designated by a prime mark (X´). It is sometimes • It produces an output that is also a member of indicated by an overbar (X) the set {0,1}. or an � elbow � (¬X). 7 8
3.2 Boolean Algebra 3.2 Boolean Algebra • The truth table for the • As with common Boolean function: arithmetic, Boolean operations have rules of is shown at the right. precedence. • To make evaluation of the • The NOT operator has Boolean function easier, highest priority, followed the truth table contains extra (shaded) columns to by AND and then OR. hold evaluations of • This is how we chose the subparts of the function. (shaded) function subparts in our table. 9 10 3.2 Boolean Algebra 3.2 Boolean Algebra • Digital computers contain circuits that implement • Most Boolean identities have an AND (product) Boolean functions. form as well as an OR (sum) form. We give our identities using both forms. Our first group is rather • The simpler that we can make a Boolean function, intuitive: the smaller the circuit that will result. – Simpler circuits are cheaper to build, consume less power, and run faster than complex circuits. • With this in mind, we always want to reduce our Boolean functions to their simplest form. • There are a number of Boolean identities that help us to do this. Idempotent : can be applied multiple times without changing the result 11 12
3.2 Boolean Algebra 3.2 Boolean Algebra • Our second group of Boolean identities should be • Our last group of Boolean identities are perhaps the familiar to you from your study of algebra: most useful. • If you have studied set theory or formal logic, these laws are also familiar to you. ' Commutative : the order can be changed without changing the result 13 14 3.2 Boolean Algebra 3.2 Boolean Algebra • We can use Boolean identities to simplify: F(x,y,z) = xy + x ′ z + yz • Sometimes it is more economical to build a circuit using the complement of a function (and complementing its result) than it is to implement the function directly. • DeMorgan’s law provides an easy way of finding the complement of a Boolean function. • Recall DeMorgan’s law states: (xy)’ = x’+ y’ and (x + y)’= x’y’ 15
3.2 Boolean Algebra 3.2 Boolean Algebra • DeMorgan's law can be extended to any number of • Through our exercises in simplifying Boolean variables. expressions, we see that there are numerous ways of stating the same Boolean expression . • Replace each variable by its complement and change all ANDs to ORs and all ORs to ANDs. – These � synonymous � forms are logically equivalent. • Thus, we find that the complement of: – Logically equivalent expressions have identical truth tables. • In order to eliminate as much confusion as is: possible, designers express Boolean functions in standardized (or canonical ) form. 17 18 3.2 Boolean Algebra 3.2 Boolean Algebra • There are two canonical forms for Boolean • It is easy to convert a function expressions: sum-of-products and product-of-sums. to sum-of-products form using its truth table. – Recall the Boolean product is the AND operation and the Boolean sum is the OR operation. • We are interested in the values • In the sum-of-products form, ANDed variables are of the variables that make the ORed together. function true (=1). – For example: • Using the truth table, we list the • In the product-of-sums form, ORed variables are values of the variables that ANDed together: result in a true function value. – For example: • Each group of variables is then ORed together. 19 20
3.2 Boolean Algebra 3.3 Logic Gates • The sum-of-products form • We have looked at Boolean functions in abstract for our function is: terms . • In this section, we see that Boolean functions are implemented in digital computer circuits called gates. • A gate is an electronic device that produces a result based on two or more input values. We note that this function is not - In reality, gates consist of one to six transistors, but in simplest terms. Our aim is digital designers think of them as a single unit. The only to rewrite our function in basic physical component of a computer is the canonical sum-of-products form. transistor; the basic logic component is the gate. ! - Integrated circuits conta in collections of gates suited to a particular purpose. 21 22 3.3 Logic Gates 3.3 Logic Gates • The three simplest gates are the AND, OR, and NOT • Another very useful gate is the exclusive OR gates. (XOR) gate. • The output of the XOR operation is true only when the values of the inputs differ. ⊕ Note the special symbol • They correspond directly to their respective Boolean for the XOR operation. operations, as you can see by their truth tables. 23 24
3.3 Logic Gates 3.3 Logic Gates • NAND and NOR are • NAND and known as universal NOR are two gates because any very important Boolean function gates. Their can be constructed symbols and using only NAND or truth tables are only NOR gates. shown at the • They are right. inexpensive to manufacture . 25 26 3.3 Logic Gates 3.4 Digital Components • Gates can have multiple inputs and more than • Typically, gates are not sold individually; they one output. are sold in units called integrated circuits . – A second output can be provided for the complement • Simple SSI integrated circuit with 4 NAND gates of the operation. – We'll see more of this later. SSI: Small scale integrated circuit 27 28
3.4 Digital Components 3.4 Digital Components • So we can wire the • The Boolean circuit: pre-packaged circuit to implement our function: F (x, y) = x'y • Can be rendered using only NAND gates as: 29 30 3.4 Digital Components 3.5 Combinational Circuits • The main thing to remember is that combinations • We have designed a circuit that implements the of gates implement Boolean functions. Boolean function: F( x, y, z ) = x + y'z • This circuit is an example of a combinational logic • The circuit below implements the Boolean circuit. The output is a strict combination of the function: F( x, y, z ) = x + y'z current inputs. • Combinational logic circuits produce a specified output (almost) at the instant when input values are applied. – In a later section, we will explore circuits where this is We simplify our Boolean expressions so not the case. that we can create simpler circuits. 31 32
3.5 Combinational Circuits 3.5 Combinational Circuits • Combinational logic circuits • As we see, the sum can be give us many useful devices. found using the XOR • One of the simplest is the operation and the carry half adder , which finds the using the AND operation. sum of two bits. • We can gain some insight into the construction of a half adder by looking at its truth table, shown at the right. 33 34 3.5 Combinational Circuits 3.5 Combinational Circuits • We can change our half • How can we change the adder into to a full-adder half adder shown below by including gates for to make it a full-adder? processing the carry bit. • The truth table for a full- adder is shown at the right. 35 36
Recommend
More recommend