EE 313 – Logic Circuits And Switching Theory Lecture 01 PDF
Document Details
Uploaded by Deleted User
Tags
Summary
This lecture covers the introduction to digital systems, including a comparison between digital and analog systems, number systems conversions, and basic logic gates. It also explores the fundamentals of Boolean algebra and theorems.
Full Transcript
EE 313 – LOGIC CIRCUITS AND SWITCHING THEORY LEC 01 – INTRODUCTION TO DIGITAL SYSTEMS Digital vs. Analog Systems Number Systems and Conversions Introduction to Logic Gates B...
EE 313 – LOGIC CIRCUITS AND SWITCHING THEORY LEC 01 – INTRODUCTION TO DIGITAL SYSTEMS Digital vs. Analog Systems Number Systems and Conversions Introduction to Logic Gates Boolean Algebra Theorems and Functions Canonical and Standard Forms Representation of Boolean Functions using Logic Circuits Simplification Techniques using Karnaugh Maps and Quine-McCluskey EE313 - Lecture 01 1 1.1 Digital vs. Analog Systems EE313 - Lecture 01 2 Analog v. Digital Signals ▪ Signals are functions that convey information about certain attributes of some phenomenon. ▪ Analog Signals. is a smoothly and continuously varying voltage or current. A sine wave is a single-frequency analog signal. Voice and video voltages are analog signals that vary in accordance with the sound or light variations that are analogous to the information being transmitted. EE313 - Lecture 01 3 Analog v. Digital Signals ▪ Signals are functions that convey information about certain attributes of some phenomenon. ▪ Digital Signals. Digital signals do not vary continuously but vary in steps or in discrete increments. Most digital signals use binary or two-state codes, such as morse code, CW code, or serial binary code. EE313 - Lecture 01 4 Analog v. Digital Systems ▪ Analog systems process analog signals. Processing involves amplification, filtering, modulation, and other operations performed in the continuous time domain. ▪ Advantages: High resolution ▪ Disadvantages: Noise sensitivity ▪ Audio amplifiers, radio and TV broadcasting, temperature sensors ▪ Digital systems process digital signals, sampling, quantization, encoding, filtering, and error correction performed in the discrete time domain. ▪ Advantages: Noise immunity, data compression and encryption ▪ Disadvantages: Quantization error, complexity ▪ Computers and microcontrollers, DSP systems, PLCs EE313 - Lecture 01 5 Basics of Digital Concepts ▪ 2 states ▪ Logic 1, TRUE, HIGH ▪ Logic 0, FALSE, LOW ▪ Positive Logic – lower voltage represents low, and higher voltage represents high ▪ Negative Logic – lower voltage represents high, and higher voltage represents low EE313 - Lecture 01 6 1.2 Number Systems and Conversions EE313 - Lecture 01 7 Number Systems ▪ Numbers systems are a systematic way to represent and manipulate numbers ▪ Decimal Number System ▪ Roman Number System ▪ Binary Number System ▪ …weighted vs. non-weighted number systems EE313 - Lecture 01 8 Number Systems 𝑝−1 𝐷 = σ𝑖=−𝑛 𝑎𝑖 𝑏 𝑖 = 𝑎𝑝−1 𝑏 𝑝−1 + 𝑎𝑝−2 𝑏 𝑝−2 + ⋯ + c0 r 0 ECE 313 - Fundamentals of Electronic Communications 9 Decimal Number System ▪ Every digit position has a weight which is a power of 10. EE313 - Lecture 01 10 Binary Number System ▪ Every digit position has a weight which is a power of 2. EE313 - Lecture 01 11 Conversion for Binary-Decimal ▪ Binary to Decimal conversion: 𝑝−1 ▪ 𝐷 = σ𝑖=−𝑛 𝑎𝑖.2𝑖 ▪ Decimal to Binary conversion: ▪ In binary form, the integer part is obtained by successively dividing the integral part of the decimal number by 2 and listing the remainders from right to left. The fractional part is converted into binary form by successively multiplying by 2 and listing the integral part from left to right. EE313 - Lecture 01 12 Octal Number System ▪ Octal numbers (same as hexadecimal numbers) are used to abbreviate long binary numbers. ▪ Base 8. EE313 - Lecture 01 13 Conversion for Octal-Decimal ▪ Octal to Decimal conversion: 𝑝−1 ▪ 𝐷 = σ𝑖=−𝑛 𝑎𝑖.8𝑖 ▪ Decimal to Octal conversion: ▪ In binary form, the integer part is obtained by successively dividing the integral part of the decimal number by 8 and listing the remainders from right to left. The fractional part is converted into binary form by successively multiplying by 8 and listing the integral part from left to right. EE313 - Lecture 01 14 Conversion for Octal-Binary ▪ Octal to Binary conversion: ▪ Translate every octal digit into its 3-bit binary equivalent. ▪ Binary to Octal conversion: ▪ For the integer part: scan the binary number from right to left, and translate each group of three bits into the corresponding octal digit. ▪ For the fractional part: scan the binary number from left to right, and translate each group of three bits into the corresponding octal digit. EE313 - Lecture 01 15 Hexadecimal Number System ▪ A compact way to represent binary numbers using groups of four binary digits to represent each hexadecimal digit. EE313 - Lecture 01 16 Signed and Unsigned Binary Numbers ▪ Binary numbers are important in implementing digital circuits. ▪ A transistor acts like a switch: either conducting (ON) or non-conducting (OFF). ▪ A switch can represent two states. (open or closed switch, low or high voltage, absence or presence of flow of current) EE313 - Lecture 01 17 Unsigned Integer Representation ▪ An n-bit binary number can have 2𝑛 distinct combinations. ▪ Minimum: 0, Maximum: 2𝑛−1 Number of Bits (n) Range of Numbers 8 0 𝑡𝑜 28 − 1 (255) 16 0 𝑡𝑜 216 − 1 (65,535) 32 0 𝑡𝑜 232 − 1 (4,294,967,295) 64 0 𝑡𝑜 264 − 1 EE313 - Lecture 01 18 Unsigned Integer Representation ▪ Sign-magnitude representation for an n-bit number ▪ The most significant bit indicates the sign (0: positive, 1: negative) ▪ The remaining (n-1) bits represent the magnitude of the number ▪ Range of numbers: − 2𝑛−1 − 1 𝑡𝑜 + (2𝑛−1 − 1) EE313 - Lecture 01 19 Unsigned Integer Representation ▪ Ones Complement Representation ▪ Positive numbers are represented exactly as in sign-magnitude form ▪ Negative numbers are represented in 1’s complement form ▪ Range of numbers: − 2𝑛−1 − 1 𝑡𝑜 + (2𝑛−1 − 1) ▪ Advantages: subtraction can be done using addition, less circuitry required ▪ Disadvantages: two different representations of zero (0000, 1111) Range of numbers: − 2𝑛−1 − 1 𝑡𝑜 + (2𝑛−1 − 1) EE313 - Lecture 01 20 Unsigned Integer Representation ▪ Twos Complement Representation ▪ Positive numbers are represented exactly as in sign-magnitude form ▪ Negative numbers are represented in 2’s complement form ▪ Range of numbers: −2𝑛−1 𝑡𝑜 + (2𝑛−1 − 1) ▪ Advantages: unique representation of zero ▪ Features: ▪ Shift left by k positions (with zero padding) multiplies the number by 2^k ▪ Shift right by k positions (with zero padding) divides the number by 2^k EE313 - Lecture 01 21 Binary Arithmetic ▪ The binary number system is widely used in digital systems Input Bits a+b a-b a.b a b sum carry difference borrow product 0 0 0 0 0 0 0 0 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 1 EE313 - Lecture 01 22 Binary Addition ▪ Binary addition is performed similar to that of decimal addition. ▪ Corresponding bits are added; if a carry 1 is produced, it is added to the binary digits at the left. EE 311 – Lecture 01 - LCST 23 Binary Subtraction ▪ Binary addition is performed similar to that of decimal subtraction. ▪ Borrow bits are generated. EE 311 – Lecture 01 - LCST 24 Binary Subtraction ▪ 1’s complement may be used to subtract using addition. ▪ Instead of computing for A-B, we add A + B1. ▪ 1’s and 2’s complement are used to represent negative numbers EE 311 – Lecture 01 - LCST 25 What are other conventions in representing #s? ▪ Binary Coded Decimal (BCD) Number Representation ▪ Numbers are represented in decimal digits. Each decimal digit has its 4-bit binary equivalent. ▪ Gray Code ▪ Gray code is a type of non-weighted binary code where successive code words differ in only one bit. EE 311 – Lecture 01 - LCST 26 Error Detection and Correction ▪ Extra bits are added to the data bits that we want to represent, to get codewords. ▪ Codewords are divided into two categories: valid codewords and invalid codewords. ▪ A bit error changes a valid codeword to an invalid codeword. ▪ Definition: – The distance between two codewords Ci and Cj , denoted by dist(Ci , Cj ), denotes the number of bit positions in which the codewords differ. ▪ Example: distance between codewords 01001 and 11100 is 3. EE 311 – Lecture 01 - LCST 27 Logic Gates EE 311 – LCST – Lecture 01 28 Introduction to Logic Gates ▪ Digital circuits are built using basic building blocks called logic gates: ▪ NOT, AND, OR, NAND, NOR, XOR, etc. ▪ Our ICs contain a large number of these gates ▪ Small Scale Integration ▪ Medium Scale Integration ▪ Large Scale Integration ▪ Very Large Scale Integration EE 311 – LCST – Lecture 01 29 Die Sizes of the Apple M1 and M2 Chips Picture taken from Apple (2023). EE 311 – Lecture 01 - LCST 30 Moore’s Law EE 311 – Lecture 01 - LCST 31 Technology Trends ▪ Bell’s Law of Computer Classes ▪ Moore’s Law ▪ Dennard Scaling EE321MICRO - Lec01 32 Bell’s Law of Computer Classes EE321MICRO - Lec01 33 Bell’s Law of Computer Classes ▪ Introduced by Gordon Bell in 1972, this describes how different computer classes/types form, evolve, and eventually die out. ▪ A new computer class is based on lower cost components with fewer transistors, less bits on magnetic surfaces, etc. A new class forms about every decade; it also takes a decade to understand how a class is formed. Once formed, a lower priced class may evolve in performance and this may take over, thereby allowing the disruption of the existing class. ▪ Roughly every decade a new, lower priced computer class forms based on a new programming platform, network, and interface resulting in new usage and the establishment of a new industry. EE321MICRO - Lec01 34 Moore’s Law EE321MICRO - Lec01 35 Moore’s Law ▪ Moore’s Law is the observation that the number of transistors in an IC doubles every two years; this is both an observation and a projection of a historical trend seen in production and manufacturing of ICs. ▪ The law is named after Gordon Moore, co-founder of Intel. In 1965, he posited that the number of components in an integrated circuit will double every year. This projected growth will continue for another decade; but in in 1975, he revised the forecast to doubling every two years. EE321MICRO - Lec01 36 Dennard Scaling ▪ Also known as MOSFET scaling, it states that as transistors get smaller, their power density stays constant, so power use stays in proportion with area. ▪ Increased device density means there is lower cost per function. Smaller interconnects and areas also mean there is improved circuit operating speed. EE321MICRO - Lec01 37 Binary Logic ▪ Binary logic uses only two states, 0 (off) and 1 (on), which align with the physical nature of electronic components like transistors. ▪ Binary signals are less susceptible to noise and signal degradation. Even if there is some interference, the system can still accurately interpret the signal as either high (1) or low (0), ensuring consistent performance. ▪ Binary logic scales efficiently as circuits become more complex. It allows for easy replication and extension of circuits without significantly increasing design complexity, supporting the exponential growth of computing power as described by Moore's Law. EE 311 – Lecture 01 - LCST 38 Basic Logic Gates: NOT Gate ▪ A single input A, and an output A’ ▪ A NOT gate is an inverter. A A’ 0 1 1 0 EE 311 – Lecture 01 - LCST 39 Basic Logic Gates: AND Gate ▪ For two inputs (say, A and B), the output will be 1 if both the inputs are at 1; will be 0 otherwise. A B A.B ▪ Denoted as A.B 0 0 0 0 1 0 1 0 0 1 1 1 EE 311 – Lecture 01 - LCST 40 Basic Logic Gates: OR Gate ▪ For two inputs (say, A and B), the output will be 1 if at least one of the inputs is 1. A B A+B ▪ Denoted as A+B 0 0 0 0 1 1 1 0 1 1 1 1 EE 311 – Lecture 01 - LCST 41 Basic Logic Gates: NAND Gate ▪ For two inputs (say, A and B), the output will be 1 if at least one of the inputs are at 0; will be 0 A B (A.B)’ otherwise ▪ Denoted as (A.B)’ 0 0 1 0 1 1 1 0 1 1 1 0 EE 311 – Lecture 01 - LCST 42 Basic Logic Gates: NOR Gate ▪ For two inputs (say, A and B), the output will be 1 if both the inputs are at 0; will be 1 otherwise. A B (A+B) ▪ Denoted as (A.B)’ 0 0 1 0 1 0 1 0 0 1 1 0 EE 311 – Lecture 01 - LCST 43 Basic Logic Gates: XOR Gate ▪ For two inputs (say, A and B), the output will be 1 if odd number of inputs are at 1; will be 0 otherwise A B A⊕B ▪ Denoted as A⊕B 0 0 0 0 1 1 1 0 1 1 1 0 EE 311 – Lecture 01 - LCST 44 Basic Logic Gates: XNOR Gate ▪ For two inputs (say, A and B), the output will be 1 if even number of inputs are at 1; will be 0 otherwise A B (A⊕B)’ ▪ Denoted as (A⊕B)’ 0 0 1 0 1 0 1 0 0 1 1 1 EE 311 – Lecture 01 - LCST 45 EE 311 – Lecture 01 - LCST 46 Construction of Logic Gates ▪ TTL Integrated Circuits. ▪ Transistor-transistor logic (TTL) was developed in the early 1960s for minicomputers and mainframe computers such as IBM 360. ▪ MOS Integrated Circuits. ▪ Nearly all modern IC chips used MOS ICs built from MOSFETS. The first commercial MOS IC was introduced by General Microelectronics in the 1960s. EE321MICRO - Lec01 47 EE 311 – Lecture 01 - LCST 48 Boolean Algebra Theorems and Functions EE 311 – LCST – Lecture 01 49 Boolean Algebra ▪ Boolean algebra is a branch of mathematics that deals with variables that have two possible values: true (1) or false (0). It provides a formal way to describe logical operations and relationships. ▪ The fundamental operations in Boolean algebra are AND (conjunction), OR (disjunction), and NOT (negation). ▪ Boolean algebra follows specific laws and properties, such as the Commutative, Associative, Distributive, Identity, and De Morgan's laws. ▪ Boolean algebra directly corresponds to binary logic, which is the basis of all digital computing. It is also used in simplifying logic circuits. EE 311 – LCST – Lecture 01 50 Basic Laws of Boolean Algebra ▪ OR Rules ▪ A+1=1 ▪ A+0=A ▪ A+A=A ▪ A + A’ = 1 ▪ AND Rules ▪ A.1=A ▪ A.0=0 ▪ A.A=A ▪ A. A’ = 0 ▪ NOT Rules ▪ 0’ =1 ▪ 1’ = 0 ▪ A’’ = A EE 311 – Lecture 01 - LCST 51 Basic Laws of Boolean Algebra ▪ Commutative Law – the order of a logical operation is immaterial. ▪X+Y=Y+X ▪X.Y=Y.X ▪ Associative Law – this law allows grouping of Boolean variables. ▪ (X + Y) + Z = Z + (Y + Z) ▪ (X. Y). Z = X. (Y. Z) ▪ Distributive Laws ▪ X. (Y + Z) = (X. Y) + (X. Z) ▪ X + (Y. Z) = (X + Y). (X + Z) = (X + Y). (X + Y + Z) ▪ X + (X’. Y) = X + Y EE 311 – Lecture 01 - LCST 52 De Morgan’s Laws ▪ (A+B)’ = A’ ⋅ B’ The complement of an OR operation is equal to the AND of the complements. ▪ (A⋅B)’ = A’ + B’ The complement of an AND operation is equal to the OR of the complements. EE 311 – Lecture 01 - LCST 53 Function Minimization ▪ Given a switching expression, we can simplify it by using the basic laws of boolean algebra. ▪ Reduce the number of terms. ▪ Reduce the number of literals. EE 311 – Lecture 01 - LCST 54 Simplification 1: F = A.B’ + A.B + B.C EE 311 – Lecture 01 - LCST 55 Simplification 2: F = A’.B.C + A.B’.C + A.B.C’ + ABC EE 311 – Lecture 01 - LCST 56 Minterm and Maxterm ▪ For a boolean function, a literal is defined as a variable in uncomplemented or complemented form. ▪ Example: x, x’, y, y’, etc. ▪ Consider an n-variable switching function f (x1 , x2 , …, xn ). ▪ A product term (that is, an AND operation) of all the n literals is called a minterm. ▪ A sum term (that is, an OR operation) of all the n literals is called a maxterm. ▪ Consider a 3-variable function f (A, B, C). ▪ Examples of minterm: A’.B’.C’, A.B’.C, A.B.C, etc. ▪ Examples of maxterm: (A + B’ + C’), (A’ + B’ + C’), (A + B + C), etc. EE 311 – Lecture 01 - LCST 57 Minterm and Maxterm ▪ A minterm assumes value 1 for exactly one combination of variables. ▪ A maxterm assumes the value 0 for exactly one combination of variables. ▪ For a given switching function, and for given values of the input variables, ▪ All the minterms that have the value 1 are called true minterms. ▪ All the minterms that have the value 0 are called false minterms. ▪ All the maxterms that have the value 1 are called true maxterms. ▪ All the maxterms that have the value 0 are called false maxterms. EE 311 – Lecture 01 - LCST 58