Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Hexadecimal Addition without int / Long conversion

843789Nov 20 2009 — edited Nov 22 2009
Hi all,

I am trying to add two numbers represented as strings, i.e., addition of two hexadecimal numbers. I am aware of the addition process where we convert the strings to number format (int / long) and add these two and convert the result back to Hex.

I do not want to use this process due to limitations in precision of int and long data-types. Is there any other way of adding these hex numbers? My line of thought forces me to consider the following process:

A)Hex to Binary ;
B)Binary Addition ;
C)Binary Result to Hex

Will this work or am I wrong?

All inputs are appreciated!!

Cheers,
krazy_koder

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 20 2009
Added on Nov 20 2009
16 comments
3,583 views