Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number System Submitted by: Submitted to: Devashish Bhardwaj Miss.Hina

Similar presentations


Presentation on theme: "Number System Submitted by: Submitted to: Devashish Bhardwaj Miss.Hina"— Presentation transcript:

1 Number System Submitted by: Submitted to: Devashish Bhardwaj Miss.Hina
Asst. lect. Of B.Voc (sd) sem Computer Department

2 Chapter 1 Number Systems and Codes

3 Number Systems (2) Binary numbers Digits = {0, 1}
( )2 = 1 x x x x x x x 2-2 = (26.75)10 1 K (kilo) = 210 = 1,024, 1M (mega) = 220 = 1,048,576, 1G (giga) = 230 = 1,073,741,824 Octal numbers Digits = {0, 1, 2, 3, 4, 5, 6, 7} (127.4)8 = 1 x x x x 8-1 = (87.5)10 Hexadecimal numbers Digits = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} (B65F)16 = 11 x x x x 160 = (46,687)10 Chapter 1

4 Number Systems (3) Important Number Systems (Table 1.1) Chapter 1

5 Arithmetic (1) Binary Arithmetic Addition 111011 Carries 101011 Augend
Addend Subtraction Borrows Minuend Subtrahend Chapter 1

6 Arithmetic (2) Multiplication Division 1 1 0 1 0 Multiplicand
x Multiplier Product Chapter 1

7 Arithmetic (3) Octal Arithmetic (Use Table 1.4) Addition 1 1 1 Carries
Augend Addend Sum Subtraction Borrows Minuend Subtrahend Difference Chapter 1

8 Arithmetic (4) Multiplication Division 326 Multiplicand
x Multiplier 2732 Partial products 2404 Product Chapter 1

9 Arithmetic (5) Hexadecimal Arithmetic (Use Table 1.5) Addition
Carries 5 B A 9 Augend + D Addend 1 2 C 0 1 Sum Subtraction 9 10 A 10 Borrows A 5 B 9 Minuend D Subtrahend 4 D A C Difference Series Substitution Method Expanded form of polynomial representation: N = an-1rn-1 + … + a0r0 + a-1r-1 + … + a-mr-m (1.3) Conversion Procedure (base A to base B) Represent the number in base A in the format of Eq. 1.3. Evaluate the series using base B arithmetic. Examples: (11010)2 ® ( ? )10 (627)8 ® ( ? )10 ( )2 ® ( ? )8 (2AD.42)16 ® ( ? )10 Chapter 1

10 Arithmetic (6) Multiplication Division B9A5 Multiplicand
x D50 Multiplier 3A0390 Partial products 96D61 9A Product Chapter 1

11 Base Conversion (1) Series Substitution Method
Expanded form of polynomial representation: N = an-1rn-1 + … + a0r0 + a-1r-1 + … + a-mr-m (1.3) Conversation Procedure (base A to base B) Represent the number in base A in the format of Eq. 1.3. Evaluate the series using base B arithmetic. Examples: (11010)2 ®( ? )10 N = 1´24 + 1´23 + 0´22 + 1´21 + 0´20 = (16)10 + (8) (2)10 + 0 = (26)10 (627)8 ® ( ? )10 N = 6´82 + 2´81 + 7´80 = (384)10 + (16)10 + (7)10 = (407)10 Chapter 1

12 Base Conversion (3) Examples (315)10 = (473)8 (315)10 = (13B)16
Chapter 1

13 Base Conversion (5) Examples (0.479)10 = (0.3651…)8
MSD ¬ ´ 8 6.656 ¬ ´ 8 5.248 ¬ ´ 8 LSD ¬ ´ 8 (0.479)10 = (0.0111…)2 MSD ¬ ´ 2 ¬ ´ 2 ¬ ´ 2 LSD ¬ ´ 2 Chapter 1

14 Base Conversion (6) General Conversion Algorithm Algorithm 1.1
To convert a number N from base A to base B, use (a) the series substitution method with base B arithmetic, or (b) the radix divide or multiply method with base A arithmetic. Algorithm 1.2 (a) the series substitution method with base 10 arithmetic to convert N from base A to base 10, and (b) the radix divide or multiply method with decimal arithmetic to convert N from base 10 to base B. Algorithm 1.2 is longer, but easier and less error prone. Chapter 1

15 Base Conversion (7) Example (18.6)9 = ( ? )11
(a) Convert to base 10 using series substitution method: N10 = 1 ´ ´ ´ 9-1 = … = (17.666…)10 (b) Convert from base 10 to base 11 using radix divide and multiply method: 7.326 ¬ ´ 11 3.586 ¬ ´ 11 6.446 ¬ ´ 11 N11 = ( …)11 Chapter 1


Download ppt "Number System Submitted by: Submitted to: Devashish Bhardwaj Miss.Hina"

Similar presentations


Ads by Google