I need to flip the bits in an integer from 1 to 0 and 0 to 1. E.g 10010 to 01101 The problem is that in HLSL ps_3_0 there are no binary operators. No ~, <<, >>,... Is there a mathematical way of accomplishing this?
相关问题
- Index of single bit in long integer (in C) [duplic
- How to find the distance between a point and a par
- Can I reinterpret_cast the parameter of a constexp
- Pix, A couple of issues I'm not understanding
- Bit shifting and bit mask - sample code
相关文章
- Rounded division by power of 2
- Compact a hex number
- One function with different arguments to push cert
- Unpacking a bitfield (Inverse of movmskb)
- Fastest way to count consecutive 1 bits. C++
- Create method which checks if x + y will overflow
- Bit manipulation, permutate bits
- Can the xor-swap be extended to more than two vari
You can use the following solution
otherwise: