Bitwise operations implementation
Add debug option