Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 679 Bytes

File metadata and controls

32 lines (25 loc) · 679 Bytes
layout api-command
language Java
permalink api/java/bit_or/
command bitOr
related_commands
bit_and bit_not bit_sal bit_sar bit_xor
bit_and/
bit_not/
bit_sal/
bit_sar/
bit_xor/

Command syntax

{% apibody %} r.bitOr(number) → number r.bitOr(number[, number, ...]) → number {% endapibody %}

Description

A bitwise OR is a binary operation that takes two bit patterns of equal length and performs the logical inclusive OR operation on each pair of corresponding bits. The result in each position is 0 if both bits are 0, while otherwise the result is 1.

Example:

r.expr(5).bitOr(3).run(conn);

// Result:
7