Bitwise Playground
BitsEasyAnalyze logical AND, OR, XOR, NOT, and shift operations in decimal, hexadecimal, and binary configurations.
Alt+Shift+P
Configuration Panel
Bitwise Operations Matrix
| Operation | Decimal | Hexadecimal | Binary (32-bit blocks) |
|---|---|---|---|
| Value A | 12 | 0x0000000C | 00000000 00000000 00000000 00001100 |
| Value B | 5 | 0x00000005 | 00000000 00000000 00000000 00000101 |
| A & B (AND) | 4 | 0x00000004 | 00000000 00000000 00000000 00000100 |
| A | B (OR) | 13 | 0x0000000D | 00000000 00000000 00000000 00001101 |
| A ^ B (XOR) | 9 | 0x00000009 | 00000000 00000000 00000000 00001001 |
| ~A (NOT A) | -13 | 0xFFFFFFF3 | 11111111 11111111 11111111 11110011 |
| A << 1 (LShift) | 24 | 0x00000018 | 00000000 00000000 00000000 00011000 |
| A >> 1 (RShift) | 6 | 0x00000006 | 00000000 00000000 00000000 00000110 |
Complexity Indices
Time ComplexityO(1)
Auxiliary SpaceO(1)
Conceptual Overview
Bitwise operators perform calculations directly on the binary digit representation (bits) of integers. They are extremely fast operations CPU-wise.
Source: CP-Algorithms reference guide