ee.Number.bitwiseXor

Calcula o XOR bit a bit dos valores de entrada.

UsoRetorna
Number.bitwiseXor(right)Número
ArgumentoTipoDetalhes
isso: leftNúmeroO valor à esquerda.
rightNúmeroO valor à direita.

Exemplos

Editor de código (JavaScript)

/**
 * Unsigned 8-bit type example.
 *
 * 25 as binary:         00011001
 * 21 as binary:         00010101
 * Only one digit is 1?: 00001100
 *
 * 00001100 is unsigned 8-bit binary for 12.
 */

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

Configuração do Python

Consulte a página Ambiente Python para informações sobre a API Python e como usar geemap para desenvolvimento interativo.

import ee
import geemap.core as geemap

Colab (Python)

"""Unsigned 8-bit type example.

25 as binary:         00011001
21 as binary:         00010101
Only one digit is 1?: 00001100

00001100 is unsigned 8-bit binary for 12.
"""

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