Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jozef Goetz, 2011 1 2 Converting numbers 1.Converting from the base 2, 5, 8 and 16 numbers to the base 10 number See all a.s for the next slides 2. Converting.

Similar presentations


Presentation on theme: "Jozef Goetz, 2011 1 2 Converting numbers 1.Converting from the base 2, 5, 8 and 16 numbers to the base 10 number See all a.s for the next slides 2. Converting."— Presentation transcript:

1

2 Jozef Goetz, 2011 1

3 2 Converting numbers 1.Converting from the base 2, 5, 8 and 16 numbers to the base 10 number See all a.s for the next slides 2. Converting from the base 10 number to the base 2, 5, 8 and 16 numbers See b. c. d for the next two slides 3. Converting back and forth (for the power of 2 number system) binary, octal and hexadecimal base numbers – see http://ncalculators.com/number- conversion/binary-to-decimal-hexa-octal-converter.htmhttp://ncalculators.com/number- conversion/binary-to-decimal-hexa-octal-converter.htm See c. d slide 5 and c. slide 6 Having algorithms for 1, 2 and 3 we can basically convert from any base number system to any one.

4 Jozef Goetz, 2011 3 2 -> 10 |-> 5 -> 8 -> 16 All a.s for the next slides are referring to converting from 2, 5, 8, 16 to base 10 number Converting from the base 2 to 5, 8 and 16 numbers via the base 10 number: a.(101001) 2  (x) 10 = 1x2 5 + 1x2 3 +1x2 0 = (41) 10 b. (41) 10  (x) 5 = 41/5 = 8  1 8/5 =1  3 1/5 =0  1 =(131) 5 c. (41) 10  (x) 8 = 41/8 =5  1 5/8 =0  5 =(51) 8 d.(41) 10  (x) 16 =41/16=2  9 2/16=0  2 =(29) 16

5 Jozef Goetz, 2011 4 2 -> 10 |-> 5 -> 8 -> 16 Converting from the base 2 to 5, 8 and 16 numbers via the base 10 number: a.(101001) 2  (x) 10 = 1x2 5 + 1x2 3 +1x2 0 = (41) 10 b. (41) 10  (x) 5 = 41/5 = 8  1 8/5 =1  3 1/5 =0  1 =(131) 5 c. (41) 10  (x) 8 = 41/8 =5  1 5/8 =0  5 =(51) 8 d.(41) 10  (x) 16 =41/16=2  9 2/16=0  2 =(29) 16

6 Jozef Goetz, 2011 5 5 -> 10 -> 2|-> 8 -> 16 Converting from the base 5 to 2, 8 and 16 numbers via the base 10 number: a. (1234) 5  (x) 10 = 1x5 3 + 2x5 2 +3x5 1 +4x5 0 = 125+50+15+4 = (194) 10 b. (194) 10  (x) 2 = 128+64+2 =(11000010) 2 c. (11 000 010) 2  (x) 8 = 011 = 3 000 = 0 010 = 2 =(302) 8 d.(1100 0010) 2  (x) 16 =1100 = 12 = C 0010 = 2 =(C2) 16

7 Jozef Goetz, 2011 6 8 -> 10 |-> (2-> 16) -> 5 a. (1234) 8 = (x) 10 = 1x8 3 + 2x8 2 + 3x8 1 + 4 x8 0 =512+128+24+4 = (668) 10 b.(668) 10  (x) 2 =668/2 =334  0 334/2 =167  0 167/2 =83  1 83/2 =41  1 41/2=20  1 20/2=10  0 10/2=5  0 5/2=2  1 2/2=1  0 1/2 =0  1 =(1010011100) 2 c. (10 1001 1100) 2  (x) 16 =0010 = 2 1001 = 9 1100 = C =(29C) 16 d. (668) 10  (x) 5 = 668/5 =133  3 133/5=26  3 26/5=5  1 5/5=1  0 1/5=0  1 =(10133) 5

8 Jozef Goetz, 2011 7 16 -> 10 -> 2-> 8 10-> 5 a. (2C58) 16 =(x) 10 = 2x16 3 + 12x16 2 + 5x16 1 +8 x 16 0 =8192 + 3072 + 80 + 8 =(11352) 10 b. (11352) 10  (x) 2 = 11352/2=5676  0 5656/2=2828  0 2828/2 =1419  0 1419/2=709  1 709/2=354  1 353/2=177  0 177/2=88  1 88/2=44  0 44/2=22  0 22/2 =11  0 11/2=5  1 5/2=2  1 2/2=1  0 1/2=0  1 =(10110001011000) 2 c. ( 10 110 001 011 000) 2  (x) 8 = 010 = 2 110 = 6 001 = 1 011 = 3 000 = 0 =(26130) 8 d. (11352) 10  (x) 5 =11352/5=2270  2 =2270/5=454  0 =454/5=90  4 =90/5=18  0 =18/5=3  3 =3/5=0  3 =(330402) 5


Download ppt "Jozef Goetz, 2011 1 2 Converting numbers 1.Converting from the base 2, 5, 8 and 16 numbers to the base 10 number See all a.s for the next slides 2. Converting."

Similar presentations


Ads by Google