CPKit
v1.6.1

Bitwise Playground

BitsEasy

Analyze logical AND, OR, XOR, NOT, and shift operations in decimal, hexadecimal, and binary configurations.

Alt+Shift+P

Configuration Panel

Bitwise Operations Matrix

OperationDecimalHexadecimalBinary (32-bit blocks)
Value A120x0000000C00000000 00000000 00000000 00001100
Value B50x0000000500000000 00000000 00000000 00000101
A & B (AND)40x0000000400000000 00000000 00000000 00000100
A | B (OR)130x0000000D00000000 00000000 00000000 00001101
A ^ B (XOR)90x0000000900000000 00000000 00000000 00001001
~A (NOT A)-130xFFFFFFF311111111 11111111 11111111 11110011
A << 1 (LShift)240x0000001800000000 00000000 00000000 00011000
A >> 1 (RShift)60x0000000600000000 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