Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

$ZBITXOR (従来の関数)

ビット文字列関数 – XOR

Synopsis

$ZBITXOR(bitstring1,bitstring2)

概要

ここでは、従来の関数である $ZBITXOR について説明します。ここでは、従来のアプリケーションとの互換性について説明します。

$ZBITXOR は、(bitstring1 XOR bitstring2) 演算によって形成されるビット文字列を返します。得られたビット文字列の長さは、2 つのビット文字列の短い方と同じ長さになります。

以下の表は、2 つのビット (b1 と b2) で XOR 演算を実行することによって得られる 4 種類の結果を示しています。

b1 b2 結果
0 0 0
0 1 1
1 0 1
1 1 0

bitstring 1=[0,0,1,1,0] および bitstring 2=[0,1,1,0] の場合、$ZBITXOR の結果は [0,1,0,1] になります。つまり、

Position 1: 0 XOR 0 = 0

Position 2: 0 XOR 1 = 1

Position 3: 1 XOR 1 = 0

Position 4: 1 XOR 0 = 1

Position 5: 0 XOR null = null

関連項目

FeedbackOpens in a new tab