Bitwise OR calculator
Type a value into each operand field and the result updates as you type. Each field reads decimal, hexadecimal (0xFF), binary (0b10110010), and octal (0o377), and the two operands can use different bases. The result appears at once as unsigned decimal, hexadecimal, octal, and padded binary.
Setting flags
Bitwise OR is the standard way to combine binary flags. If you have a state variable, applying OR with a specific flag value forces that bit to 1 without altering the state of any other bits. A second OR with a different flag adds it to the same word without clearing the first.
Word size and signed output
Word size defaults to 32-bit and can be set to 8, 16, 64, or 128. Both operands are masked to that width before OR runs, so a value that does not fit wraps. Signed output reads the same bits as a signed integer. To apply a different operation to the same operands, use the full Bitwise Calculator.