Skip to Main Content

Java Card

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!

Arithmetic operation

PixantLoNov 16 2010 — edited Nov 18 2010
Hello, these days i find a problem with this operations, and I don't find the way to solved it, I think the problem is that i can't use integers in Java Card.

I'm doing divisions with 2, and there's a moment that bits changs because carry I supose,

short temp = (short) (ofini/2);

I tryed to solve it doing that

short temp = (short) ((ofini/2) & 0xF7);

but it don't solve all the numbers i can use with "ofini"that goes to 0 - DD.

Is there any solution? If I solve it i would be able to finish my applet... XD
This post has been answered by Sebastien_Lorquet on Nov 16 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2010
Added on Nov 16 2010
10 comments
209 views