Bitwise shift operation on a 128-bit number

后端 未结 5 709
礼貌的吻别
礼貌的吻别 2020-12-11 05:43

Lets say that I have an array of 4 32-bit integers which I use to store the 128-bit number

How can I perform left and right shift on this 128-bit number?

Tha

5条回答
  •  孤城傲影
    2020-12-11 06:32

    Instead of using a 128 bit number why not use a bitset? Using a bitset, you can adjust how big you want it to be. Plus you can perform quite a few operations on it.

    You can find more information on these here:

    http://www.cppreference.com/wiki/utility/bitset/start?do=backlink

提交回复
热议问题