300 likes | 423 Vues
This lecture, presented by Adil Waheed, a lecturer at the University of Sargodha, explores the fundamental differences between digital and analog systems. It covers the representation of waveforms, the binary number system, digital logic gates, and Boolean algebra. The importance of digital systems in efficient processing, reliable transmission, and error correction is emphasized. Additionally, it addresses number systems such as decimal, binary, hexadecimal, and their conversions. Through logical evaluations and truth tables, this session provides a solid foundation in digital system design and analysis.
E N D
Information System Instructor: Adil Waheed Lecturer University of Sargodha Lahore E-mail:- adil_pu@yahoo.com
Digital Systems Digital vs. Analog Waveforms Digital: only assumes discrete values Analog: values vary over a broad range continuously
Analogue Quantities Continuous Quantity • Intensity of Light • Temperature • Velocity
Digital Values • Discrete set of values
Electronic Processing • Analogue Systems • Digital Systems • Representing quantities in Digital Systems
Digital Systems • Two Voltage Levels • Two States • On/Off • Black/White • Hot/Cold • Stationary/Moving
Binary Number System • Binary Numbers • Representing Multiple Values • Combination of 0v & 5v
Merits of Digital Systems • Efficient Processing & Data Storage • Efficient & Reliable Transmission • Detection and Correction of Errors • Precise & Accurate Reproduction • Easy Design and Implementation • Occupy minimum space
Logic Gates • Building Blocks • AND, OR and NOT Gates • NAND, NOR, XOR and XNOR Gates • Integrated Circuits (ICs)
c 3 2 1 0 c 9 8 1 1 1 1 V 7400 D N 4 5 6 1 2 3 G Logic Gate Symbol and ICs
1 1 x 0 x 1 0 y 1 0 F 1 0 F 0 time time NOT/OR/AND Logic Gate Timing Diagrams
Operator Precedence • Evaluate the following Boolean equations: a=1, b=1, c=0, d=1. • Q1. F = a * b + c. • Answer: * has precedence over +, so we evaluate the equation as F = (1 *1) + 0 = (1) + 0 = 1 + 0 = 1. • Q2. F = ab + c. • Answer: the problem is identical to the previous problem, using the shorthand notation for *. • Q3. F = ab’. • Answer: we first evaluate b’ because NOT has precedence over AND, resulting in F = 1 * (1’) = 1 * (0) = 1 * 0 = 0. • Q4. F = (ac)’. • Answer: we first evaluate what is inside the parentheses, then we NOT the result, yielding (1*0)’ = (0)’ = 0’ = 1. • Q5. F = (a + b’) * c + d’. • Answer: Inside left parentheses: (1 + (1’)) = (1 + (0)) = (1 + 0) = 1. Next, * has precedence over +, yielding (1 * 0) + 1’ = (0) + 1’. The NOT has precedence over the OR, giving (0) + (1’) = (0) + (0) = 0 + 0 = 0. a
Commutative a + b = b + a a * b = b * a Distributive a * (b + c) = a * b + a * c a + (b * c) = (a + b) * (a + c) (this one is tricky!) Associative (a + b) + c = a + (b + c) (a * b) * c = a * (b * c) Identity 0 + a = a + 0 = a 1 * a = a * 1 = a Complement a + a’ = 1 a * a’ = 0 To prove, just evaluate all possibilities Boolean Algebra Properties
a b c F 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 0 1 1 1 1 0 1 1 1 1 1 Truth Table Representation a b F a b c F a b c d F 0 0 0 0 0 0 0 0 0 • Define value of F for each possible combination of input values • 2-input function: 4 rows • 3-input function: 8 rows • 4-input function: 16 rows • n-input function: 2n rows • Q: Use truth table to define function F(a,b,c) that is 1 when abc is 5 or greater in binary 0 1 0 0 1 0 0 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 ( a ) 1 0 1 0 1 0 1 1 1 0 0 1 1 0 1 1 1 0 1 1 1 1 0 0 0 ( b ) 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 a 1 1 1 0 1 1 1 1 ( c )
Number Systems and Codes • Decimal Number System • Caveman Number System • Binary Number System • Hexadecimal Number System • Octal Number System
Decimal Number System • Ten unique numbers 0,1..9 • Combination of digits • Positional Number System • 275 = 2 x 102 + 7 x 101 + 5 x 100 • Base or Radix 10 • Weight 1, 10, 100, 1000 ….
Representing Fractions • Fractions can be represented in decimal number system in a manner = 3 x 102 + 8 x 101 + 2 x 100 + 9 x 10-1 + 1 x 10-2 = 300 + 80 + 2 + 0.9 + 0.01 = 382.91
Binary Number System • Two unique numbers 0 and 1 • Base – 2 • A binary digit is a bit • Combination of bits to represent larger values
Combination of Binary Bits • Combination of Bits • 100112 = 1910 = (1 x 24) + (0 x 23) + (0 x 22) + (1 x 21) + (1 x 20) = (1 x 16) + (0 x 8) + (0 x 4) + (1 x 2) + (1 x 1) = 16 + 0 + 0 + 2 + 1 = 19
Fractions in Binary • Fractions in Binary • 1011.1012 = 11.625 = (1 x 23) + (0 x 22) + (1 x 21) + (1 x 20) + (1 x 2-1) + (0 x 2-2) + (1 x 2-3) = (1 x 8) + (0 x 4) + (1 x 2) + (1 x 1) + (1 x 1/2) + (0 x 1/4) + (1 x 1/8) = 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125 = 11.625 • Floating Point Notations
Decimal-Binary Conversion • Binary to Decimal Conversion • Sum-of-Weights • Adding weights of non-zero terms • Decimal to Binary Conversion • Sum-of-Weights (in reverse) • Repeated Division by 2
Decimal-Binary Conversion • Binary to Decimal Conversion • Sum-of-Weights • Adding weights of non-zero terms Terms 16,0,0.2 and 1 19
Decimal-Binary Conversion • Binary to Decimal Conversion • Sum-of-Weights • Adding weights of non-zero terms
Decimal-Binary Conversion • Binary to Decimal Conversion • Sum-of-Weights • Adding weights of non-zero terms
Lecture No. 1 Number Systems A Summary