Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright (c) 2004 Professor Keith W. Noe Number Systems & Codes Part I.

Similar presentations


Presentation on theme: "Copyright (c) 2004 Professor Keith W. Noe Number Systems & Codes Part I."— Presentation transcript:

1

2 Copyright (c) 2004 Professor Keith W. Noe Number Systems & Codes Part I

3 Copyright (c) 2004 Professor Keith W. Noe Reading Assignment Digital Design with CPLD Applications and VHDL, by Robert K. Dueck Chapter 1, Pages 6 through 17

4 Copyright (c) 2004 Professor Keith W. Noe Objectives Explain positional notation and write the positional multipliers for any number base. Count in binary, octal, decimal, & hexadecimal. Write a given number in any base using positional notation. Upon the successful completion of this lesson, you should be able to:

5 Copyright (c) 2004 Professor Keith W. Noe Objectives Convert a binary, octal & hexadecimal number to decimal. Upon the successful completion of this lesson, you should be able to:

6 Copyright (c) 2004 Professor Keith W. Noe Number System Basics The base of the number system identifies how many unique symbols are used for that particular number system. The base of the number system identifies the value of the highest symbol. All number systems begin counting at Zero. All number systems have some commonalities:

7 Copyright (c) 2004 Professor Keith W. Noe The Decimal Number System Has ten unique symbols. The ten symbols are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 The value for the highest symbol is determined using the following formula: Highest Symbol Value = Base – 1 (Base) 10 – 1 = 9 The value for the highest symbol in the decimal number system is 9.

8 Copyright (c) 2004 Professor Keith W. Noe The Decimal Number System When you begin counting in a number system, always begin with Zero. When you have used up all of the symbols, increment the column to the left by 1 and begin counting again starting with Zero. Counting in decimal or Base 10 number system

9 Copyright (c) 2004 Professor Keith W. Noe The Decimal Number System Counting in the decimal or Base 10 number system. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 20, 21, 22, 23, 24, 25, 26, 27, 28, 29

10 Copyright (c) 2004 Professor Keith W. Noe The Decimal Number System All number systems use positional notation. The base of the number identifies the base value to be used when determining the value for each position. All number systems use a POINT to separate the integer from the factional part. For Base 10, this is called the decimal point. Positional Notation

11 Copyright (c) 2004 Professor Keith W. Noe The Decimal Number System The values of the positional multipliers are the number system’s base raised to a power. For the decimal number system, the multipliers are the powers of ten: 10 4 10 3 10 2 10 1 10 0. 10 -1 10 -2 10,000 1,000 100 10 1. 0.1 0.01

12 Copyright (c) 2004 Professor Keith W. Noe The Decimal Number System Positional Notation For example: 37,428 10 3 x 10 4 = 3 x 10,000 = 30,000 7 x 10 3 = 7 x 1, 000 = 7,000 4 x 10 2 = 4 x 100 = 400 2 x 10 1 = 2 x 10 = 20 8 x 10 0 = 8 x 1 = 8

13 Copyright (c) 2004 Professor Keith W. Noe The Decimal Number System Express this base 10 number in positional notation: 56,782.45

14 Copyright (c) 2004 Professor Keith W. Noe The Decimal Number System Solution 5 x 10 4 = 5 x 10,000 = 50,000 6 x 10 3 = 6 x 1,000 = 6,000 7 x 10 2 = 7 x 100 = 700 8 x 10 1 = 8 x 10 = 80 2 x 10 0 = 2 x 1 = 2 4 x 10 -1 = 4 x 0.1 = 0.4 + 5 x 10 -2 = 5 x 0.01 = 0.05 56,782.45

15 Copyright (c) 2004 Professor Keith W. Noe Other Number Systems Used in Digital Electronics & Computers Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16)

16 Copyright (c) 2004 Professor Keith W. Noe Summary About the Basics All of the basics discussed as they relate to the decimal number system applies directly to the Binary, Octal & Hexadecimal number systems.

17 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System Base 2

18 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System Has two unique symbols. Remember, the value of the highest symbol equals the Base of the Number System minus 1. Base 2 – 1 = 1 Therefore, the highest symbol in the binary number system is 1.

19 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System When counting in binary, begin with Zero, just as you do with any other number system. When you have used all of the unique symbols, increment the column to the left by one and start with Zero again. Counting in Binary

20 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System Counting in Binary 0 1 10 11 100 101 110 111

21 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System Counting in Binary Write the next 16 counts beginning with 10000 2

22 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System You should have written - 10001 10101 11001 11101 10010 10110 11010 11110 10011 10111 11011 11111 10100 11000 11100 100000

23 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System Each position will be 2 raised to a power. The binary number system is based on the powers of 2. 2 5, 2 4, 2 3, 2 2, 2 1, 2 0. 2 -1, 2 -2, 2 -3, etc. The point that separates the integer part from the fractional part of the number is called the binary point. Positional Notation

24 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System Positional notation in the binary number system is based on powers of two. For example: 2 5, 2 4, 2 3, 2 2, 2 1, 2 0. 2 -1, 2 -2, etc. 32 16 8 4 2 1.5.25 Positional Notation

25 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System Positional Notation For example: 11011 2 1 x 2 4 = 1 x 16 = 16 1 x 2 3 = 1 x 8 = 8 0 x 2 2 = 0 x 4 = 0 1 x 2 1 = 1 x 2 = 2 + 1 x 2 0 = 1 x 1 = 1 27

26 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System Express this binary number in positional notation: 101101.01 2

27 Copyright (c) 2004 Professor Keith W. Noe The Binary Number System 1 x 2 5 = 1 x 32 = 32.00 0 x 2 4 = 1 x 16 = 0.00 1 x 2 3 = 1 x 8 = 8.00 1 x 2 2 = 1 x 4 = 4.00 0 x 2 1 = 0 x 2 = 0.00 1 x 2 0 = 1 x 1 = 1.00 0 x 2 -1 = 0 x 0.5 = 0.00 + 1 x 2 -2 = 0 x.25 = 0.25 45.25 SOLUTIONSOLUTION

28 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System Base 8

29 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System Is based on powers of 8. The value of the highest symbol is 7. The octal point separates the integer portion of the number from the fractional portion of the number.

30 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System When counting in the octal number system, begin with Zero. When you have used all of the unique symbols, increment the column to the left by one and begin with zero again. Counting in Base 8

31 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System Counting in Base 8 0 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37

32 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System Counting in Base 8 Write the next 23 counts beginning with: 60 8

33 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System Counting in Base 8 You should have written: 60 61 62 63 64 65 66 67 70 71 72 73 74 75 76 77 100 101 102 103 104 105 106 107

34 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System The positional multipliers for the octal number system are: 8 4 8 3 8 2 8 1 8 0. 8 -1 8 -2 4096 512 64 8 1. 0.125 0.015625 Positional Notation

35 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System Positional Notation For Example: 7462 8 7 x 8 3 = 7 x 512 = 3,584 4 x 8 2 = 4 x 64 = 256 6 x 8 1 = 6 x 8 = 48 + 2 x 8 0 = 2 x 1 = 2 3,890

36 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System Express this octal number using positional notation: 4712.5 8

37 Copyright (c) 2004 Professor Keith W. Noe The Octal Number System 4 x 8 3 = 4 x 512 = 2,048.000 7 x 8 2 = 7 x 64 = 448.000 1 x 8 1 = 1 x 8 = 8.000 2 x 8 0 = 2 x 1 = 2.000 + 5 x 8 -1 = 5 x 0.125 = 0.625 2,506.625

38 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System Base 16

39 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System The base of this number system is 16. There are 16 unique symbols for this number system. The sixteen symbols are: 0 1 2 3 4 5 6 7 8 9 A B C D E F

40 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System A numeric symbol must occupy only one place in a number. Numbers such as 12, 15, 24, etc uses two symbols as two places are occupied. Since there are only 10 symbols defined because of the decimal number system, six additional symbols must be selected. Some Additional Information

41 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System The six extra symbols needed are borrowed from the alphabet. The six letters borrowed from the alphabet are: A B C D E F Some Additional Information

42 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System This number system begins counting at zero. After counting from 0 to 9, the next six counts are A, B, C, D, E, F. After using the 16 possible symbols, increment the next column to the left by one and start counting with zero again. Counting in Hexadecimal

43 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System Counting in Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F

44 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System Counting in Hexadecimal Write the next 32 counts beginning with 40 16

45 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F You should have written:

46 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System The hexadecimal number system uses positional notation just like the other number systems studied so far. The hexadecimal number system is based on the number 16. The Hexadecimal Point separates the integer portion of the number from the fractional portion.

47 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System The powers of 16 used for the positional notation system for base 16 are: 16 3 16 2 16 1 16 0. 16 -1 4,096 256 16 1. 0.0625

48 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System Usually technicians and engineers in the digital electronics field often refer to the hexadecimal number system simply as Hex.

49 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System Positional Notation Look at this example: B95F 16 B x 16 3 = 11 x 4,096 = 45,056 9 x 16 2 = 9 x 256 = 2,304 5 x 16 1 = 5 x 16 = 80 + F x 16 0 = 15 x 1 = 15 47,455

50 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System Express this base 16 number in positional notation: 3C9F.B 16

51 Copyright (c) 2004 Professor Keith W. Noe The Hexadecimal Number System 3 x 16 3 = 3 x 4,096 = 12,288.0000 C x 16 2 = 12 x 256 = 3,072.0000 9 x 16 1 = 9 x 16 = 144.0000 F x 16 0 = 15 x 1 = 15.0000 B x 16 -1 = 11 x 0.0625 = 0.6875 15,519.6875

52 Copyright (c) 2004 Professor Keith W. Noe


Download ppt "Copyright (c) 2004 Professor Keith W. Noe Number Systems & Codes Part I."

Similar presentations


Ads by Google