Commit | Line | Data |
---|---|---|
970ed795 | 1 | <!-- |
d44e3c4f | 2 | Copyright (c) 2000-2016 Ericsson Telecom AB |
970ed795 EL |
3 | All rights reserved. This program and the accompanying materials |
4 | are made available under the terms of the Eclipse Public License v1.0 | |
5 | which accompanies this distribution, and is available at | |
6 | http://www.eclipse.org/legal/epl-v10.html | |
d44e3c4f | 7 | |
8 | Contributors: | |
9 | Baji, Laszlo | |
10 | Balasko, Jeno | |
11 | Farkas, Laszlo | |
12 | Szabados, Kristof | |
13 | --> | |
970ed795 EL |
14 | <html> |
15 | <head> | |
16 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
17 | <meta http-equiv="Content-Language" content="en-us"> | |
18 | <title>and4b</title> | |
19 | </head> | |
20 | <body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258"> | |
21 | <table align="left" border="0" cellspacing="0" cellpadding="0" valign=top> | |
22 | <tr> | |
23 | <td width=105 height=40><a href="https://projects.eclipse.org/projects/tools.titan"><img src="../images/titan_transparent.gif" border=0 width=105 height=40 align="left" alt="Titan"></a></td> | |
24 | </tr> | |
25 | </table> | |
26 | <table border="0" align="right" cellpadding="0" cellspacing="0"> | |
27 | <tr> | |
28 | <td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td> | |
29 | <td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td> | |
30 | <td><a href="and.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td> | |
31 | <td><a href="any.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td> | |
32 | </tr> | |
33 | </table> | |
34 | <p><br clear="all"> | |
35 | </p> | |
36 | <hr> | |
37 | <h1>and4b</h1> | |
38 | <hr align="left" width="75%"> | |
39 | <p>The keyword <b><font face="Courier New">and4b</font></b> belongs to the family of the bitwise operators operating on <font face="Courier New"><b>bitstring</b></font>s, <font face="Courier New"><b>hexstring</b></font>s | |
40 | or <font face="Courier New"><b>octetstring</b></font>s of equal length. It performs the following operation: for each corresponding bit position, the resulting value is a 1 if both bits are set to 1, | |
41 | otherwise the value for the resulting bit is 0.</p> | |
42 | <p>Related keywords:</p> | |
43 | <ul> | |
44 | <li><a href="bitstring.html"><b><font face="Courier New" color="#003258" size="4">bitstring</font></b></a></li> | |
45 | <li><a href="hexstring.html"><b><font face="Courier New" color="#003258" size="4">hexstring</font></b></a></li> | |
46 | <li><a href="octetstring.html"><b><font face="Courier New" color="#003258" size="4">octetstring</font></b></a></li> | |
47 | <li><a href="not4b.html"><b><font face="Courier New" color="#003258" size="4">not4b</font></b></a></li> | |
48 | <li><a href="or4b.html"><b><font face="Courier New" color="#003258" size="4">or4b</font></b></a></li> | |
49 | <li><a href="xor4b.html"><b><font face="Courier New" color="#003258" size="4">xor4b</font></b></a></li> | |
50 | </ul> | |
51 | <hr align="left" width="50%"> | |
52 | <div align="center"> | |
53 | <center> | |
54 | <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4"> | |
55 | <tr> | |
56 | <td width="100%"> | |
57 | <h3 align="center"><font face="Courier New" color="#003258" size="5"><b>and4b</b></font></h3> | |
58 | </td> | |
59 | </tr> | |
60 | </table> | |
61 | </center> | |
62 | </div> | |
63 | <hr align="left" width="50%"> | |
64 | <p>Example 1: | |
65 | <p><font face="Courier New">const bitstring c_forsta := '1001'B;</font> <br> | |
66 | <font face="Courier New">const bitstring c_andran := '0101'B; <br> | |
67 | var bitstring v_tredje := c_forsta and4b c_andran;</font> | |
68 | <p>The variable v_tredje will initially contain the value '0001'B.</p> | |
69 | <hr align="left" width="50%"> | |
70 | <p>Example 2: | |
71 | <p><font face="Courier New">const hexstring c_elso := 'B'H ; <br> | |
72 | const hexstring c_afro := '5'H; <br> | |
73 | var hexstring v_zold := c_elso and4b c_afro;</font> | |
74 | <p>The variable v_zold will initially contain the value '1'H.</p> | |
75 | <hr align="left" width="50%"> | |
76 | <p>Example 3: | |
77 | <p><font face="Courier New">const octstring c_eux := 'FB'O ; <br> | |
78 | const octstring c_les := '15'O; <br> | |
79 | var octstring v_ils := c_eux and4b c_les;</font> | |
80 | <p>The variable v_ils will initially contain the value '11'O.</p> | |
81 | <hr align="left" width="25%"> | |
82 | <hr align="left" width="25%"> | |
83 | <p><a HREF="BNF.html#bitandexpression">BNF definition</a> of <font face="Courier New">and4b</font></p> | |
84 | </body> | |
85 | </html> |