summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/scalc/01/04060120.xhp
blob: b5e805053a083e2896c2e0bdf79e620ad8313065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">

<!--
/*
 * Version: MPL 1.1 / GPLv3+ / LGPLv3+
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License or as specified alternatively below. You may obtain a copy of
 * the License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * Major Contributor(s):
 * [ Copyright (C) 2011 Wolfgang Pechlaner <libo@pechlaner.at> (initial developer) ]
 * [ Copyright (C) 2011 Noel Grandin <noel@peralex.com> (English translation)]
 *
 * All Rights Reserved.
 *
 * For minor contributions see the git repository.
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
 * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
 * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 * instead of those above.
 */  -->


<meta>
<topic id="textscalc0104060120xml" indexer="include">
<title id="tit" xml-lang="en-US">Bit Operation Functions</title>
<filename>/text/scalc/01/04060120.xhp</filename>
</topic>
</meta>
<body>
<h1 id="hd_id4149052">Bit Operation Functions</h1>
<section id="howtoget">
<embed href="text/scalc/00/00000404.xhp#eikama"/>
</section>
<sort order="asc" descendant="h2">
<section id="bitand">
<bookmark xml-lang="en-US" branch="index" id="bm_id4150026"><bookmark_value>BITAND function</bookmark_value>
</bookmark>
<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_BITAND" id="bm_id4145827" localize="false"/>
<h2 id="hd_id4150026">BITAND</h2>
<paragraph role="paragraph" id="par_id4146942" xml-lang="en-US"><ahelp hid="HID_FUNC_BITAND">Returns a bitwise logical "and" of the parameters.</ahelp></paragraph>
<embed href="text/scalc/00/avail_release.xhp#3.5"/>
<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
<paragraph role="code" id="par_id4146878" xml-lang="en-US">BITAND(number1; number2)</paragraph>
<paragraph role="paragraph" id="par_id4151228" xml-lang="en-US">
<emph>Number1</emph> and <emph>number2</emph> are positive integers less than 2 ^ 48 (281 474 976 710 656).</paragraph>
<embed href="text/scalc/01/common_func.xhp#sectionexample"/>
<paragraph role="paragraph" id="par_id4149246" xml-lang="en-US">
<item type="input">=BITAND(6;10)</item> returns 2 (0110 &amp; 1010 = 0010).</paragraph>
</section>
<section id="bitor">
<bookmark xml-lang="en-US" branch="index" id="bm_id4146139"><bookmark_value>BITOR function</bookmark_value>
</bookmark>
<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_BITOR" id="bm_id4148754" localize="false"/>
<h2 id="hd_id4146139">BITOR</h2>
<paragraph role="paragraph" id="par_id4150140" xml-lang="en-US"><ahelp hid="HID_FUNC_BITOR">Returns a bitwise logical "or" of the parameters.</ahelp></paragraph>
<embed href="text/scalc/00/avail_release.xhp#3.5"/>
<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
<paragraph role="code" id="par_id4148733" xml-lang="en-US">BITOR(number1; number2)</paragraph>
<paragraph role="paragraph" id="par_id4150864" xml-lang="en-US">
<emph>Number1</emph> and <emph>number2</emph> are positive integers less than 2 ^ 48 (281 474 976 710 656).</paragraph>
<paragraph role="paragraph" id="par_id4149884" xml-lang="en-US">
<item type="input">=BITOR(6;10)</item> returns 14  (0110 | 1010 = 1110).</paragraph>
</section>
<section id="bitxor">
<bookmark xml-lang="en-US" branch="index" id="bm_id4150019"><bookmark_value>BITXOR function</bookmark_value>
</bookmark>
<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_BITXOR" id="bm_id4154330" localize="false"/>
<h2 id="hd_id4150019">BITXOR</h2>
<paragraph role="paragraph" id="par_id4145246" xml-lang="en-US"><ahelp hid="HID_FUNC_BITXOR">Returns a bitwise logical "exclusive or" of the parameters.</ahelp></paragraph>
<embed href="text/scalc/00/avail_release.xhp#3.5"/>
<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
<paragraph role="code" id="par_id4157970" xml-lang="en-US">BITXOR(number1; number2)</paragraph>
<paragraph role="paragraph" id="par_id4145302" xml-lang="en-US">
<emph>Number1</emph> and <emph>number2</emph> are positive integers less than 2 ^ 48 (281 474 976 710 656).</paragraph>
<embed href="text/scalc/01/common_func.xhp#sectionexample"/>
<paragraph role="paragraph" id="par_id4149394" xml-lang="en-US">
<item type="input">=BITXOR(6;10)</item> returns  12 (0110 ^ 1010 = 1100)</paragraph>
</section>
<section id="bitlshift">
<bookmark xml-lang="en-US" branch="index" id="bm_id4155370"><bookmark_value>BITLSHIFT function</bookmark_value>
</bookmark>
<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_BITLSHIFT" id="bm_id4148593" localize="false"/>
<h2 id="hd_id4155370">BITLSHIFT</h2>
<paragraph role="paragraph" id="par_id4158411" xml-lang="en-US"><ahelp hid="HID_FUNC_BITLSHIFT">Shifts a number left by n bits.</ahelp></paragraph>
<embed href="text/scalc/00/avail_release.xhp#3.5"/>
<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
<paragraph role="code" id="par_id4147536" xml-lang="en-US">BITLSHIFT(number; shift)</paragraph>
<paragraph role="paragraph" id="par_id4150475" xml-lang="en-US">
<emph>Number</emph> is a positive integer less than 2 ^ 48 (281 474 976 710 656).</paragraph>
<paragraph role="paragraph" id="par_id4153921" xml-lang="en-US">
<emph>Shift</emph> is the number of positions the bits will be moved to the left. If shift is negative, it is synonymous with BITRSHIFT (number; -shift).</paragraph>
<embed href="text/scalc/01/common_func.xhp#sectionexample"/>
<paragraph role="paragraph" id="par_id4149819" xml-lang="en-US">
<item type="input">=BITLSHIFT(6;1)</item> returns 12 (0110 &lt;&lt; 1 = 1100).</paragraph>
</section>
<section id="bitrshift">
<bookmark xml-lang="en-US" branch="index" id="bm_id4083280"><bookmark_value>BITRSHIFT function</bookmark_value>
</bookmark>
<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_BITRSHIFT" id="bm_id4154312" localize="false"/>
<h2 id="hd_id4083280">BITRSHIFT</h2>
<paragraph role="paragraph" id="par_id4152482" xml-lang="en-US"><ahelp hid="HID_FUNC_BITRSHIFT">Shifts a number right by n bits.</ahelp></paragraph>
<embed href="text/scalc/00/avail_release.xhp#3.5"/>
<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
<paragraph role="code" id="par_id4145087" xml-lang="en-US">BITRSHIFT(number; shift)</paragraph>
<paragraph role="paragraph" id="par_id4149277" xml-lang="en-US">
<emph>Number</emph> is a positive integer less than 2 ^ 48 (281 474 976 710 656).</paragraph>
<paragraph role="paragraph" id="par_id4149270" xml-lang="en-US">
<emph>Shift</emph> is the number of positions the bits will be moved to the right. If shift is negative, it is synonymous with BITLSHIFT (number; -shift).</paragraph>
<embed href="text/scalc/01/common_func.xhp#sectionexample"/>
<paragraph role="paragraph" id="par_id4156130" xml-lang="en-US">
<item type="input">=BITRSHIFT(6;1)</item> returns 3 (0110 &gt;&gt; 1 = 0011).</paragraph>
</section>
</sort>
<section id="relatedtopics">
<embed href="text/scalc/01/04060100.xhp#drking"/>
</section>
</body>
</helpdocument>