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

  • SEARCH
  • Home
  • 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 7819113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T06:48:16+00:00 2026-06-02T06:48:16+00:00

If I have some base 10 or base 16 number, how do I change

  • 0

If I have some base 10 or base 16 number, how do I change it into base 232?

The reason I’m trying to do this, is for implementing BigInt as suggested by other members here Why to use higher base for implementing BigInt?

Will it be the same as integer (base 10) till 232? What will happen after it?

  • 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-06-02T06:48:19+00:00Added an answer on June 2, 2026 at 6:48 am

    You are trying to find something of the form

    a0 + a1 * (2^32) + a2 * (2^32)^2 + a3 * (2^32)^3 + ...
    

    which is exactly the definition of a base-232 system, so ignore all the people that told you that your question doesn’t make sense!

    Anyway, what you are describing is known as base conversion. There are quick ways and there are easy ways to solve this. The quick ways are very complicated (there are entire chapters of books dedicated to the subject), and I’m not going to attempt to address them here (not least because I’ve never attempted to use them).

    One easy way is to first implement two functions in your number system, multiplication and addition. (i.e. implement BigInt add(BigInt a, BigInt b) and BigInt mul(BigInt a, BigInt b)). Once you’ve solved that, you will notice that a base-10 number can be expressed as:

    b0 + b1 * 10 + b2 * 10^2 + b3 * 10^3 + ...
    

    which can also be written as:

    b0 + 10 * (b1 + 10 * (b2 + 10 * (b3 + ...
    

    so if you move left-to-right in your input string, you can peel off one base-10 digit at a time, and use your add and mul functions to accumulate into your BigInt:

    BigInt a = 0;
    for each digit b {
        a = add(mul(a, 10), b);
    }
    

    Disclaimer: This method is not computationally efficient, but it will at least get you started.

    Note: Converting from base-16 is much simpler, because 232 is an exact multiple of 16. So the conversion basically comes down to concatenating bits.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written some general functions to convert between decimal and any other base-n
I have some base class A , and some number of inherited classes: class
When I declare some base styles for my site I have used to do
I have a base and derived class. The base class constructors have some static
Lets say we have some basic AR model. class User < ActiveRecord::Base attr_accessible :firstname,
i have template base.html and some children templates. I don't know how to set
I have a Base Router where i define some functions that need to be
Assume some domain and view objects (that have no common base class) public class
I am writing some unit test and I have a unit testing base class
This is a biggie. I have a well-structured yet monolithic code base that has

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.