[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2 Bit operations


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.1 iand, ior, ixor

iand(i1,i2)

:: bitwise and

ior(i1,i2)

:: bitwise or

ixor(i1,i2)

:: bitwise xor

return

integer

i1 i2

integer

[0] ctrl("hex",1);
0x1
[1] iand(0xeeeeeeeeeeeeeeee,0x2984723234812312312);
0x4622224802202202
[2] ior(0xa0a0a0a0a0a0a0a0,0xb0c0b0b0b0b0b0b);
0xabacabababababab
[3] ixor(0xfffffffffff,0x234234234234);
0x2cbdcbdcbdcb
References

ishift.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6.2.2 ishift

ishift(i,count)

:: bit shift

return

integer

i count

integer

[0] ctrl("hex",1);
0x1
[1] ishift(0x1000000,12); 
0x1000
[2] ishift(0x1000,-12);   
0x1000000
[3] ixor(0x1248,ishift(1,-16)-1);
References

iand, ior, ixor.


[ << ] [ < ] [ Up ] [ > ] [ >> ]

This document was generated on October 21, 2017 using texi2html 5.0.