Download presentation
Presentation is loading. Please wait.
1
10/19/2004EE 42 fall 2004 lecture 211 Lecture #21 Intro to Digital Electronics This week: Circuits for digital devices
2
10/19/2004EE 42 fall 2004 lecture 212 Topics Today: Digital electronics Boolean logic And, Or, and Not gates
3
10/19/2004EE 42 fall 2004 lecture 213 Analysis Analysis is the systematic study of real and complex-valued continuous functions. Important subfields of analysis include calculus, differential equations, and functional analysis. Derivatives, integrals, and infinite series are examples of the tools of analysis.
4
10/19/2004EE 42 fall 2004 lecture 214 Arithmetic Arithmetic is a branch of mathematics which studies the properties of the natural numbers (the integers) 1, 2, 3, … and operations on those numbers such as addition, subtraction, multiplication and division. From Geometry problems, it was realized by the ancients that there was a relationship between the natural numbers and continuous measures like distances. Of course, there are always quantities which don’t come out to an even multiple, so they invented the concept of a fraction.
5
10/19/2004EE 42 fall 2004 lecture 215 It came as quite a surprise when it turned out that some measurements could not be expressed exactly as a fraction (ratio of two integers) So much so that they are still called “irrational” numbers!
6
10/19/2004EE 42 fall 2004 lecture 216 Discrete vs continuous For thousands of years, mathematics has been split between: –Arithmetic, the study of the discrete –Analysis, the study of the continuous. Until the 1930’s analysis was considered the pinnacle of mathematics. Computer Science and digital circuits are a triumph of discrete mathematics Most of Electrical engineering is analysis!
7
10/19/2004EE 42 fall 2004 lecture 217 How close is good enough? A Fraction can be constructed to be arbitrarily close to any real number, but can not perfectly represent all numbers. Decimals are just an extension of the fraction concept, as are floating point numbers. A continuous quantity can not be expressed exactly with these, but it can be represented with any desired degree of accuracy.
8
10/19/2004EE 42 fall 2004 lecture 218 The advantage of discrete techniques The great advantage of discrete techniques such as the integers, fractions, etc, are that quantities can be transmitted and stored without degradation. If you convey “This far” to your neighbor, it is not possible for him to transmit the information exactly to his neighbor, but “4/5” can be recorded and accurately transmitted for three thousand years! (4/5ths was what was left after the Pharaoh took his share)
9
10/19/2004EE 42 fall 2004 lecture 219 George Boole 1815-1864 A schoolteacher and son of a cobbler, George Boole was a largely self-taught mathematician. He came up with a way to treat logic (which was regarded as a part of philosophy) with the tools of mathematic expressions. His 1848 paper is on the web site, in case you are interested. His work was not at all well known for the next 90 years, when Claude Shannon applied it to electronic circuits.
10
10/19/2004EE 42 fall 2004 lecture 2110 Claude Shannon Claude Shannon was a student working on a mechanical calculating machine at MIT. He considered ways of improving it, perhaps by using electrical circuits instead of mechanical parts. It occurred to Shannon that the discrete mathematics of Boolean algebra he had learned as an undergraduate could be implemented in hardware, in electronic circuits. Shannon's 1937 thesis was a key piece in the development of digital electronics and modern computers.
11
10/19/2004EE 42 fall 2004 lecture 2111 Digital representations We have been looking mostly at circuits which do what we want by making them as linear as possible, and transferring information as a voltage, or as a current. In a digital system, we do pretty much the opposite, using highly nonlinear responses (like the comparator) to force a signal to be one of a few discrete values (often just 2: high or low, true or false, 0 or 1)
12
10/19/2004EE 42 fall 2004 lecture 2112 Integers All operations on integers can be reduced to operations on multiple variables each of which takes on only one of two values, 0 and 1, and the operations and, or and not. For example, a specific integer can be represented by its binary equivalent 5=101 2 Implemented as electronic circuits, this would correspond to three wires, and each having a high or low voltage These three wires could represent integers 0 to 7
13
10/19/2004EE 42 fall 2004 lecture 2113 Digital Signal Representations Example: Possible digital representation for a pure sine wave of known frequency. We must choose maximum value and “resolution” or “error,” then we can encode the numbers. Suppose we want 1 V accuracy of amplitude with maximum amplitude of 50 V, We could use a simple pure binary code with 6 bits of information. ( Why 6 bits…. What if we only use 5?) By using binary numbers we can represent any quantity. For example a binary two (10) could represent a 2 Volt signal. But we generally have to agree on some sort of “code” and the dynamic range of the signal in order to know the form and the minimum number of bits. Example: We want to encode to an accuracy of one part in 64 (i.e. 1.5% precision). Answer: with 5 binary digits we can represent only 32 values It takes 6 binary digits (or “bits”) to represent any number 0 to 63.
14
10/19/2004EE 42 fall 2004 lecture 2114 So Why Digital? (For example, why CDROM audio vs vinyl recordings?) Digital signals can be transmitted, received, amplified, and re- transmitted with no degradation. Binary numbers are a natural method of expressing logical variables. Complex logical functions are easily expressed as binary functions (e.g., in control applications … see next page). Digital signals are easy to manipulate (as we shall see). With digital representation, we can achieve arbitrary levels of “dynamic range,” that is, the ratio of the largest possible signal to the smallest than can be distinguished above the background noise Digital information is easily and inexpensively stored (in RAM, ROM, EPROM, etc.), again with arbitrary accuracy.
15
10/19/2004EE 42 fall 2004 lecture 2115 Logic Functions Logic Statement: H = 1 if A and B and C are 1 or T is 1. We use “dot” to designate logical “and” and “+” to designate logical or in switching algebra. So how can we express this as a Boolean Expression? Logic Expression : To create logic values we will define “True”, as Boolean 1 and “False”, as Boolean 0. Boolean Expression:H = (A · B · C) + T Example: The logic variable H is true (H=1) if (A and B and C are 1) or T is true (logic 1), where all of A,B,C and T are also logical variables. Moreover we can associate a logic variable with a circuit node. Typically we associate logic 1 with a high voltage (e.g. 2V) and and logic 0 with a low voltage (e.g. 0V). Note that there is an order of operation, just as in math, and AND is performed before OR. Thus the parenthesis are not actually required here.
16
10/19/2004EE 42 fall 2004 lecture 2116 Logical Expressions Example: Z = A Examples: X = A · B ; Y = A · B · C Examples: W = A+B ; Z = A+B+C Standard logic notation : AND:“dot” OR :“+ sign” NOT:“bar over symbol for complement” With these basic operations we can construct any logical expression. Order of operation: NOT, AND, OR (note that negation of an expression is performed after the expression is evaluated, so there is an implied parenthesis, e.g. means.
17
10/19/2004EE 42 fall 2004 lecture 2117 Logic Function Example Boolean Expression:H = (A · B · C) + T This can be read H=1 if (A and B and C are 1) or T is 1, or H is true if all of A,B,and C are true, or T is true, or The voltage at node H will be high if the input voltages at nodes A, B and C are high or the input voltage at node T is high
18
10/19/2004EE 42 fall 2004 lecture 2118 Logic Function Example 2 Boolean Expression:B = A + S(D + T ) This can be read B=1 if A = 1 or S=1 AND (D OR T =1), i.e. B=1 if {A = 1} or {S=1 AND (D OR T =1)} or B is true IF {A is true} OR {S is true AND D OR T is true} or The voltage at node H will be high if {the input voltage at node A is high} OR {the input voltage at S is high and the voltages at D and T are high} You wish to express under which conditions your burglar alarm goes off (B=1): If the “Alarm Test” button is pressed (A=1) OR if the Alarm is Set (S=1) AND { the door is opened (D=1) OR the trunk is opened (T=1)}
19
10/19/2004EE 42 fall 2004 lecture 2119 Evaluation of Logical Expressions with “Truth Tables” Truth Table for Logic Expression 0 0 0 1 1 1 1 1 H = (A · B · C) + T
20
10/19/2004EE 42 fall 2004 lecture 2120 Evaluation of Logical Expressions with “Truth Tables” The Truth Table completely describes a logic expression In fact, we will use the Truth Table as the fundamental meaning of a logic expression. Two logic expressions are equal if their truth tables are the same
21
10/19/2004EE 42 fall 2004 lecture 2121 The Important Logical Functions The most frequent (i.e. important) logical functions are implemented as electronic “building blocks” or “gates”. We already know about AND, OR and NOT What are some others: Combination of above: inverted AND = NAND, inverted OR = NOR And one other basic function is often used: the “EXCLUSIVE OR” … which logically is “or except not and”
22
10/19/2004EE 42 fall 2004 lecture 2122 And & Or Since boolean variables can only take on one of two values, there are 16 possible two input operators (truth tables) Inputs A B NORNOR XORXOR NANDNAND ANDAND OROR 0 0101010101010101 0 10011001100110011 1 00000111100001111 1 0000000011111111 Boole showed that all possible truth tables can be created with just the operators AND, OR, and NOT (NOR is also sufficient by itself)
23
10/19/2004EE 42 fall 2004 lecture 2123 Some Important Logical Functions “AND” “OR” “INVERT” or “NOT” “not AND” = NAND “not OR” = NOR exclusive OR = XOR (or ) AnotA
24
10/19/2004EE 42 fall 2004 lecture 2124 These are circuits that accomplish a given logic function such as “OR”. We will shortly see how such circuits are constructed. Each of the basic logic gates has a unique symbol, and there are several additional logic gates that are regarded as important enough to have their own symbol. The set is: AND, OR, NOT, NAND, NOR, and EXCLUSIVE OR. Logic Gates A B C=A·B AND C = A B NAND C = NOR A B NOT A OR A B C=A+B EXCLUSIVE OR A B
25
10/19/2004EE 42 fall 2004 lecture 2125 With a combination of logic gates we can construct any logic function. In these two examples we will find the truth table for the circuit. Logic Circuits B A C It is helpful to list the intermediate logic values (at the input to the OR gate). Let’s call them X and Y. X Y Now we complete the truth tables for X and Y, and from that for C. (Note that X and Y and finally C = X + Y) ABXYC 00000 01011 10101 11000 Interestingly, this is the same truth table as the EXCLUSIVE OR
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.