[ << ] [ < ] [?] [ > ] [ >> ]         [??] [??] [???] [ ? ]

6.2 bit 演算


[ << ] [ < ] [?] [ > ] [ >> ]         [??] [??] [???] [ ? ]

6.2.1 iand, ior, ixor

iand(i1,i2)

:: bit ごとの and

ior(i1,i2)

:: bit ごとの or

ixor(i1,i2)

:: bit ごとの xor

return

整数

i1 i2

整数

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

ishift.


[ << ] [ < ] [?] [ > ] [ >> ]         [??] [??] [???] [ ? ]

6.2.2 ishift

ishift(i,count)

:: bit shift

return

整数

i count

整数

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

iand, ior, ixor.


[ << ] [ < ] [?] [ > ] [ >> ]

?????10? 17, 2017?texi2html 5.0????????????