Jozef Goetz,
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 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.
Jozef Goetz, > 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 = 1x x2 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
Jozef Goetz, > 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 = 1x x2 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
Jozef Goetz, > 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 = 1x x5 2 +3x5 1 +4x5 0 = = (194) 10 b. (194) 10 (x) 2 = =( ) 2 c. ( ) 2 (x) 8 = 011 = = = 2 =(302) 8 d.( ) 2 (x) 16 =1100 = 12 = C 0010 = 2 =(C2) 16
Jozef Goetz, > 10 |-> (2-> 16) -> 5 a. (1234) 8 = (x) 10 = 1x x x x8 0 = = (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 =( ) 2 c. ( ) 2 (x) 16 =0010 = = = 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
Jozef Goetz, > 10 -> 2-> 8 10-> 5 a. (2C58) 16 =(x) 10 = 2x x x x 16 0 = =(11352) 10 b. (11352) 10 (x) 2 = 11352/2=5676 /2=2828 /2 =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 =( ) 2 c. ( ) 2 (x) 8 = 010 = = = = = 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