A collection of common and useful bitwise operations To multiply by 2 power x i = i << x To set a bit in an integer: number |= 1 << x; To clear a bit in an integer: number |= ~(1 << x); To toggle a bit in an integer: number ^= 1 << x; [...]
-
Recent Posts
- Useful and Common bitwise operations in C
- Interview Screening Question
- ASP.NET MVC Model Binding Form Inputs To Action Parameters
- Notes on MVC routes mapping
- Things I’d love to learn more about
- "Remember Me" Doesn’t work in ASP.NET
- Regex Inverse Matching
- On Defensive Programming
- Getting Around Dynamic Casting To Achieve Better Design And Performance
- Parsing SQL Statements With Regex
Archives
Blogroll
-
Blog Stats
- 5,701 hits