A fast C program to invert actual bits of a number. Example:
| Number | Binary representation | Inverted Binary representation |
|---|---|---|
| 0 | 00000000000000000000000000000000 | 11111111111111111111111111111111 |
| 34 | 00000000000000000000000000100010 | 00000000000000000000000000011101 |
| 64 | 00000000000000000000000001000000 | 00000000000000000000000000111111 |
| 127 | 00000000000000000000000001111111 | 00000000000000000000000000000000 |
| 9 | 00000000000000000000000000001001 | 00000000000000000000000000000110 |
| 288 | 00000000000000000000000100100000 | 00000000000000000000000011011111 |
| 365 | 00000000000000000000000101101101 | 00000000000000000000000010010010 |
| 56356 | 00000000000000001101110000100100 | 00000000000000000010001111011011 |
| -2 | 11111111111111111111111111111110 | 00000000000000000000000000000001 |
- Fork it ( https://github.com/rafamdr/invert_bits/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Please refer to the COPYING.md and LICENSE.md file.