ee.Number.bitwiseOr

Calculates the bitwise OR of the input values.

UsageReturns
Number.bitwiseOr(right)Number
ArgumentTypeDetails
this: leftNumberThe left-hand value.
rightNumberThe right-hand value.

Examples

Code Editor (JavaScript)

/**
 * Unsigned 8-bit type example.
 *
 * 25 as binary:    00011001
 * 21 as binary:    00010101
 * Either digit 1?: 00011101
 *
 * 00011101 is unsigned 8-bit binary for 29.
 */

print(ee.Number(25).bitwiseOr(21));

Python setup

See the Python Environment page for information on the Python API and using geemap for interactive development.

import ee
import geemap.core as geemap

Colab (Python)

"""Unsigned 8-bit type example.

25 as binary:    00011001
21 as binary:    00010101
Either digit 1?: 00011101

00011101 is unsigned 8-bit binary for 29.
"""

print(ee.Number(25).bitwiseOr(21).getInfo())