# Assignment 1: Base Conversion Examples

## Conversion 1: small number

Example conversion to 6 digits, base 9:

Value | div 9 | mod 9 |
---|---|---|

3486₁₀ | 387 | 3 |

387₁₀ | 43 | 0 |

43₁₀ | 4 | 7 |

4₁₀ | 0 | 4 |

0₁₀ | 0 | 0 |

0₁₀ | 0 | 0 |

So, the least-significant places of 3486₁₀ in base 9 are 0, 0, 4, 7, 0, 3.

## Conversion 2: large base

Example conversion to 4 digits, base 17:

Value | div 17 | mod 17 |
---|---|---|

15485636₁₀ | 910919 | 13 |

910919₁₀ | 53583 | 8 |

53583₁₀ | 3151 | 16 |

3151₁₀ | 185 | 6 |

So, the least-significant places of 15485636₁₀ in base 17 are 6, 16, 8, 13.

## Conversion 3: negative number

Example conversion to 6 digits, base 6:

Value | div 6 | mod 6 |
---|---|---|

-82₁₀ | -14 | 2 |

-14₁₀ | -3 | 4 |

-3₁₀ | -1 | 3 |

-1₁₀ | -1 | 5 |

-1₁₀ | -1 | 5 |

-1₁₀ | -1 | 5 |

So, the least-significant places of -82₁₀ in base 6 are 5, 5, 5, 3, 4, 2.

Updated Wed April 07 2021, 12:59 by ggbaker.