Lecture 1: Introduction to Digital and Analog Systems PDF
Document Details
Uploaded by SelfSatisfactionClearQuartz8507
Dr. Attia
Tags
Summary
This lecture provides an introduction to digital and analog systems, explaining the fundamental concepts, differences, and advantages of each. It discusses analog quantities as continuous values and digital quantities as discrete values, along with examples such as temperature.
Full Transcript
INTRODUCTION The term digital is derived from the way computers perform operations, by counting digits. For many years, applications of digital electronics were confined to computer systems. Today, digital technology is applied in a wide range of areas in addition to computers. Such applications as...
INTRODUCTION The term digital is derived from the way computers perform operations, by counting digits. For many years, applications of digital electronics were confined to computer systems. Today, digital technology is applied in a wide range of areas in addition to computers. Such applications as television, communications systems, radar, navigation and guidance systems, military systems, medical instrumentation, industrial process control, and consumer electronics use digital techniques. Electronic circuits can be divided into two broad categories, digital and analog. Digital electronics involves quantities with discrete values, and analog electronics involves quantities with continuous values. An analog quantity is one having continuous values. A digital quantity is one having a discrete set of values. Most things that can be measured quantitatively occur in nature in analog form. For example, the air temperature changes over a continuous range of values. During a given day, the temperature does not go from, say, 70°F to 71°F instantaneously; it takes on all the infinite values in between. If you graphed the temperature on a typical summer day. You would have a smooth, continuous curve similar to the curve in Figure 1. Other examples of analog quantities are time, pressure, distance, and sound. Rather than graphing the temperature on a continuous basis, suppose you just take a temperature reading every hour. Now you have sampled values representing the temperature at discrete points in time (every hour) over a 24-hour period, as indicated in Figure 2. You have effectively converted an analog quantity to a form that can now be digitized by representing each sampled value by a digital code. It is important to realize that Figure 2 itself is not the digital representation of the analog quantity. 1 Dr. Attia Fig.1. Graph of an analog quantity (temperature versus time). Fig. 2. Sampled-value representation (quantization) of the analog quantity in Figure 1. Each value represented by a dot can be digitized by representing it as a digital code that consists of a series of 1 s and Os. 2 Dr. Attia The Digital Advantage Digital representation has certain advantages over analog representation in electronics applications. For one thing, digital data can be processed and transmitted more efficiently and reliably than analog data. Also, digital data has a great advantage when storage is necessary. For example, music when converted to digital form can be stored more compactly and reproduced with greater accuracy and clarity than is possible when it is in analog form. Noise (unwanted voltage fluctuations) does not affect digital data nearly as much as it does analog signals. An Analog Electronic System A system of microphones, is one simple example of an application of analog electronics. The basic diagram in Figure 3 illustrates that sound waves, which are analog in nature, are picked up by a microphone and converted to a small analog voltage called the audio signal. This voltage varies continuously as the volume and frequency of the sound changes and is applied to the input of a linear amplifier. The output of the amplifier, which is an increased reproduction of input voltage, goes to the speaker(s). The speaker changes the amplified audio signal back to sound waves that have a much greater volume than the original sound waves picked up by the microphone. Fig.3. A basic audio public address system. 3 Dr. Attia A System Using Digital and Analog Methods The compact disk (CD) player is an example of a system in which both digital and analog circuits are used. The simplified block diagram in Figure 4 illustrates the basic principle. Music in digital form is stored on the compact disk. A laser diode optical system picks up the digital data from the rotating disk and transfers it to the digital-to-analog converter (DAC). The DAC changes the digital data into an analog signal that is an electrical reproduction of the original music. This signal is amplified and sent to the speaker for you to enjoy. When the music was originally recorded on the CD, a process, essentially the reverse of the one described here, using an analog-to-digital converter (ADC) was used. Fig.4. Basic block diagram of a CD player. Only one channel is shown. Binary Digits Each of the two digits in the binary system, 1 and 0, is called a bit, which is a contraction of the words binary digit. Group of eight bits is known as a byte. In digital circuits, two different voltage levels are used to represent the two bits. Generally, 1 is represented by the higher voltage, which we will refer to as a HIGH, and a 0 is represented by the lower voltage level, which we will refer to as a LOW. This is called positive logic (Fig.5a) and will be used throughout the course. Another system in which a 1 is represented by a LOW and a 0 is represented by a HIGH is called negative logic (Fig.5b). 4 Dr. Attia Binary values are represented abstractly by: Digits 0 and 1 Words (symbols) False (F) and True (T) Words (symbols) Low (L) and High (H) And words on and off Why binary numbers? Why not decimal? Digital system understand binary numbers, not decimal numbers. (a) (b) (a) positive logic: Low voltage (0 – 0.4 volts) , High voltage (2.8 – 5 volts) (b) negative logic: High voltage (0 – - 0.4 volts) , Low voltage (-2.8 – -5 volts) Fig.5. digital waveforms. Groups of bits (combinations of 1s and 0s), called codes, are used to represent numbers, letters, symbols, instructions, and anything else required in a given application. 5 Dr. Attia Decimal and Binary Systems and Operations Decimal numbers The decimal number system has ten digits, 0 through 9. The decimal number system has a base of 10. The weights for whole numbers are positive powers of ten that increase from right to left, beginning with 100 = 1.... 105 104 103 102 101 100 For fractional numbers, the weights are negative powers of ten that decrease from left to right beginning with 10-1. 102 101 100.10-1 10-2 10-3... Decimal point The value of a digit is determined by its position in the number. The value of a decimal number is the sum of the digits after each digit has been multiplied by its weight. Example 1 Express the decimal number 47 as a sum of the values of each digit. Solution The digit 4 has a weight of 10, which is 101, as indicated by its position. The digit 7 has a weight of 1, which is 10 0, as indicated by its position. 47 = (4 × 101) + (7 × 100) = (4 × 10) + (7 × 1) = 40 + 7 Example 2 Express the decimal number 568.23 as a sum of the values of each digit. Solution The whole number digit 5 has a weight of 100, which is 102, the digit 6 has a weight of 10, which is 101, the digit 8 has a weight of 6 Dr. Attia 1, which is 100, the fractional digit 2 has a weight of 0.1, which is 10-1, and the fractional digit 3 has a weight of 0.01, which is 10-2. 568.23 = (5 × 102 ) + (6 × 101) + (8 × 100) + (2 × 10-1) + (3 × 10-2) = (5 × 100) + (6 × 10) + (8 × 1) + (2 × 0.1) + (3 × 0.01) = 500 + 60 + 8 + 0.2 + 0.03 Binary numbers The binary number system has two digits (bits). The two binary digits (bits) are 1 and 0. The binary number system has a base of 2. The position of a 1 or 0 in a binary number indicates its weight. or value within the number, just as the position of a decimal digit determines the value of that digit. The weights in a binary number are based on powers of two. The weight or value of a bit increases from right to left in a binary number. A binary count of zero through fifteen is shown in Table 1. Notice the patterns with which the 1s and 0s alternate in each column. Table 1 7 Dr. Attia As you have seen in Table 1, four bits are required to count from zero to 15. In general, with n bits you can count up to a number equal to 2n - 1. Largest decimal number = 2n - 1 For example, with five bits (n = 5) you can count from zero to thirty-one: 25 - 1 = 32 - 1 = 31 With six bits (n = 6) you can count from zero to sixty-three: 26 - 1 = 64 - 1 = 63 The right-most bit is the LSB (least significant bit) in a binary whole number and has a weight of 20 = 1. The weights increase from right to left by a power of two for each bit. The left-most bit is the MSB (most significant bit); its weight depends on the size of the binary number.The weight structure of a binary number is: 2n – 1... 23 22 21 20. 2-1 2-2... 2-n Binary point Table 2. The powers of two and their equivalent decimal weights for an 8-bit binary whole number and a 6-bit binary fractional number. POSITIVE POWERS OF TWO NEGATIVE POWERS OF TWO (WHOLE NUMBERS) (FRACTIONAL NUMBER) 28 27 26 25 24 23 22 21 20 2−1 2−2 2−3 2−4 2−5 2−6 256 128 64 32 16 8 4 2 1 1/2 1/4 1/8 1/16 1/32 1/64 0.5 0.25 0.125 0.0625 0.03125 0.015625 Conversion from binary to decimal The decimal value of any binary number can be found by adding the weights of all bits that are 1 and discarding the weights of all bits that are 0. Example 3 Convert the binary whole number 1101101 to decimal. 8 Dr. Attia Solution Weight: 26 25 24 23 22 21 20 Binary number: 1 1 0 1 1 0 1 1101101 = 26 + 25 + 23 + 22 + 20 = 64 + 32 + 8 + 4 + 1 = 109 Example 4 Convert the fractional binary number 0.1011 to decimal. Solution Weight: 2-1 2-2 2-3 2-4 Binary number: 0. 1 0 1 1 0.1011 = 2-1 + 2-3 + 2-4 = 0.5 + 0.125 + 0.0625 = 0.6875 Conversion from decimal to binary Sum-of-Weights Method Example 5 Convert the following decimal numbers to binary: (a) 12 (b) 25 (c) 58 (d) 82 Solution (a) 12 = 8 + 4 = 23 + 22 1100 (b) 25 = 16 + 8 + 1 = 24 + 23 + 20 11001 (c) 58 = 32 + 16 + 8 + 2 = 25 + 24 + 23 + 21 111010 (d) 82 = 64 + 16 + 2 = 26 + 24 + 21 1010010 Repeated Division by 2 Method Example 6 Convert the following decimal numbers to binary: (a) 19 (b) 45 9 Dr. Attia Solution Converting Decimal Fractions to Binary Sum-of-Weights Method Example 7 Convert the decimal fraction 0.625 to binary. Solution 0.625 = 0.5 + 0.125 =2-1 + 2-3 = 0.10l Repeated Multiplication by 2 Method Example 8 convert the decimal fraction 0.3125 to binary. 10 Dr. Attia Solution Binary Arithmetic Binary Addition The four basic rules for adding binary digits (bits) are as follows: 0+0=0 Sum of 0 with a carry of 0 0+1=1 Sum of 1 with a carry of 0 1+0=1 Sum of 1 with a carry of 0 1 + 1 = 10 Sum of 0 with a carry of 1 Example 9 Add the following binary numbers: (a) 11 + 11 (b) 100 + 10 (c) 111 + 11 (d) 110 + 100 11 Dr. Attia Solution (a) 11 3 (b) 100 4 (c) 111 7 (d) 110 6 +11 +3 +10 +2 +11 +3 +100 +4 110 6 110 6 1010 10 1010 10 Binary Subtraction The four basic rules for subtracting bits are as follows: 0 – 0 = 0 , 1 – 1 = 0 , 1 – 0 = 1 , 10 – 1=1 0 – 1 = 1 , with a borrow of 1 from the next more significant bit. Example 10 Subtract the following binary numbers: (a) 11 - 01 (b) 11 - 10 (c) 101 - 011 Solution (a) 11 3 (b) 11 3 (c) 101 5 -01 - 1 -10 -2 -011 -3 10 2 01 1 010 2 Binary Multiplication The four basic rules for multiplying bits are as follows: 0×0=0 , 0×1=0 , 1×0=0 , 1×1=1 Multiplication is performed with binary numbers in the same manner as with decimal numbers. Example 11 Perform the following binary multiplications: (a) 11 × 11 (b) 101 × 111 Solution (a) 11 3 (b) 111 7 ×11 ×3 ×101 ×5 11 9 111 35 + 11 000 1001 + 111 100011 12 Dr. Attia Binary Division Division in binary follows the same procedure as division in decimal. Example 12 Perform the following binary divisions: (a) 110 ÷ 11 (b) 110 ÷ 10 Solution (a) 10 2 (b) 11 3 11 110 3 6 10 110 2 6 11 6 10 6 000 0 10 0 10 00 13 Dr. Attia