×
its time to be "SERIOUS".
--Your friends at LectureNotes
Close

Note for Analog And Digital Electronics - ADE by Siddharth Rajput

  • Analog And Digital Electronics - ADE
  • Note
  • 3 Topics
  • 33 Views
  • Uploaded 11 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-2

Chapter 1.indd 2 4/9/2015 9:40:08 AM

Text from page-3

CHAPTER 1 DIGITAL ELECTRONICS Syllabus: Digital electronics: logic functions, minimization, design and synthesis of combinational and sequential ­circuits, number representation and computer arithmetic (fixed and floating point). Number system 1.1  INTRODUCTION Digital electronics represents discrete signals instead of signals in a continuous range. It uses two binary levels 0’s (corresponding to false) and 1’s (corresponding to true). The main reason for advancement in digital electronics is integrated circuits (ICs). Radix/Base representation Numeric codes Codes representation Alphanumeric codes EBCDIC Weighted Non-weighted ASCII 1.2  NUMBER SYSTEM Number system is an age old method to represent numerals (Fig. 1.1). Decimal number system is the most common number system and binary number system is used by computers. Chapter 1.indd 3 Binary Gray code BCD XS3 code 2421 code Figure 1.1 |   Number system. 4/9/2015 9:40:08 AM

Text from page-4

4     Chapter 1:  Digital Electronics  Table 1.1 |   Types of number systems Base/Radix Unique ­Numbers Terminology Example 10 0 to 9 Decimal number system 10.47  8 0 to 7 Octal number system 65.32  2 0 to 1 Binary number system 110.11 16 0 to 15 Hexadecimal number system BAD.1A 0 to 9 are numerals and 10 to 15 are represented with alphabets 10 = A, 11 = B, 12 = C, … 15 = F (111001.0100)2 = 1 × 25 + 1 × 24 + 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20 + 0 × 2-1 Radix or base is the number of unique digits, so the ­different base or radix can be expressed as represented in Table 1.1. For example, (57)10 − here 10 is the base (or radix) and 57 is the number. Another example is of (101.11)2 = (5.75)10 = (5.6)8 = (5.C)16. Example 1.1 Let us understand the logic of representation by considering (57.1)10. We know 57 means 50 + 7 + (1/10). Now, representing the same by making use of radix (which is 10), we get 1.2.1  Conversions of Number System A number of a particular number system can be converted into another number system, as follows:   1.  Decimal number system to any number system: Consider the example of (57.3)10. To find the binary equivalent, we have 2 57 2 28 1 2 14 27 23 21 0 0 1 1 2 × 0.3 = 0.6 2 × 0.6 = 1.2 2 × 0.2 = 0.4 2 × 0.4 = 0.8 1.2.2  Complement of a Number Any given number will have two complements:   1.  Radix minus one complement (R-1’s ­complement): It is obtained by subtracting the given number from the highest possible number. For example, if there is a two-digit decimal number, it will be subtracted from 99; whereas a 3-bit number in a binary system will be subtracted from 111. 5 × (10)1 + 7 × (10)0 + 1 × (10)-1 (111001)2 + 1 × 2-2 + 0 × 2-3 + 0 × 2-4 = 32 + 16 + 8 + 0 + 0 + 1 + 0 + 0.25 + 0 + 0 = (57.25)10 0 1 0 0 Note: The 1’s complement of a binary number is obtained by interchanging the 1’s and 0’s. For example, 1’s complement of (1011)2 is (0100)2.   2.  Radix complement (R’s complement): This is also known as true complement. It is obtained by adding one to R-1’s complement. For example, (57)10 − its 9’s complement is 42 and its 10’s complement is 43. 1.2.2.1 Subtraction Using R-1’s Complement For the following subtractions, A −B (0.0100)2 ---------- Therefore, (57.3)10 = (111001.0100)2   2.  Any number system to decimal number system: Consider the example of (111001.0100)2. To find the decimal equivalent we have (111001.0100)2 = 1 × 25 + 1 × 24 + 1 × 23 + 0 × 22 + 0 × 21 + 1 × 20 + 0 × 2-1 ---------the steps involved are as follows: Step 1. Find R-1’s complement of B. Step 2. Add A and B. Step 3. If there is carry, then add this carry to the answer. + 1 × 2-2 + 0 × 2-3 + 0 × 2-4 = 32 + 16 + 8 + 0 + 0 + 1 + 0 + 0.25 + 0 + 0 = (57.25)10 Chapter 1.indd 4 4/9/2015 9:40:09 AM

Text from page-5

1.2  NUMBER SYSTEM     5 If there is no carry, then find the R-1’s complement of the answer and place a negative sign in front of the answer. Problem 1.4: (011)2 − (101)2 Solution: Step 1. 2’s complement of 101 is 011. Problem 1.1: (101)2 − (011)2 Step 2. The addition of these two numbers is (011 + 011 = 0 110). Solution: Step 1. 1’s Complement of 011 is 100. Step 2. The addition of these two numbers is (101 + 100 = 1 001). Step 3. There is a carry of 1, so now we will add this carry to the answer (1 + 001), which is (010)2. Step 3. There is a no carry, so now we will find 2’s complement of the answer obtained (which is 010) and place a negative sign in front of it. So, the answer is (−010)2. 1.2.3  Representation of Negative Numbers Problem 1.2: (011)2 − (101)2 In−(57)10 = (1111001), the most significant bit is 1, showing that the number is negative binary number. Solution: Step 1. 1’s Complement of 101 is 010. Step   2. The addition of these two numbers is (011 + 010 = 0 101). Step 3. There is a no carry, so now we will find 1’s complement of the answer obtained (which is 010) and place a negative sign in front of it. So, the answer is (−010)2. 1.2.4  The IEEE Standard for Floating Point Numbers The IEEE (Institute of Electrical and Electronics Engineers) has provided a standard for floating point numbers and their arithmetic. This standard specifies how single precision (32-bit) and double precision (64-bit) floating point numbers are to be represented. 1.2.2.2 Subtraction Using R’s Complement In this method, we find R’s complement of the subtrahend and we do not add the carry, as in step 2. Rest of the steps are the same. Problem 1.3: (101)2 − (011)2 Solution: Step 1. 2’s complement of 011 is 101. Step 2. The addition of these two numbers is (101 + 101 = 1 010). Step 3. There is a carry of 1, so now we will not add this carry to the answer (001), which is (010)2.   1.  Single Precision: The IEEE single precision f loating point standard representation requires a 32-bit word. The first bit to the left is the sign bit, the next eight bits are the exponent bits, and the final 23 bits form the fraction part (Fig. 1.2). The value of a normalized number = (−1)s × e-127 1.m × 2 where s = 1 for negative number, s = 0 for positive number, m = mantissa and e = exponent.   2.  Double Precision: The IEEE double precision f loating point standard representation requires a 64-bit word. The first bit is the sign bit, the next eleven bits are the exponent bits, and the final 52 bits form the fraction part (Fig. 1.3). 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 exponent s significand/mantissa 1-bit 8-bits 23-bits Figure 1.2 |   Single Precision (32 bits). 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 s exponent significand/mantissa 1-bit 11-bits 20-bits significand (continued) 32-bits Figure 1.3 |   Double Precision (64 bits). Chapter 1.indd 5 4/9/2015 9:40:10 AM

Lecture Notes