Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3216958
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:21:20+00:00 2026-05-17T15:21:20+00:00

I know base 13 is not practical. However, i was checking out The Hitchhiker’s

  • 0

I know base 13 is not practical. However, i was checking out The Hitchhiker’s Guide to the Galaxy again because todays date is 10/10/10 = 42 in binary. (you know, the answer to the ultimate question of life, the universe, and everything) It takes Deep Thought 7½ million years to compute and check the answer, which turns out to be 42. Unfortunately, The Ultimate Question itself is unknown. Anyways, he said “”Six by nine. Forty two.” “That’s it. That’s all there is.””I always thought something was fundamentally wrong with the universe”

My question is how is 6 x 9 in base 13 = 42?

I know how to convert base 10, 2,16,8 but going from base 10 to base 13 is a mystery to me.
I understand that in base 13 that 6 probably =6 and 9 probably =9 S0, it is just a matter of multiplying in base 13?

Can someone work it out?
I have found this but doesnt help much

in base 13, 6 13 × 9 13 is actually 4213 
(as 4 × 13 + 2 = 54, i.e. 54 in decimal is 
  equal to 42 expressed in base 13).
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:21:20+00:00Added an answer on May 17, 2026 at 3:21 pm

    This is a method that can convert a base-10 number to base-13:

    Start with a number 9×6=54, we want to find the equivalent of 54 in base 13.

    54 / 13 = 4 remainder 2
    4  / 13 = 0 remainder 4
    

    and we concatenate the remainders, from bottom-up, 42.

    A more general algorithm, start with a decimal number N, we want to find the equivalent of N in base B.

    N  / B = a1 remainder r1
    a1 / B = a2 remainder r2
    ....
    an / B = 0 remainder rn
    

    and concatenate the digits, bottom-up: rn . … . r2 . r1

    an iterative implementation in Python:

    digits = '0123456789abcdefghijklmnopqrstuvwxyz'
    def rebase(n, base=2):
        ''' Convert a positive integer to number string with base `base` '''
        s = []
        while n != 0:
            n, rem = divmod(n, base)
            s.append(digits[rem])
        return ''.join(reversed(s))
    

    a recursive implementation in Python:

    digits = '0123456789abcdefghijklmnopqrstuvwxyz'
    def rebase(n, base=2):
        ''' Convert a positive integer to number string with base `base` '''
        return rebase(n // base, base) + digits[n % base] if n != 0 else ''
    

    even more generally, if you have a string representing a number in base N and you want to convert it to a string representing the number in base M:

    digits = '0123456789abcdefghijklmnopqrstuvwxyz'
    def rebase(orig, orig_base=10, target_base=2):
        ''' Convert a positive integer to number string with base `base` '''
        num = 0
        for i, n in enumerate(reversed(orig)):
            num += digits.find(n) * (orig_base**i)
        target = []
        while num != 0:
            num, rem = divmod(num, target_base)
            target.append(digits[rem])
        return ''.join(reversed(target))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know what a virtual base class is and what it means.
I know it is a good practice to declare virtual destructors for base classes
I know that using continuous integration improves the quality of my code base, and
I know that calling a virtual method from a base class constructor can be
does anyone know a way to call a generic method of a base class
I want to know the runtime type of a base class pointer, I know
Is there an automatic way to add base classes to Linq2Sql entities? I know
I know its probably possible, but is it practical and doable to try and
I know its probably possible, but is it practical and doable to try and
Know of an OCAML/CAML IDE? Especially one that runs on Linux?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.