c_op_bit.htm
来自「Delphi脚本控件」· HTM 代码 · 共 213 行
HTM
213 行
<html>
<head>
<link rel=stylesheet type="text/css" href="styles.css">
</head>
<body>
<H1>
paxC Bitwise Operators
</H1>
<table border="1">
<tr>
<th>Language Element</th>
<th>Short Description</th>
</tr>
<tr>
<td><a href="#Bitwise AND Operator (&)"><b>Bitwise AND Operator (&)</b></a></td>
<td>Performs a bitwise AND on two expressions.</td>
</tr>
<tr>
<td><a href="#Bitwise Left Shift Operator (<<)"><b>Bitwise Left Shift Operator (<<)</b></a></td>
<td>Left shifts the bits of an expression.</td>
</tr>
<tr>
<td><a href="#Bitwise NOT Operator (~)"><b>Bitwise NOT Operator (~)</b></a></td>
<td>Performs a bitwise NOT (negation) on an expression.</td>
</tr>
<tr>
<td><a href="#Bitwise OR Operator (|)"><b>Bitwise OR Operator (|)</b></a></td>
<td>Performs a bitwise OR on two expressions.</td>
</tr>
<tr>
<td><a href="#Bitwise Right Shift Operator (>>)"><b>Bitwise Right Shift Operator (>>)</b></a></td>
<td>Right shifts the bits of an expression.</td>
</tr>
<tr>
<td><a href="#Bitwise Unsigned Right Shift Operator (>>>)"><b>Bitwise Unsigned Right Shift Operator (>>>)</b></a></td>
<td>Right shifts the bits of an expression, without maintaining sign.</td>
</tr>
<tr>
<td><a href="#Bitwise XOR Operator (^)"><b>Bitwise XOR Operator (^)</b></a></td>
<td>Performs a bitwise exclusive OR on two expressions.</td>
</tr>
</table>
<a name="Bitwise AND Operator (&)"><h3>Bitwise AND Operator (&)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a bitwise AND on two expressions.
<pre>
result = expression1 & expression2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression1, expression2</i>
<blockquote>
Any expressions.
</blockquote>
</blockquote>
The & operator looks at the binary representation of the values of two expressions and does a bitwise AND operation on them. If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Bitwise Left Shift Operator (<<)"><h3>Bitwise Left Shift Operator (<<)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Left shifts the bits of an expression.
<pre>
result = expression1 << expression2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression1, expression2</i>
<blockquote>
Any expressions.
</blockquote>
</blockquote>
The << operator looks at the binary representation of the values of two expressions and does a bitwise left shift operation on them. If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Bitwise NOT Operator (~)"><h3>Bitwise NOT Operator (~)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a bitwise NOT (negation) on an expression.
<pre>
result = ~ expression
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression</i>
<blockquote>
Any expressions.
</blockquote>
</blockquote>
The ~ operator looks at the binary representation of the values of <font color="black"><i>expression</i></font> and does a bitwise not operation on it. If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Bitwise OR Operator (|)"><h3>Bitwise OR Operator (|)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a bitwise OR on two expressions.
<pre>
result = expression1 | expression2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression1, expression2</i>
<blockquote>
Any expressions.
</blockquote>
</blockquote>
The | operator looks at the binary representation of the values of two expressions and does a bitwise AND operation on them. If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Bitwise Right Shift Operator (>>)"><h3>Bitwise Right Shift Operator (>>)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Right shifts the bits of an expression.
<pre>
result = expression1 >> expression2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression1, expression2</i>
<blockquote>
Any expressions.
</blockquote>
</blockquote>
The >> operator looks at the binary representation of the values of two expressions and does a bitwise right shift operation on them. If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<a name="Bitwise Unsigned Right Shift Operator (>>>)"><h3>Bitwise Unsigned Right Shift Operator (>>>)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Right shifts the bits of an expression, without maintaining sign.
<pre>
result = expression1 >>> expression2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>expression1, expression2</i>
<blockquote>
Any expressions.
</blockquote>
</blockquote>
The >>> operator looks at the binary representation of the values of two expressions and does a bitwise right shift operation on them, without maintaining sign. If one or both expressions are Null expressions, result is Null.
</blockquote>
<a name="Bitwise XOR Operator (^)"><h3>Bitwise XOR Operator (^)</h3></a>
<!-------------------------------------------------------------------->
<blockquote>
Performs a bitwise exclusive OR on two expressions.
<pre>
result = expression1 ^ expression2
</pre>
<H4>
Arguments
</H4>
<blockquote>
<i>result</i>
<blockquote>
Any variable.
</blockquote>
</blockquote>
<blockquote>
<i>expression1, expression2</i>
<blockquote>
Any expressions.
</blockquote>
</blockquote>
The ^ operator looks at the binary representation of the values of two expressions and does a bitwise exclusive OR operation on them. If one or both expressions are Null expressions, <font color="black"><i>result</i></font> is Null.
</blockquote>
<p>
<HR>
<font size = 1 color ="gray">
Copyright © 1999-2005
VIRT Laboratory. All rights reserved.
</font>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?