How to create library for 128bit integer or 256 bit integers in C++? [closed]

  128-bit, c++, int128

I was trying to create a library that does operations on 128bit or 256bit integers in C++. I don’t want to use the bignum libraries available.

I was thinking if it is possible to use 4 blocks of 32 bit integers or 8 blocks of 32 bit integers to define a 128bit or 256 bit integers respectively. But I am not sure how to do it. Any help would be welcome.

Will this process help doing arithmetic operations?

I believe this kind of questions have been asked a lot. But I haven’t found a suitable answer.

Any other way of defining 128bit or 256bit would be helpful. Thanks a lot.

Source: Windows Questions C++

LEAVE A COMMENT