Number Systems and Codes

Number Systems and Codes PowerPoint PPT Presentation

  • Uploaded on
  • Presentation posted in: General

Chapter Objectives. You should be able to:Determine the weight of each digit position in the decimal, binary, octal, and hexadecimal number systems.Convert numbers among the four number systems.Describe binary coded decimal (BCD) numbers.Translate alphanumeric data to and from ASCII.. 2. Digital

Download Presentation

Number Systems and Codes

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

1. Chapter 1 Number Systems and Codes

2. Chapter Objectives You should be able to: Determine the weight of each digit position in the decimal, binary, octal, and hexadecimal number systems. Convert numbers among the four number systems. Describe binary coded decimal (BCD) numbers. Translate alphanumeric data to and from ASCII.

3. Digital versus Analog Digital OFF and ON states that can be represented using 0 and 1 (respectively). Analog Continuously varying Examples: temperature, pressure, velocity

5. Digital Representations of Analog Quantities Audio Recording Audio CD and MP3 players/recorders Video Recording DVDs store digital representations of analog video and audio signals

6. Analog signal voltages and their digital equivalents

9. Discussion Points Explain the difference between analog and digital signals. Describe some applications for digital technology. What are the benefits of using digital systems? Are there any problems associated with digital systems?

10. Decimal Numbering System (Base 10) 10 possible digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 Least-significant position is on the right end Most-significant position is on the left end Weighting factor of 10

11. Binary Numbering System (Base 2) Only two possible digits: 0 and 1 Weighting factor of 2 Conversion techniques Digit times weighting factor Successive division

12. Decimal-to-Binary Conversion Subtracting weighting factors (Example 1-4) Successive division (Example 1-5) First remainder is the Least-Significant Bit (LSB) Last remainder is the Most-Significant Bit (MSB)

13. Octal Numbering System (Base 8) Eight allowable digits: 0, 1, 2, 3, 4, 5, 6, and 7 Weighting factor of 8

14. Octal Conversions Binary to octal (example 1-7, 1-8) Group binary positions in groups of three Write the octal equivalent Octal to binary (example 1-9) Reverse the process Octal to decimal (example 1-10) Multiply by weighting factors Decimal to octal (example 1-11) Successive division

15. Hexadecimal Numbering System (Base 16) 16 allowable digits. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F Each hex digit represents a 4-bit group See Table 1-3 Two hex digits are used to represent 8 bits 8 bits are called a byte 4 bits are called a nibble

16. Hexadecimal Conversions Binary-to-hexadecimal conversion (example 1-12) Group the binary in groups of four Write the equivalent hex digit Hexadecimal-to-binary conversion (example 1-13) Reverse the process

17. Hexadecimal Conversions Hexadecimal-to-decimal conversion (example 1-14) Multiply by weighting factors Decimal-to-hexadecimal conversion (example 1-16, 1-17) Successive division

18. Binary-Coded-Decimal System (BCD) Each of the 10 decimal digits is represented by its 4-bit binary equivalent. Decimal-to-BCD conversion (example 1-18) Convert each decimal digit to its 4-bit binary code BCD-to-Decimal conversion (example 1-19) Reverse the process

19. The ASCII Code American Standard Code for Information Interchange (ASCII) Represents alphanumeric data (letters, symbols, and numbers) Uses 7 bits 128 different code combinations (see Table 1-5) 3-bit group is most significant 4-bit group is least significant

21. Numbering System Applications Application 1-1

22. Applications of the Numbering Systems Application 1-2 A CD player can convert 12-bit signals from a CD into equivalent analog values. What are the largest and smallest hex values that can be used in this system? How many different analog values can be represented?

23. Applications of the Numbering Systems Application 1-3 Typically, digital thermometers use BCD to drive their displays. How many BCD bits are required to drive a 3 digit thermometer display? What bits are sent to the display for 147 degrees?

24. Applications of the Numbering Systems Application 1-4 Most PC-compatible computer systems use a 20-bit address code to identify each of over 1 million memory locations. How many hex characters are required to identify the address of each memory location? What is the hex address of the 200th memory location? If 50 memory locations are used for data storage starting at location 000C8H, what is the location of the last data item?

25. Applications of the Numbering Systems Application 1-5 The part number 651-M is stored in ASCII in a computer memory. List the binary contents of its memory locations.

26. Applications of the Numbering Systems Application 1-6 A programmer uses a debugging utility to find an error in a BASIC program. The utility shows the ASCII code as hex 474F5430203930. Assume that the leftmost bit of each ASCII string is padded with a zero. Translate the program segment that is displayed. Try to determine what the error is.

27. Summary Numerical quantities occur naturally in analog form but must be converted to digital form to be used by computers or digital circuitry. The binary numbering system is used in digital systems because the 1’s and 0’s are easily represented by ON or OFF transistors, which output 0 V for 0 and +5 V for 1.

28. Summary Any number system can be converted to decimal by multiplying each digit by its weighting factor. The weighting factor for the least significant digit in any number system is always 1. Binary numbers can be converted to octal by forming groups of 3 bits and to hexadecimal by forming groups of 4 bits.

29. Summary The successive division procedure can be used to convert from decimal to binary, octal or hexadecimal The binary-coded-decimal system uses groups of 4 bits to drive decimal displays such as those in a calculator. ASCII is used by computers to represent all letters, numbers and symbols in digital form.

30. Review Questions basic concepts: p3 Binary: P8, p10 Octal: P13 Hex: p15 ASCII: p18

  • Login