[BACK]Return to bit.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts / builtin

File: [local] / OpenXM / src / asir-doc / parts / builtin / bit.texi (download)

Revision 1.1.1.1 (vendor branch), Wed Dec 8 05:47:44 1999 UTC (24 years, 6 months ago) by noro
Branch: NORO
CVS Tags: ASIR2000
Changes since 1.1: +0 -0 lines

Imported OpenXM/src/asir-doc. 

@node bit $B1i;;(B,,, $BAH$_9~$_H!?t(B
@section bit $B1i;;(B

@menu
* iand ior ixor::
* ishift::
@end menu

@node iand ior ixor,,, bit $B1i;;(B
@subsection @code{iand}, @code{ior}, @code{ixor}
@findex iand
@findex ior
@findex ixor

@table @t
@item iand(@var{i1},@var{i2})
:: bit $B$4$H$N(B and
@item ior(@var{i1},@var{i2})
:: bit $B$4$H$N(B or
@item ixor(@var{i1},@var{i2})
:: bit $B$4$H$N(B xor
@end table

@table @var
@item return
$B@0?t(B
@item i1,i2
$B@0?t(B
@end table

@itemize @bullet
@item
$B@0?t(B @var{i1}, @var{i2} $B$N@dBPCM$r(B bit $BNs$H$_$F1i;;$9$k(B. 
@item
$B0z?t$NId9f$OL5;k$7(B, $BHsIi$NCM$rJV$9(B. 
@end itemize

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

@table @t
@item $B;2>H(B
@fref{ishift}.
@end table

@node ishift,,, bit $B1i;;(B
@subsection @code{ishift}
@findex ishift

@table @t
@item ishift(@var{i},@var{count})
:: bit shift
@end table

@table @var
@item return
$B@0?t(B
@item i,count
$B@0?t(B
@end table

@itemize @bullet
@item
$B@0?t(B @var{i} $B$N@dBPCM$r(B bit $BNs$H$_$F(B shift $B$9$k(B. 
@item
@var{i} $B$NId9f$OL5;k$7(B, $BHsIi$NCM$rJV$9(B. 
@item
@var{count} $B$,@5$J$i$P1&(B shift, $BIi$J$i$P:8(B shift $B$r9T$&(B. 
@end itemize

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

@table @t
@item $B;2>H(B
@fref{iand ior ixor}.
@end table