egr 1301 digital logic

Views:
 
Category: Education
     
 

Presentation Description

Introduction to Digital Logic with narration.

Comments

Presentation Transcript

Computer EngineeringTopic 1: Digital (Binary) Logic : 

Computer EngineeringTopic 1: Digital (Binary) Logic EGR 1301 1 Copyright Baylor University 2009

Binary Numbers : 

Binary Numbers A digital (or binary) signal is made up of 1’s and 0’s These 1’s and 0’s represent numbers Copyright Baylor University 2009 2

The Analog of Digital : 

The Analog of Digital How do we represent a 1 or 0? Voltage Various conventions: TTL CMOS “Threshold” voltage Boe-Bot = 1.4 V Copyright Baylor University 2009 3 5 V CMOS logic levels The yellow region is “indeterminate,” meaning the behavior can’t be predicted

Analog vs. Digital : 

Analog vs. Digital Why use digital? Noise Copyright Baylor University 2009 4 The value that we read depends on where we “sample” this waveform The binary value that is represented is NOT affected by noise Still read as 1010 This is called the “noise margin.”

Digital Systems : 

Digital Systems Examples of digital systems Computers Microprocessors BASIC Stamp (Boe-Bot) Communications Cable TV, cell phones, GPS, etc, etc, etc Recent switches from analog to digital Broadcast TV (June 12, 2009) Cell phones (Feb 18, 2008) Copyright Baylor University 2009 5 http://www.howstuffworks.com/

Digital Systems : 

Digital Systems This could be you someday… Copyright Baylor University 2009 6 http://www.engadget.com/2009/01/26/digital-tv-transition-officially-delayed-until-june-12th/

Digital Logic : 

Digital Logic Definition: testing conditions by digital circuitry: the use of digital circuitry to determine if a condition is true or false; Microsoft Encarta World English Dictionary The basic mathematics that underpins digital logic is based on the work of George Boole a 19th century English mathematician. 7 Copyright Baylor University 2009

George Boole : 

George Boole George Boole (1815-1964) invented Boolean algebra. He was born in Lincoln, England, on November 2, 1815. He first introduced his theory on symbolic logic in a paper on calculus that was awarded the Royal Medal from the Royal Society of London in 1844 From: http://www.sjsu.edu/depts/Museum/boole.html Most important work published in 1854: An investigation into the Laws of Thought, on Which are founded the Mathematical Theories of Logic and Probabilities. 8 Copyright Baylor University 2009

Defn: Boolean Algebra : 

Defn: Boolean Algebra A Boolean algebra is an algebra in which the binary operations are chosen to model the union and intersection operations in Set Theory. For any set A, the subsets of A form a Boolean algebra under the operations of union (OR), intersection (AND) and complement (NOT). Boolean algebra’s mathematical assertions can be tested with the aid of a truth table. Copyright Baylor University 2009 9

AND Logic Function : 

AND Logic Function Symbol Truth Table Logic Symbol True ≡ 1 and False ≡ 0 10 Copyright Baylor University 2009

OR Logic Function : 

OR Logic Function Truth Table Logic Symbol 11 Copyright Baylor University 2009

NOT Logic Function : 

NOT Logic Function Truth Table Logic Symbol Sometimes written as !A or ~A 12 Copyright Baylor University 2009 or “Inverse” or “Complement”

Bubbles : 

Bubbles Shorthand for NOT Standard symbol: This: Becomes: Can do on any pin: Copyright Baylor University 2009 13

NOR Logic Function : 

NOR Logic Function Truth Table Logic Symbol 14 Copyright Baylor University 2009

NAND Logic Function : 

NAND Logic Function Truth Table Logic Symbol 15 Copyright Baylor University 2009

XOR Logic Function : 

XOR Logic Function XOR Exclusive OR Truth Table Logic Symbol 16 Copyright Baylor University 2009

EQU Logic Function : 

EQU Logic Function Truth Table Logic Symbol XNOR Equate 17 Copyright Baylor University 2009

Example in Hardware : 

Example in Hardware How do you actually build a circuit in hardware? Copyright Baylor University 2009 18 = Have to provide power (Vdd/Vss) Inputs Output

Boolean Identities : 

Boolean Identities Complement Laws: x + !x = 1 x · !x = 0 Law of the Double Complement: !(!x) = x Idempotent Laws: x + x = x x · x = x Identity Laws: x + 0 = x x · 1 = x Dominance Laws: x + 1 = 1 x · 0 = 0 Commutative Laws: x + y = y + x x · y = y · x Associative Laws: x + (y + z) = (x + y) + z x · (y · z) = (x · y) · z 19 Copyright Baylor University 2009

Boolean Identities : 

Boolean Identities Distributive Laws: x + (y · z) = (x + y) · (x + z) x · (y + z) = (x · y) + (x · z) DeMorgan's Laws: !(x · y) = !x + !y !(x + y) = !x · !y Absorption Laws: x · (x + y) = x x + (x · y) = x   Simplification Laws: x · (!x + y) = x · y x + (!x · y) = x + y (x · y) + (x · z) + (!y · z) = (x · y) + (!y · z) 20 Copyright Baylor University 2009

Algebraic Expressions : 

Algebraic Expressions Truth Table DeMorgan’s Theorem: converts OR gate into AND gate with inverted inputs and output. SAME AS Interpretation: only need AND and NOT gates to create OR. 21 Copyright Baylor University 2009

Algebraic Expressions : 

Algebraic Expressions Truth Table DeMorgan’s Theorem: Converts AND gate into OR gate with inverted inputs and output. SAME AS Interpretation: only need OR and NOT gates to create AND. 22 Copyright Baylor University 2009

Combinational Logic : 

Combinational Logic Output depends only on present inputs Used to perform mathematical and logical functions AND, OR, NOT, etc Addition, Subtraction Multiplexing, Decoding Copyright Baylor University 2009 23

Simple Example : 

Simple Example Write the Boolean expression and develop the truth table for the following digital logic circuit Copyright Baylor University 2009 24

Sum of Products : 

Sum of Products A “canonical form” Meaning the standard or most basic way to represent something Use AND, OR, and NOT Usually starts with truth table Copyright Baylor University 2009 25 Same table as previous slide. Write expressions for 1’s in the output using AND’s. a ● b = 1 Use an OR to get the final output

Sum of Products Ex. : 

Sum of Products Ex. Convert the following truth table to a Boolean expression and a circuit using the sum of products form Copyright Baylor University 2009 26

Full (One Bit) Adder : 

Full (One Bit) Adder “One bit” means each input (A & B) is one bit. “Full” means a “Carry Input” (Cin) is present. Truth Table Add S Cin A B Cout S = A●B●Cin + A●B●Cin + A●B●Cin + A●B●Cin Cout = ??? 27 Copyright Baylor University 2009

Simplification : 

Simplification Question: Is it possible to write a more compact equation for S and Cout? S = A XOR (B XOR Cin) = (A XOR B) XOR Cin Recall from previous slides: 28 Copyright Baylor University 2009 and Notice that this is also an XOR, so: Answer: Yes. Start by factoring:

Simplification : 

Simplification Question: Is it possible to write a more compact equation for S and Cout? 29 Copyright Baylor University 2009 Cout = A●B + (A XOR B)●Cin

Alternate Full Adder : 

Alternate Full Adder Copyright Baylor University 2009 30 Diagram from wikipedia.org Cout = A●B + (A XOR B)●Cin S = (A XOR B) XOR Cin

4-bit Ripple Adder : 

4-bit Ripple Adder Why would we build something like this? To add numbers, like in your calculator Copyright Baylor University 2009 31 Binary: Decimal:

Sequential Logic : 

Sequential Logic Output depends on present and past values of the input (and possibly the output as well) Means that sequential logic has “memory” or can “remember” what has happened before (may be very short term) Used to build memory or create delay Inside a CPU (registers & cache) RAM Copyright Baylor University 2009 32

NOR Gate Flip-Flops : 

NOR Gate Flip-Flops Copyright Baylor University 2009 33 Hint: Q = 1 if S=R=0; Q = 0 otherwise

SR Flip-Flop : 

SR Flip-Flop Copyright Baylor University 2009 34 Q(t+1) = S + ~R●Q(t) S = R = 1 (not allowed)

NAND Gate Flip-Flop : 

NAND Gate Flip-Flop Copyright Baylor University 2009 35

D Flip-Flop Register : 

D Flip-Flop Register Copyright Baylor University 2009 36 0 1 1 0 0 1 1 0 Characteristic Equation: Q(t+1) = D(t)

MPU Structure : 

MPU Structure 37 from: http://pirun.ku.ac.th/~b4805630 Combinational Logic Sequential Logic

Microprocessor : 

Microprocessor 38 from: en.wikipedia.org

Microprocessor Package : 

Microprocessor Package 39

RAM Memory : 

RAM Memory 40