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 Stay organized with collections Save and categorize content based on your preferences.
Page Summary
Number.bitwiseOrcalculates the bitwise OR of two inputNumbervalues.It returns a single
Numbervalue.Both the left-hand and right-hand values must be of type
Number.
| Usage | Returns |
|---|---|
Number.bitwiseOr(right) | Number |
| Argument | Type | Details |
|---|---|---|
this:left | Number | The left-hand value. |
right | Number | The 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.