ttcalc/help/bitwise_functions.html

50 lines
1.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>TTCalc - bitwise functions</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="Keyword" value="bitand">
<param name="Keyword" value="bitor">
<param name="Keyword" value="bitxor">
<param name="Keyword" value="band">
<param name="Keyword" value="bor">
<param name="Keyword" value="bxor">
<param name="Keyword" value="bitwise functions">
</object>
</head>
<body>
<h1>Bitwise functions</h1>
<p>
There are bitwise functions in the program but they can operate only on non-negative values.
We don't define the BitNot() function too.
</p>
<dl>
<dt>bitand(x ; y) or band(x ; y)</dt>
<dd>Bitwise AND. For example:<br>
bitand(6; 2) = bitand(&amp;110 ; &amp;10) = &amp;10 = 2<br>
bitand(6.5; 2.5) = bitand(&amp;110.1 ; &amp;10.1) = &amp;10.1 = 2.5</dd>
<dt>bitor(x ; y) or bor(x ; y)</dt>
<dd>Bitwise OR. For example:<br>
bitor(6; 1) = bitor(&amp;110 ; &amp;1) = &amp;111 = 7<br>
bitor(6.5; 1.5) = bitor(&amp;110.1 ; &amp;1.1) = &amp;111.1 = 7.5</dd>
<dt>bitxor(x ; y) or bxor(x ; y)</dt>
<dd>Bitwise XOR. For example:<br>
bitxor(6; 3) = bitxor(&amp;110 ; &amp;11) = &amp;101 = 5<br>
bitxor(6.5; 3.5) = bitxor(&amp;110.1 ; &amp;11.1) = &amp;101.0 = 5</dd>
</dl>
</body>
</html>