Annotation of OpenXM/src/asir-doc/parts/builtin/bit.texi, Revision 1.1
1.1 ! noro 1: @node bit $B1i;;(B,,, $BAH$_9~$_H!?t(B
! 2: @section bit $B1i;;(B
! 3:
! 4: @menu
! 5: * iand ior ixor::
! 6: * ishift::
! 7: @end menu
! 8:
! 9: @node iand ior ixor,,, bit $B1i;;(B
! 10: @subsection @code{iand}, @code{ior}, @code{ixor}
! 11: @findex iand
! 12: @findex ior
! 13: @findex ixor
! 14:
! 15: @table @t
! 16: @item iand(@var{i1},@var{i2})
! 17: :: bit $B$4$H$N(B and
! 18: @item ior(@var{i1},@var{i2})
! 19: :: bit $B$4$H$N(B or
! 20: @item ixor(@var{i1},@var{i2})
! 21: :: bit $B$4$H$N(B xor
! 22: @end table
! 23:
! 24: @table @var
! 25: @item return
! 26: $B@0?t(B
! 27: @item i1,i2
! 28: $B@0?t(B
! 29: @end table
! 30:
! 31: @itemize @bullet
! 32: @item
! 33: $B@0?t(B @var{i1}, @var{i2} $B$N@dBPCM$r(B bit $BNs$H$_$F1i;;$9$k(B.
! 34: @item
! 35: $B0z?t$NId9f$OL5;k$7(B, $BHsIi$NCM$rJV$9(B.
! 36: @end itemize
! 37:
! 38: @example
! 39: [0] ctrl("hex",1);
! 40: 0x1
! 41: [1] iand(0xeeeeeeeeeeeeeeee,0x2984723234812312312);
! 42: 0x4622224802202202
! 43: [2] ior(0xa0a0a0a0a0a0a0a0,0xb0c0b0b0b0b0b0b);
! 44: 0xabacabababababab
! 45: [3] ixor(0xfffffffffff,0x234234234234);
! 46: 0x2cbdcbdcbdcb
! 47: @end example
! 48:
! 49: @table @t
! 50: @item $B;2>H(B
! 51: @fref{ishift}.
! 52: @end table
! 53:
! 54: @node ishift,,, bit $B1i;;(B
! 55: @subsection @code{ishift}
! 56: @findex ishift
! 57:
! 58: @table @t
! 59: @item ishift(@var{i},@var{count})
! 60: :: bit shift
! 61: @end table
! 62:
! 63: @table @var
! 64: @item return
! 65: $B@0?t(B
! 66: @item i,count
! 67: $B@0?t(B
! 68: @end table
! 69:
! 70: @itemize @bullet
! 71: @item
! 72: $B@0?t(B @var{i} $B$N@dBPCM$r(B bit $BNs$H$_$F(B shift $B$9$k(B.
! 73: @item
! 74: @var{i} $B$NId9f$OL5;k$7(B, $BHsIi$NCM$rJV$9(B.
! 75: @item
! 76: @var{count} $B$,@5$J$i$P1&(B shift, $BIi$J$i$P:8(B shift $B$r9T$&(B.
! 77: @end itemize
! 78:
! 79: @example
! 80: [0] ctrl("hex",1);
! 81: 0x1
! 82: [1] ishift(0x1000000,12);
! 83: 0x1000
! 84: [2] ishift(0x1000,-12);
! 85: 0x1000000
! 86: [3] ixor(0x1248,ishift(1,-16)-1);
! 87: @end example
! 88:
! 89: @table @t
! 90: @item $B;2>H(B
! 91: @fref{iand ior ixor}.
! 92: @end table
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>