Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:

Similar presentations


Presentation on theme: "Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:"— Presentation transcript:

1 Number Systems

2 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9) Binary Numbers: radix = 2 (symbols: 0, 1) Hexadecimal Numbers: radix = 16 (symbols: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) Positional Notation: The radix point separates the integer part of the number from the fractional part of the number. Each position represents a power of the radix. Example: decimal number 1 2 5 6. 9 3 2 = (1 x 10 3 ) + (2 x 10 2 ) + (5 x 10 1 ) + (6 x 10 0 )+ (9 x 10 -1 ) + (3 x 10 -2 ) + (2 x 10 -3 ) Example: binary number (1 1 0 1 0. 1 1 0 1) 2 = (1 x 2 4 ) + (1 x 2 3 ) + (0 x 2 2 ) + (1 x 2 1 ) + (0 x 2 0 ) + (1 x 2 -1 ) + (1 x 2 -2 ) + (0 x 2 -3 ) + (1 x 2 -4 ) = 26.8125 = 26 13/16 Conversion Calculator http://fclass.vaniercollege.qc.ca/web/mathematics/real/Calculators/BaseConv_Calc_1.htm

3 Number Systems3 Binary Numbers Assume 1-bit numbers: the largest number is binary 1 Only two different numbers can be represented: 0 AND 1 Assume 2-bit numbers: the largest number is binary 11 Four different numbers can be represented: (a) 00 – 0 (b) 01 – 1 (c)10 – 2 (d) 11 - 3 Assume 3-bit numbers: the largest number is binary 111 Eight different numbers can be represented: 000 – 0 001 – 1 010 – 2 011 – 3 100 – 4 101 – 5 110 – 6 111 – 7 What’s the largest number in binary that can be represented using 4 bits? What is it’s decimal equivalent?

4 Number Systems4 Hexadecimal Numbers Assume 4-bit binary numbers: Sixteen different numbers can be represented: Binary Decimal Hexadecimal 0000 0 0 0001 1 1 0010 2 2 0011 3 3 0100 4 4 0101 5 5 0110 6 6 0111 7 7 1000 8 8 1001 9 9 1010 10 A 1011 11 B 1100 12 C 1101 13 D 1110 14 E 1111 15 F Sample Hexadecimal Number: (A 1 F. 1 C) 16 = (A x 16 2 ) + (1 x 16 1 ) + (F x 16 0 ) + (1 x 16 -1 ) + (C x 16 -2 ) = (10 x 16 2 ) + (1 x 16 1 ) + (15 x 16 0 )+ (1 x 16 -1 ) + (12 x 16 -2 ) = 2591 28/256

5 Number Systems5 Binary Hexadecimal Conversions Binary to Hex: group digits into blocks of 4 (01000010101001010110.11110001) 2 = (?) 16 0100 0010 1010 0101 0110. 1111 0001 = (4 2 A 5 6. F 1) 16 Hex to Binary: convert each hex value to binary (AF5.2C) 16 = (?) 2 A F 5. 2 C = (1010 1111 0101. 0010 1100) 2 Another binary to hex: (11010.1101) 2 = (?) 16 0001 1010. 1101= (1 A. D)16

6 Number Systems6 Radix Divide Techniques Decimal-to-Base x Integer Conversions Divide the given integer successively by the required radix, noting the remainder at each step. The quotient at each step becomes the new dividend for the subsequent division. Stop the division process when the quotient becomes zero. Collect the remainders from each step (last to first) and place them left to right to form the required number. Decimal-to-Binary Conversions: (245) 10 = (?) 2 Decimal-to-Hexadecimal Conversions: (245) 10 = (?) 16

7 Number Systems7 Radix Divide Techniques (245) 10 = (?) 2 = 11110101 =1*2 7 +1*2 6 +1*2 5 +1*2 4 + 0*2 3 +1*2 2 +0*2 1 +1*2 0 =128+64+32+16+0+4+0+1 =245 245/21221 122/2610 61/2301 30/2150 15/271 7/231 3/211 1 /201 STOP

8 Number Systems8 Radix Divide Techniques (245) 10 = (?) 16 = F5 16 =15*16 1 +5*16 0 =245 245/16155 15/16015  F STOP

9 Number Systems9 Summary of base conversions Base 2 to base 10 Multiply each binary digit by its power of 2 and add up the individual values Base 16 to base 10 Multiply each hex digit by its power of 16 and add up the individual values Base 10 to base 2: Use the division-remainder procedure with 2 as the divisor base 16: Use the division-remainder procedure with 16 as the divisor Base 2 to base 16 Convert each block of 4 binary digits into the equivalent base 16 value Base 16 to base 2 Expand each hex value into the equivalent binary


Download ppt "Number Systems. 2 The total number of allowable symbols in a number system is called the radix or base of the system. Decimal Numbers: radix = 10 (symbols:"

Similar presentations


Ads by Google