Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I represent a 128bit integer in Java or C++? [closed]

Is it possible to have a 128bit integer in Java or C++?

like image 930
dato datuashvili Avatar asked Jun 28 '10 12:06

dato datuashvili


1 Answers

Of course you can represent them.

At least you can use a byte-array with 16 elements.

However, the question is if you just want to represent the value or actually do some calculations with it.

In Java you can use BigInteger to represent (effectively) arbitrary sized integer values and do calculations as well.

like image 182
Joachim Sauer Avatar answered Sep 28 '22 16:09

Joachim Sauer