ee.Number.bitwiseXor

Calcule le XOR bit à bit des valeurs d'entrée.

UtilisationRenvoie
Number.bitwiseXor(right)Nombre
ArgumentTypeDétails
ceci : leftNombreValeur de gauche.
rightNombreValeur de droite.

Exemples

Éditeur de code (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));

Configuration de Python

Consultez la page Environnement Python pour en savoir plus sur l'API Python et sur l'utilisation de geemap pour le développement interactif.

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())