ee.Number.bitwiseNot

Tính toán phép toán NOT theo bit của đầu vào, trong kiểu số nguyên có dấu nhỏ nhất có thể chứa đầu vào.

Cách sử dụngGiá trị trả về
Number.bitwiseNot()Số
Đối sốLoạiThông tin chi tiết
this: inputSốGiá trị đầu vào.

Ví dụ

Trình soạn thảo mã (JavaScript)

/**
 * Unsigned 8-bit type example.
 *
 * 25 as binary:    00011001
 * Flip each digit: 11100110
 *
 * 11100110 is signed 8-bit binary for -26.
 * (binary interpreted using smallest signed integer type containing the input).
 */

print(ee.Number(25).bitwiseNot());

Thiết lập Python

Hãy xem trang Môi trường Python để biết thông tin về API Python và cách sử dụng geemap cho quá trình phát triển tương tác.

import ee
import geemap.core as geemap

Colab (Python)

"""Unsigned 8-bit type example.

25 as binary:    00011001
Flip each digit: 11100110

11100110 is signed 8-bit binary for -26.
(binary interpreted using smallest signed integer type containing the input).
"""

print(ee.Number(25).bitwiseNot().getInfo())