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 環境頁面,瞭解 Python API 和如何使用 geemap 進行互動式開發。

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.
"""

display(ee.Number(25).bitwiseAnd(21))