1 / 50

Introduction to Number Systems: Decimal, Binary, Hexadecimal, Octal

This tutorial explains the concepts of decimal, binary, hexadecimal, and octal number systems, how to convert between them, and their use in positional and non-positional systems.

melodyk
Download Presentation

Introduction to Number Systems: Decimal, Binary, Hexadecimal, Octal

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Objectives: ❑ ❑ ❑ ❑ ❑ ❑ ❑ ❑ To describe the decimal system (base 10). To describe the binary system (base 2). To find the number of digits needed in each system. To describe the hexadecimal system (base 16). To distinguish between different number systems. To convert a number from one system to another. To understand the concept of number systems. To describe the octal system (base 8).

  2. 2.1 INTRODUCTION A number system (or numeral system) defines how a number can be represented using distinct symbols. A number can be represented differently in different systems. For example, the two numbers (2A)16 and (52)8 both refer to the same quantity, (42)10but their representations are different. This is the same as using the words cheval (French) and equus (Latin) to refer to the same entity, a horse.

  3. 2.2 POSITIONAL NUMBER SYSTEMS In a positional number system, the position a symbol occupies in the number determines the value it represents. In this system, a number represented as: has the value of :

  4. The decimal system (base 10) The word decimal is derived from the Latin root decem (ten). In this system the base b = 10 and we use ten symbols S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} The symbols in this system are often referred to as decimaldigits or just digits.

  5. Figure 2.1: Place value in a decimal integer Integers

  6. Reals

  7. The binary system (base 2) The word binary is derived from the Latin root bini (or two by two). In this system the base b = 2 and we use only two symbols, S = {0, 1} The symbols in this system are often referred to as binarydigits or bits (binary digit).

  8. Figure 2.2: Place values in a binary integer Integers

  9. Reals

  10. The hexadecimal system (base 16) The word hexadecimal is derived from the Greek root hex (six) and the Latin root decem (ten). In this system the base b = 16 and we use sixteen symbols to represent a number. The set of symbols is S = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} Note that the symbols A, B, C, D, E, F are equivalent to 10, 11, 12, 13, 14, and 15 respectively. The symbols in this system are often referred to as hexadecimal digits.

  11. Figure 2.3: Place values in a hexadecimal integer Integers

  12. The octal system (base 8) The word octal is derived from the Latin root octo (eight). In this system the base b = 8 and we use eight symbols to represent a number. The set of symbols is S = {0, 1, 2, 3, 4, 5, 6, 7}

  13. Figure 2.4: Place values in an octal integer Integers

  14. Table 2.1: Summary of four positional number system

  15. Table 2.2: Comparison in the four systems

  16. Conversion We need to know how to convert a number in one system to the equivalent number in another system. Since the decimal system is more familiar than the other systems, we first show how to covert from any base to decimal. Then we show how to convert from decimal to any base. Finally, we show how we can easily convert from binary to hexadecimal or octal and vice versa.

  17. Figure 2.5: Converting other bases to decimal Any base to decimal conversion

  18. Decimal to any base Figure 2.6: Algorithm to convert the integral part

  19. Figure 2.7: Converting the integral part

  20. Figure 2.8: Algorithm to convert the fractional part

  21. Figure 2.9: Converting the fractional part

  22. Figure 2.10: Binary to hex and hex to binary Binary-hexadecimal conversion

  23. Figure 2.11: Binary to octal conversion Binary-octal conversion

  24. Figure 2.12: Octal to hex and hex to octal conversion Octal-hexadecimal conversion

  25. 2.3 NON-POSITIONAL SYSTEMS Although nonpositional number systems are not used in computers, we give a short review here for comparison with positional number systems. A nonpositional number system still uses a limited number of symbols in which each symbol has a value. However, the position a symbol occupies in the number normally bears no relation to its value.

  26. In this system, a number is represented as: and has the value of: There are some exceptions to the addition rule we just mentioned, as shown in Example 2.24.

  27. Table 2.3: Values of symbols in the Roman system

More Related