Announcement: All noncommercial projects registered to use Earth Engine beforeApril 15, 2025 mustverify noncommercial eligibility to maintain access. If you have not verified by September 26, 2025, your access may be on hold.

ee.Number.bitwiseOr

  • Number.bitwiseOr calculates the bitwise OR of two inputNumber values.

  • It returns a singleNumber value.

  • Both the left-hand and right-hand values must be of typeNumber.

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 usinggeemap for interactive development.

importeeimportgeemap.coreasgeemap

Colab (Python)

"""Unsigned 8-bit type example.25 as binary:    0001100121 as binary:    00010101Either digit 1?: 0001110100011101 is unsigned 8-bit binary for 29."""display(ee.Number(25).bitwiseOr(21))

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2023-10-06 UTC.