Another example of base converion and long division

Here is another example of conversion by repeated integer division. This example is in base 2. 11001101 in base 2 is converted to base 8 (which is 1000 in base 2).

Divide the number to be converted by the new base. Remember that the division is done in the old base.

 
	11001101 / 1000	   result 11001	    remainder 101 (or 5 in base 8)
	11001 / 1000 	   result 11	    remainder 1   (or 1 in base 8)
	11 / 1000 	   result 0	    remainder 11  (or 3 in base 8)
The remainder values are read from bottom to top, so the answer, in base 8, is 315.

Appendix B (page 585) in the CSC 108 text, Java software solution--Foundations of program design (Louis and Loftus), describes converting numbers from one base to another. It describes somewhat different method of converting numbers.

And here is another example of long division.

 
                           11001	 (This is the result.)
		 1000 ) 11001101
                     	1000
		 	 1001
		         1000
		 	    11
                             0	
                            110
		              0
                            1101
                            1000	
		 	     101 	 (This is the final remainder.)




Jeremy Sills
Tue Jan 6 14:08:56 EST 1998