We help IT Professionals succeed at work.
Get Started

how to convert an 128 bit binary number to decimal number

yuy2002 asked
Last Modified: 2011-10-03
What I want, how to convert below 128 bit number to deciaml number
"0xFF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF" to "255^16+255^15+....+255^2+255".
I plan to write a new class to save this so large number, like this
class NUM128
 public: ...
         unsigned char numbinary[16];
         unsigned char numdecimal[6];

I use numbinary to save the binary number and numdecimal save the decimal number.
for(int i=0;i<16;i++)
    numbinary[i]= 0xFF;
How could I get the numdecimal according to the numbinary?
Anyone has any idea will be welcome and appreciated.
Watch Question
This problem has been solved!
Unlock 1 Answer and 12 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE