Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hardware Logic Diagrams - The Basics - Marshall Thomas CIS 21JA – Fall Quarter 2012.

Similar presentations


Presentation on theme: "Hardware Logic Diagrams - The Basics - Marshall Thomas CIS 21JA – Fall Quarter 2012."— Presentation transcript:

1 Hardware Logic Diagrams - The Basics - Marshall Thomas CIS 21JA – Fall Quarter 2012

2 Objectives Explain some hardware concepts at a high level – appropriate for ASM SW Engineers. Show the graphical pictures that the hardware folks use to describe logic diagrams. Show how De Morgan’s theorem can be represented graphically. Explain the equations and “what is going on” in Lab 5

3 Terminology “High” => High voltage or “true” or “1” “Low” => Low voltage or “false” or “0”. These mean the same: => high, true, logical “1” => low, false, logical “0”. A means: A is true when it is low, sometimes written *A (over_scores are hard to type), not the same meaning as !A AdressBit0 means that AddressBit0 is true when this voltage is “false”, not the same in as !AddressBit0.

4 Voltage Levels There is uncertainty between what is “sent” and what is “received”. This uncertainty can and does happen! This is a problem for hardware folks.

5 Inversion at every gate This is “how the hardware works” This is the fastest way If there is an inverted and a non-inverted output, the inverted output is faster Easiest example is an “open collector” output R Input output +5V

6 Basic Gates / Symbols AND OR INVERTER NAND NOR  

7 NAND / “OR” Duality NAND Gate : If it takes two “highs” to get “low”. Doesn’t that mean that any low on any input input gives a high on the output? So, another way to draw the exact same hardware part is:

8 NOR / “AND” Duality NOR Gate: If any high gives a low, then doesn’t it take all low’s to give a high? Another way to draw the exact same physical part:

9 De Morgan’s Theorem A or B  A and B A and B  A or B Swap the bubbles and the symbols  

10 XOR Many students freak out about XOR, but is it not that complicated! If the 2 inputs are the same: you get ”false”, 0, or “even” If the 2 inputs are different: you get “true”, 1 or “odd”. It is as simple as that – think “odd” or “even” This simple thing can be used for numeric addition, calculating parity (the number of even or odd bits that are turned on in an variable), and even polynomial division!

11 Half Adder XOR Version Gate Version (same) A B Sum Carry ABsumCarry 0000 1101 1010 0110 Even Odd A B Sum Carry Sum = (A+B) and AB Sum is “1” if A or B is true, unless: A and B are both true, Then sum=0 with carry

12 Full Adder Incorporates the Carry in This combines 2 half-adders with an “or ” A B C in Sum Cout = (A and B) or ( (A xor B) and Cin)) Cout= ab + bc + ac Cout Note: all Nand gates Sum=1 if A,B,C Are odd

13 Cout= ab + bc + ac The cascading XOR’s can do the sum: Sum is “1” if combination of (A,B,C) is odd, else sum is “0” 1+1 = 0 (sum is even) with carry 1+1+1= 1 (sum is odd) with carry The tricky part is the carry. We are adding 3 bits together, if any 2 of these bits are “1”, we get a carry. If all 3 are “1”, we still get a carry although the sum is different.

14 Full Adder Truth Table ABCinSum2 bit sum Cout 000 0000 011 0101 101 0 1 110 0 1 001 1010 010 1 0 100 1 0 111 1111 Even => Sum =0 Odd => Sum =1 Cout if any 2 inputs are “1”


Download ppt "Hardware Logic Diagrams - The Basics - Marshall Thomas CIS 21JA – Fall Quarter 2012."

Similar presentations


Ads by Google