mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
80513aaf52
SConstruct edited just to leave group/files definitions close to the platform/groups. Doc content files mirroed to pt, to ease the portuguese version initial migration
132 lines
3.5 KiB
HTML
132 lines
3.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
|
|
<html><head>
|
|
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
|
|
<meta http-equiv="Content-Language" content="en-us"><title>Product</title>
|
|
|
|
<link rel="stylesheet" type="text/css" href="../style.css">
|
|
</head>
|
|
<body style="background-color: rgb(255, 255, 255);">
|
|
<h3><a name="over"></a>bit</h3>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="bnot"></a>Res = bit.bnot( value ): unary
|
|
negation
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="band"></a> Res = bit.band( v1, v2, ... ): <b>bitwise
|
|
</b>"and"
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="bor"></a> Res = bit.bor( v1, v2, ... ): <b>bitwise</b><b>
|
|
</b>"or"
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="bxor"></a> Res = bit.bxor( v1, v2, ... ): <b>bitwise</b><b>
|
|
</b>"exclusive or"
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="lshift"></a> Res = bit.lshift( value, pos ):
|
|
shift "value" left "pos" positions.
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="rshift"></a> Res = bit.rshift( value, pos ):
|
|
shift "value" right "pos" positions. The sign is
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
not propagated.
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="arshift"></a> Res = bit.arshift( value, pos ):
|
|
shift "value" right "pos" positions. The sign
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
is propagated ("arithmetic shift").
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="bit"></a> Res = bit.bit( bitno ): a shortcut for
|
|
bit.lshift( 1, bitno )
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="set"></a> Res1, Res2, ... = bit.set( bitno, v1,
|
|
v2, ... ): set the bit at position "bitno"
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
in v1, v2, ... to 1.
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="clear"></a> Res1, Res2, ... = bit.clear( bitno,
|
|
v1, v2, ... ): set the bit at position
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
"bitno"in v1, v2, ... to 0.
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="isset"></a> Res = bit.isset( value, bitno ):
|
|
returns true if bit at position "bitno" in
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
"value" is 1, false otherwise.
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;"><a name="isclear"></a> Res = bit.isclear( value, bitno ):
|
|
returns true if bit at position "bitno" in
|
|
</p>
|
|
<p class="MsoNormal" style="font-family: Verdana;">
|
|
"value" is 0, false otherwise.
|
|
</p>
|
|
<br style="font-family: Verdana;">
|
|
<br style="font-family: Verdana;">
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
</body></html> |