Miscellanea Exam #1 Break Exam review 2.1 2.2 2.3 2.4 Break 3 4 Conclusion References CSC-205 Computer Organization Lecture #003 Chapter 2, Sections 2.1 through 4 Dr. Chuck Cartledge 10 June 2015 1/30
Table of contents I 2/30
Table of contents II 7 2.3 1 Miscellanea 2 Exam #1 3 Break 4 Exam review 5 2.1 6 2.2 8 2.4 9 Break 10 3 11 4 12 Conclusion 13 References 3/30
Corrections and additions since last lecture. Correct typos 4/30
Miscellanea Exam #1 Break Exam review 2.1 2.2 2.3 2.4 Break 3 4 Conclusion References You will have 2.0 hours. Be sure and put your name on the exam. Your work must be your own. When finished bring your exam up to the front. If you have a question, come up and ask. I will answer for the entire class. An example of a 3D cheat sheet. We ll have a quick review after the break. 5/30
Break time. Take about 10 minutes. 6/30
A quick review of the exam before we start today s lecture. Image from [3]. 7/30
Boolean logic Named for George Boole (original idea was published when he was 32 years old)[1] Created a branch of mathematics known as symbolic logic or Boolean algebra Each item in Boolean logic/algebra has only one of two states (TRUE or FALSE, 1 or 0) Only two values, so does not support gray answers. 8/30
The tools of the trade: Logical operators Simple in concept. Complex in operation. AND (&) only 1 when both are 1 OR ( ) 1 when either are 1 XOR (ˆ) 1 when only one is 1 NOT ( ) flips 1s to 0s, and 0s to 1s A 0 can be FALSE, and ˆFALSE can be TRUE. 9/30
The tools of the trade: Boolean Identities Boolean expressions can be simplified by the use of laws or identities. The simpler an expression is, the easier it is to understand and verify. Image from [4]. 10/30
The tools of the trade: A little explanation of most the Laws Identity any Boolean variable ANDed with 1 or ORed with 0 simply results in the original variable. Null any Boolean variable ANDed with 0 is 0, and a variable ORed with 1 is always 1. Idempotent that ANDing or ORing a variable with itself produces the original variable. Inverse that ANDing or ORing a variable with its complement produces the identity for that given operation. Commutative and Associative Boolean variables can be reordered (commuted) and regrouped (associated) without affecting the final result. Distributive Law shows how OR distributes over AND and vice versa. Double Complement can be useful 11/30
The tools of the trade: DeMorgan s Law is powerful (and confusing). Simple two step procedure: Negate the terms Change the operator The two sides are the same. This takes some practice to get right. 12/30
Truth Tables. Truth tables show up in all sorts of places. A table enumerates all possible input values and the resulting outputs. Each table has two basic parts: Each possible input combination (Boolean = n 2 possible combinations) Each input combination results in EXACTLY one output 13/30
Truth Tables. The output is a the ORing of the inputs. The output from the AND operation is: Output =xy The output form the OR operation is: Output =xy+xy+xy 14/30
Expressions can be complex. We can make them simpler. Algebra has rules and laws that make expressions simpler. So does Boolean algebra. Some algebraic function F takes two arguments x and y This function does some math (via magic): 10X +2y x+3y We call this F(x,y) We can simplify F(x,y) to: 9X +5y Some Boolean function F takes two arguments x and y We call this F(x,y) This function does a little Boolean logic: xy+xy We can simplify F(x,y) to: xy 15/30
Expressions can be complex. We can make them simpler. A more complex example. Image from [4]. 16/30
DeMorgan s Law A mechanical thing: Replace each variable with its complement x x Interchange ANDs and ORs. For example: x+yz x(y+z) Image from [5]. 17/30
DeMorgan s Law Working a Truth Table backwards (part 1 of 2). We want to design a black box with specific behavior. We will use a truth table to define the behavior. We want the Boolean expression as SOP and POS. A B C 0 0 1 0 1 0 1 0 0 1 1 1 Our sample function. 18/30
DeMorgan s Law Working a Truth Table backwards (part 2 of 2). Sum of Products (SOP) C =AB+AB Product of Sums (POS) C =(A+B)(A+B) C =AA+AB+AB+BB C =0+AB+AB+0 C =AB+AB C =AB+AB A B C 0 0 1 0 1 0 1 0 0 1 1 1 Our sample function. SOP == POS, the number of terms may be different. 19/30
DeMorgan s Law One example The compliment of the sum is equal to the product of the complements. F(x,y)=x+y Inputs F F Inputs x y x+y (x+y) x y xy 0 0 0 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1 0 0 0 0 F(x,y)=xy 20/30
DeMorgan s Law Another example The complement of the product is equal to the to sum of the complements. F(x,y)=(xy) Inputs Temp F Inputs x y xy (xy) x y x+y 0 0 0 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 1 1 1 1 1 0 0 0 0 F(x,y)=x+y 21/30
DeMorgan s Law Standard Boolean equation formats The forms: sum-of-products F(x,y,z)=xy+yz+xyz products-of-sums F(x,y,z)= (x+y)(x+z)(y+z)(y+z) Invert (complement) the equation, reduce it to sum-of-products, then invert it again. The result will be the original equation, but in product-of-sums form. 22/30
DeMorgan s Law So where is all this stuff leading us? Current digital computers are designed based on Boolean logic. Boolean logic can be translated/implemented in electronic circuity. The fewer electronic circuits there are, the cheaper it is manufacture, operate, and test. We will be looking at implementing Boolean logic in circuity. These ideas are fundamental to computer organization. 23/30
Break time. Take about 10 minutes. 24/30
Logic Gates We can use hardware to act like Boolean equations. Each of the Boolean term that we ve encountered (AND, OR, XOR, and NOT) has a corresponding symbol Before we used math symbols, now we ll use electronic symbols. We call these pieces of circuitry gates. 25/30
Logic Gates Gate inputs and outputs. Most of the time we ll be talking about 2 input and 1 output gates. Boolean logic only allows for 2 states, so there might be at most 2 outputs. When more than two inputs are needed, then the same type of gate can precede the last gate. Image from [4]. 26/30
Bringing it together An example of digital and Boolean logic We can string hardware together to function like Boolean expressions. Hardware designers are always concerned about parts count, power, form factors. 27/30
Bringing it together Integrated circuits Integrated circuits to the rescue....the number of transistors doubles about every 18 months. Gordon Moore [2] As density increases, power dissipation (cooling) becomes more and more of a problem. 28/30
What have we covered? Exam and review of chapter 1 Sections 2.1 through 2.4 Homework 2 on Chapter 2 Chapter 2 sections 5 through 7 29/30
References I [1] George Boole, The Mathematical Analysis of Logic, Philosophical Library, 1847. [2] Gordon E. Moore, Cramming more components onto integrated circuits, Electronics 38 (1965), no. 8. [3] Randall Munroe, 3x9, https://xkcd.com/759/. [4] Linda Null and Julia Lobur, The Essentials of Computer Organization and Architecture, Jones & Bartlett Publishers, 2010. [5] Wikipedia Staff, Augustus de morgan, http://en.wikipedia.org/wiki/augustus De Morgan. 30/30