Are 'addition' and 'bitwise or' the same in this case?

后端 未结 6 813
醉酒成梦
醉酒成梦 2020-12-16 11:45

Say I have four 32-bit numbers, defined so that their bits don\'t overlap, i.e.

unsigned long int num0 = 0xFF000000;
unsigned long int num1 = 0x00FF0000;
uns         


        
6条回答
  •  猫巷女王i
    2020-12-16 12:36

    Addition and bit-wise or would be the same as bit-wise or would include any bits in either, and normal addition would do exactly the same given the mutually exclusive nature of your bits.

提交回复
热议问题