Understanding Digital and Analog Numbering Systems

numbering system n.w
1 / 36
Embed
Share

Learn about the differences between analog and digital information, the advantages of digital systems, and the various number systems used in digital electronics such as binary, decimal, octal, and hexadecimal. Explore the significance of decimal digits, binary weights, and the implementation of binary systems.

  • Digital Systems
  • Analog Systems
  • Numbering Systems
  • Binary
  • Decimal

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. NUMBERING SYSTEM 1

  2. Analog Analog information is made up of a continuum of values within a given range At its most basic, digital information can assume only one of two possible values: one/zero, on/off, high/low, true/false, etc. 2

  3. 3

  4. Digital Digital Information is less susceptible to noise than analog information Exact voltage values are not important, only their class (1 or 0) The complexity of operations is reduced, thus it is easier to implement them with high accuracy in digital form BUT: Most physical quantities are analog, thus a conversion is needed 4

  5. 5

  6. Digital Number Systems Many number systems are used in digital electronics: Decimal number system (base 10) Binary number system (base 2) Octal number system (base 8) Hexadecimal number system (base16) 6

  7. Decimal system We use decimal numbers everyday. It is a base-10 system. 10 symbols: 0,1, 2, 3, 4, 5, 6,7, 8, 9 The position of each digit in a decimal number can be assigned a weight. 7

  8. Decimal system Most significant digit (MSD) - the digit that carries the most weight, usually the left most Least significant digit (LSD) - the digit that carries the least weight, usually the right most Take example: decimal number 2745.214 Weights 10-2 10-3 103 102 101 100 10-1 2 7 4 5 . 2 1 4 3 2 1 0 1 2 3 2 10 + + 7 10 + + 4 10 + + 5 10 + + 2 10 1 10 + + + + 4 10 8

  9. Binary system Difficult to design a system that works with 10 different voltage levels Solution is base-2 (binary) system 2 digits/symbols: 0, 1 Examples: 0, 1, 01, 111, 101010 9

  10. Binary System The position of each digit (bit) in a binary number can be assigned a weight. For example: 1011.101 1011.101 is a binary number 1 is a digit, 0 is a digit, 1 is a digit weights 2-12-22-3 23 22 21 20 1 0 1 1 . 1 0 1 LSB MSB 10

  11. Binary System (BIT) It takes more digits in the binary system to represent the same value in the decimal system. Examples: 710 = 1112 1010 102 A single binary digit is referred to as a bit. 8 bits make a byte. 11

  12. Binary System (BIT) With N bits we have 2N discrete values. For example, a 4-bit system can represent 24 or 16 discrete values. The largest value is always 2N 1. For the 4-bit system, 24 1 = 1510. The range of values for a 4-bit number is then 0 thru 15. 12

  13. Hexadecimal System Base-16 system 16 symbols: 10 numeric digits and 6 alphabetic characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F Compact way of writing binary system. Widely used in computer and microprocessor applications. 13

  14. Hexadecimal System Examples: 1C16 , A8516 The position of each digit in a hexadecimal number can be assigned a weight For example: 2AF8.98E Weights 16-2 16-3 163 162 161 160 16-1 2 A F 8 . 9 8 E 14

  15. Octal System Base-8 system. 8 digits: 0, 1, 2, 3, 4, 5, 6, 7 Convenient way to express binary numbers and codes. 15

  16. Table of Number Systems DECIMAL BINARY HEXADECIMAL OCTAL 0 0000 0 0 1 0001 1 1 2 0010 2 2 3 0011 3 3 4 0100 4 4 5 0101 5 5 6 0110 6 6 7 0111 7 7 8 1000 8 10 9 1001 9 11 10 1010 A 12 11 1011 B 13 12 1100 C 14 13 1101 D 15 14 1110 E 16 15 1111 F 17 16

  17. Conversion between Numbers 5 Octal (base 8) 6 9 10 1 2 Decimal (base 10) Binary (base 2) 7 8 Hexadecimal (base 16) 3 4 17

  18. 1. Decimal to Binary Method 1: Decimal number binary number Method: sum-of-weights Method 2: Decimal whole number binary number. Method: division-by-2 Method 3: Decimal fraction binary number Method: multiplication-by-2 18

  19. Method 1: Sum of Weights Step 1: Find the power of two that fulfills the following: Nearest to the given decimal number; and Its decimal number is less than or equal to the given decimal number. Step 2: Subtract the power of two (from Step 1) from the given decimal number. Step 3: If the result of the subtraction in Step 2 is 0, go to Step 4. Else, repeat Steps 1 and 2 for the result of the subtraction in Step 2. Step 4: Write out the binary number based on all the powers of two from Step 1. 19

  20. Method 1: Sum of Weights Example 1: Convert 2510 to binary Step 1: 22 = 4? No, because it is not the nearest. 23 = 8is nearer and still less than 25. 24 = 16 is the nearest and its decimal, 16 is less than 25. 25 = 32No, because its decimal number, 32 is more than 25. Step 2: the result of subtraction 25 16 = 9 Step 3: Repeat Step 1: the power of two which is nearest to 9 but less than 9 is 23 = 8 Repeat Step 2: the result of subtraction 9 8 = 1 Repeat Step 1: the power of two which is nearest to 1 and equal to 1 is 20 = 1 Repeat Step 2: the result of subtraction 1 1 = 0 Step 4: Write out the binary number based on all the powers of two from Step 1. 23 222120 24 Weights 1 1 0 0 1 Binary number 20

  21. Method 2: Division-by-2 Method 2 is used to convert only whole decimal numbers (no fraction) to binary. Repeat the division of the decimal number with 2 until the quotient is 0. Remainder of each division determine the binary number. First remainder represent the LSB and the last remainder is the MSB. 21

  22. Method 2: Division-by-2 Example 1: Convert 2510 to binary Quotient Remainder 25= = 12 1 2 12= = 6 0 LSB 2 6= = 3 0 2 3= = 1 1 0 0 1 2510 = 1 1 2 1= = MSB 0 1 2 22

  23. Method 3: Multiplication-by-2 Method 3 is used to convert decimal fraction only to binary. Repeat the multiplication until the fractional part of the product are all zeros. The binary number is determined by the first digit in the multiplication results. 23

  24. Method 3: Multiplication-by-2 Example 2: Convert 0.3125 to binary Carry 0 0.3125 x 2 = 0.625 MSB The binary fraction is: 0 1 1 0.625 x 2 = 1.25 . 0 1 0 0.25 x 2 = 0.50 LSB 1 0.50 x 2 = 1.00 24

  25. 2. Binary to Decimal Only one method is used. That is the sum of weight. Example 3: Convert 1011.101 to decimal 2-12-22-3 23 22 21 20 1 0 1 1 . 1 0 1 =(1x23) + (0x22) + (1x21) + (1x20) + (1x2-1) + (0x2-2) + (1x2-3) = 8 + 0 + 2 + 1 + 0.5 + 0 + 0.125 = 11.62510 25

  26. 3. Decimal to Hexadecimal Method used is repeated division by-16. Repeat the division of the decimal number with 16 until the quotient is 0. Remainder of each division determine the hex number. First remainder represent the LSB and the last remainder is the MSB. 26

  27. Decimal to Hexadecimal Example 4: Convert 65010 to hex number Quotient Remainder (decimal) Remainder (hexadecimal) 650= = 40 10 A 16 LSB 40= = 2 8 8 16 2= = 0 2 2 16 MSB 65010 = 2 8 A 27

  28. 4. Hexadecimal to Decimal Only one method is used. That is the sum of weight. Example 5: Convert A8516 to decimal number 162 161 160 A 8 5 = (A x 162) + (8 x 161) + (5 x 160) = (10 x 256) + (8 x 16) + (5 x 1) = 2560 + 128 + 5 = 2693 28

  29. 5. Decimal to Octal Method used is repeated division by-8. Repeat the division of the decimal number with 8 until the quotient is 0. Remainder of each division determine the oct number. First remainder represent the LSB and the last remainder is the MSB. 29

  30. Decimal to Octal Example 6: Convert 35910 to octal number Quotient Remainder 359= = 44 7 8 LSB 44= = 5 4 8 5= = 0 5 MSB 8 35910 = 5 4 7 30

  31. 6. Octal to Decimal Only one method is used. That is the sum of weight. Example 7: Convert 23748 to decimal number 83 82 81 80 2 3 7 4 = (2 x 83) + (3 x 82) + (7 x 81) + (4 x 80) = (2 x 512) + (3 x 64) + (7 x 8) + (4 x 1) = 1024 + 192 + 56 + 4 = 1276 31

  32. 7. Binary to Hexadecimal Step 1: Break the binary number into 4-bit groups, starting from LSB. Step 2: Replace each 4-bit with the equivalent hexadecimal number. Example 8: Convert 111111000101101001 to hex number Binary 1111 0001 0110 1001 0011 3 F 1 6 9 Hexadecimal 32

  33. 8. Hexadecimal to Binary Step: Replace each digit of the hexadecimal number with the equivalent 4-bit binary number. Example 9: Convert CF8E16 to binary number C F 8 E Hexadecimal Binary 1111 1000 1110 1100 33

  34. 9. Binary to Octal Step 1: Break the binary number into 3-bit groups, starting from LSD. Step 2: Replace each 3-bit group with the equivalent octal number. Example 10: Convert 1011110012 to octal number Binary 101 111 001 5 7 1 Octal 34

  35. 10. Octal to Binary Step: Replace each digit of the octal number with the equivalent 3-bit binary number. Example 11: Convert 75268 to binary number 7 5 2 6 Octal 101 010 110 111 Binary 35

  36. Summary of Conversion Division-by-8 Octal (base 8) Sum of weight 3 bit conversion Digit-to-3 bit Division-by-2 Decimal (base 10) Binary (base 2) Sum of weight 4 bit conversion Digit-to-4 bit Hexadecimal (base 16) Division-by-16 Sum of weight 36

More Related Content