This is part of the HicEst documentation
IEOR: Bitwise Logical Exclusive OR
The exclusive IEOR function is used to set the result bit when the bits of its 2 arguments are different, otherwise the bit is zero.
⇾Home
⇾Contents
⇾more Programming
⇾ Examples
Bookmarks:
⇾bitwise_either-or
to
bitwise_either-or
x and y:
result = IEOR( x, y )
the bit-by-bit result-bit is 1 if x-bit and y-bit differ, and is 0 if x-bit and y-bit are equal:
result = IEOR( 3, 10 )
! result is 9:
3 == 0000000000000000000000000000000000000000000000000000000000000011
10 == 0000000000000000000000000000000000000000000000000000000000001010
9 == 0000000000000000000000000000000000000000000000000000000000001001
precision is a normalized 53-bit fraction of the 8-byte IEEE T_floating format
IOR
to
set bit
n:
result =
IOR
(argument, 2^n)
! with n = 0 ... 53
bits0and2 =
IOR
(2^0, 2^2)
! is set to 1 + 4 = 5
IAND
to
test bit n
:
result =
IAND
(argument, 2^n) /= 0
! with n = 0 ... 53
bit3set =
IAND
( bits0and2, 2^3)
! evaluates to 0
NOT
to
toggle bits
of argument:
result =
NOT
( argument )
IAND
to
clear bit n
:
result =
IAND
(argument,
NOT
(2^n))
! with n = 0 ... 53
clearbit0 =
IAND
( bits0and2,
NOT
(2^0) )
! evaluates to 4
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.