Presentation is loading. Please wait.

Presentation is loading. Please wait.

EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 2: Boolean Logic.

Similar presentations


Presentation on theme: "EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 2: Boolean Logic."— Presentation transcript:

1 EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 2: Boolean Logic

2 Boolean Algebra 2  The basis for much of what we will do in this class is grounded in Boolean algebra, named for George Boole.  In the early chapters of the textbook we will study the Theorems and Laws of Boolean Algebra and techniques for implementing Boolean functions using electronic circuits.  In later chapters we will study how Boolean functions can be used to implement arithmetic and other useful functions.  Later still we will adapt these techniques to create components critical to modern computing such as memory elements and sequence logic.

3 Electrical Circuits (Over)simplified  For those of you who have had no experience with electrical circuits, the following is a vastly oversimplified primer.  The simple model of matter is that it is made up of atoms which have positively-charged nuclei orbited by negatively-charged electrons. Given sufficient energy, an electron can be dislodged from its atom.  Think of electricity as the flow of energy carried by the movement of electrons dislodged from atoms.  An electrical circuit is formed when there is a closed path around which the electrons flow. 3

4 Circuits Primer part 2  In electrical circuits, we are interested in the movement of energy from one location to another.  Some elements in a circuit provide energy. These are sources.  Some elements in a circuit expend energy. These are sinks.  The total energy sourced must equal the total energy expended.  We typically measure energy somewhat indirectly. Energy is measured in Joules (J). Power is energy per unit time. Power is measured in Watts (W). A Watt is one Joule per second.  1W = 1J/s  A 100W light bulb expends 100 Joules each second. 4

5 Circuits Primer part 3  We said a 100W light bulb expends 100 Joules each second.  We also said to think of electricity as the flow of energy carried by the movement of electrons dislodged from atoms.  To get energy to the light bulb, we make a circuit from the power producing plant to the light bulb.  In that circuit each moving electron is charged with energy at the source. When an electron passes through the sink (light) that energy is expended.  The amount of power that can be supplied depends on two factors:  The number of electrons that can move through the wires  The amount of energy carried with each electron 5

6 Circuits Primer part 4  The number of electrons flowing in a circuit is called current. Current is measured in Amperes (A). An Ampere is one Coulomb of electrons per second. A Coulomb is 6,241,507,648,655,549,400 (approx 6.24 x ) electrons.  The amount of energy per electron is called voltage. Voltage is measured in Volts (V). One Volt is one Joule per Coulomb.  So to determine power we take the product of the number of electrons flowing (current) and the energy per electron (voltage) and we should get a measure of power (wattage)  Voltage * Current = Power  In units V*A=W or (J/C)*(C/s) = (J/s) 6

7 Circuits Primer part 5  Most of the devices that we will be dealing with in this class will operate using relatively low power circuits.  However, this does not make them 100% safe. It also does not make it impossible to damage the equipment if used incorrectly.  Electricity flows very easily through most metals, including jewelry. It would be wise when you are dealing with any circuitry to remove any jewelry from your hands (rings, watches, etc. ) or long necklaces that could contact the circuitry.  Be careful how you wire the power supply to your circuits. If you reverse the polarity and try to drive current “backward” through the circuit, you are likely to cause damage.  Ask your lab monitor if you are not sure. 7

8 The Scope of Boolean Algebra 8  In common arithmetic, we are often concerned with the range of values that a variable may take. This is generally determined by the nature of the problem:  The integers 1-12 – the month of the year  A 7-digit decimal integer – local telephone number  A real number in the interval from 0 to 100 – a test grade  Imaginary numbers.  For Boolean algebra, every variable is constrained to one of two values: True or False  Any convenient two-valued pair can be used to represent the True/False pair: on/off, high/low, clockwise/counter-clockwise, closed/open, loud/soft, 1/0  We will commonly use the 1/0 notation with 1=True and 0=False

9 Switches 9  A very early electronic implementation of Boolean algebra recognized that the state of a switch (open or closed) could be used to represent a Boolean variable (True or False) and that switches could be wired in combination to represent complex Boolean algebra equations. Open SwitchClosed Switch

10 Electrically-controlled Switches 10  A simple mechanical switch (like a light switch on a wall) requires physical effort to manually open or close the contact.  An electrically-controlled switch is opened or closed based on the state of an input.  For a normally-open switch, when the input is inactive, the switch is open and when the input is active, the switch closes.  For a normally-closed switch, when the input is inactive, the switch is closed and when the input is active, the switch opens. Normally-openNormally-closed

11 Types of Switches 11  The earliest devices used for electrically-controlled switching for Boolean algebra purposes were relays.  A relay uses an input to generate an electromagnetic field that physically moves the switch contacts into position.  Because relays depend on physical movement of the contacts, they are too slow for modern digital computing purposes.  Modern systems use transistors to perform the function of switches without requiring mechanical movement.  While transistors are complex devices capable of much more than digital switching, when used for switching they may be modeled as very simple electrically-controlled switches.

12 Active-high Input Switching Devices 12  BJT – Bipolar Junction Transistor  MOSFET – Metal-Oxide Semiconductor Field Effect Transistor Normally-open Switch NPN BJT N-channel MOSFET input Conducting path NMOS: +V=On 0V=Off Lecture 2: Boolean Logic12/28

13 Active-low Input Switching Devices 13  BJT – Bipolar Junction Transistor  MOSFET – Metal-Oxide Semiconductor Field Effect Transistor Normally-closed Switch PNP BJT P-channel MOSFET input Conducting path PMOS: +V=Off 0V =On 13/28

14 Switch Logic 14  In the following circuit, the battery is connected to the lamp if switch A is closed and switch B is closed. If either switch is open, there is not a complete circuit.  This is the Boolean function AND Battery Lamp Switch ASwitch B

15 Switch Logic 15  In the following circuit, the battery is connected to the lamp if switch A is closed or switch B is closed. If either switch is closed, there is a complete circuit.  This is the Boolean function OR Battery Lamp Switch A Switch B

16 Switch Logic 16  In the following circuit, the battery is connected to the lamp and the output voltage is high if the input to the normally-closed switch is low.  Conversely, when the input is high, the lamp is disconnected and the output drops to 0.  Therefore, the output is the opposite of the input.  This is the Boolean function NOT Battery Lamp Input Output

17 Logic Gates 17  Special circuit symbols are used for the Boolean logic functions regardless of the type of switches used to implement the functions. ANDORNOT

18 Logic circuits 18  Logic circuits perform operations on digital signals  Implemented as electronic circuits where signal values are restricted to a few discrete values  In binary logic circuits there are only two values, 0 and 1  The general form of a logic circuit is a switching network  In the figure to the right, the inputs are labeled X n and the outputs are labeled Y n  Not shown in the figure are the required connections for providing power to the circuit. Switching Network X1X1 X2X2 X3X3 XmXm Y1Y1 Y2Y2 Y3Y3 YnYn discrete values

19 Boolean algebra 19  Direct application to switching networks  Work with 2-state devices  2-valued Boolean algebra (switching algebra)  Use a Boolean variable (X, Y, etc.) to represent an input or output of a switching network  Boolean variable may take on only two values (True, False)  We will use a notation of 0 for False and 1 for True  So the possibilities for a variable are: X=0, X=1  These symbols are not binary numbers, they simply represent the 2 states of a Boolean variable  They are not voltage levels, although they commonly refer to the low or high voltage input/output of some circuit element

20 Notation Conventions 20  Boolean AND  The raised dot “· ”  x· y  The intersection symbol “  ”  x  y  No symbol  xy  Boolean OR  Plus sign “+”  x + y  The union symbol “  ”  x  y  Boolean NOT  Single quotation “ ’ ” following  x’  Bar over letter   Exclamation point preceding  !x  Tilde preceding  ~x

21 Inversion of a function 21  If a function is defined as  f(x 1, x 2 )= x 1 + x 2  Then the complement of f is  f(x 1, x 2 )= x 1 + x 2 = (x 1 + x 2 )’  Similarly, if  f(x 1, x 2 )= x 1 · x 2  Then the complement of f is  f(x 1, x 2 )= x 1 · x 2 = (x 1 · x 2 )’

22 Truth tables 22  Tabular listing that fully describes a logic function  Output value for all input combinations (valuations) x1x1 x2x2 x 1 · x x1x1 x2x2 x 1 + x x1x1 x1’x1’ AND OR NOT

23 Truth tables 23  Truth table for AND and OR functions of three variables

24 Truth tables of functions 24  If L(x,y,z)=x+yz, then the truth table for L is: +

25 Logic gates and networks 25  A larger circuit is implemented by a network of gates  Called a logic network or logic circuit x 1 x 2 x 3 fx 1 x 2 +  x 3  =

26 Logic gates and networks 26  Draw the truth table and the logic circuit for the following function  F(a,b,c) = ac+bc’ a c b

27 Analysis of a logic network 27  To determine the functional behavior of a logic network, we can apply all possible input signals to it x 1 x  f 0001  1101  0011  0101  Network that implements fx 1 x 1 x 2  += A B

28 Analysis of a logic network 28  The function of a logic network can also be described by a timing diagram (gives dynamic behavior of the network) x 1 x 2 A B f Time Timing diagram


Download ppt "EE2420 – Digital Logic Summer II 2013 Hassan Salamy Ingram School of Engineering Texas State University Set 2: Boolean Logic."

Similar presentations


Ads by Google