This is part of the HicEst documentation
IOR: Bitwise Logical OR
The inclusive IOR function is used to set the result bit when either one bit of its 2 arguments is set.
⇾Home
⇾Contents
⇾more Programming
⇾ Examples
Bookmarks:
⇾set_bit
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
result = IOR( 1, 4 ) ! result is 5:
1 == 0000000000000000000000000000000000000000000000000000000000000001
4 == 0000000000000000000000000000000000000000000000000000000000000100
5 == 0000000000000000000000000000000000000000000000000000000000000101
precision is a normalized 53-bit fraction of the 8-byte IEEE T_floating format
to
test bit n
:
result =
IAND
(argument, 2^n) /= 0
! with n = 0 ... 53
bit3set =
IAND
( bits0and2, 2^3)
! evaluates to 0
to
clear bit n
:
result =
IAND
(argument,
NOT
(2^n))
! with n = 0 ... 53
clearbit0 =
IAND
( bits0and2,
NOT
(2^0) )
! evaluates to 4
to
toggle bits
of argument:
result =
NOT
( argument )
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
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.