1. What is Bit Manipulation
Bit Manipulation is the acto of algorithmically manipulating bits or other pieces of data shorter than a word. Computer programming task that require bit manipulation include low-level device control, error detection and correction algorithms, data compression, encryption algorithms, and optimization.
For most other task, modern programming languages allow the programmer to work directly with abstractions instead of bits that represent those abstractions. Source code that does bit manipulation makes use of the bitwise operations : AND, OR, XOR, NOT.
2. Bitwise Operator
Operator | Example |
& Binary AND | (a & b) |
| Binary OR | (a | b) |
^ Binary XOR | (a ^ b) |
~ Binary Ones Compelment | (~a) |
https://en.wikipedia.org/wiki/Bit_manipulation
'Programming > Algorithm' 카테고리의 다른 글
DFS (0) | 2022.07.23 |
---|---|
Tree Traversal (0) | 2022.07.23 |
Dynamic Programming (0) | 2022.07.06 |
Sliding Window Algorithms (0) | 2022.03.31 |
Bruth Force Algorithm (0) | 2022.03.31 |