ee.Number.bitwiseAnd

入力値のビット単位の AND を計算します。

用途戻り値
Number.bitwiseAnd(right)数値
引数タイプ詳細
これ: left数値左側の値。
right数値右側の値。

コードエディタ(JavaScript)

/**
 * Unsigned 8-bit type example.
 *
 * 25 as binary:   00011001
 * 21 as binary:   00010101
 * Both digits 1?: 00010001
 *
 * 00010001 is unsigned 8-bit binary for 17.
 */

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

Python の設定

Python API とインタラクティブな開発での geemap の使用については、 Python 環境のページをご覧ください。

import ee
import geemap.core as geemap

Colab(Python)

"""Unsigned 8-bit type example.

25 as binary:   00011001
21 as binary:   00010101
Both digits 1?: 00010001

00010001 is unsigned 8-bit binary for 17.
"""

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