added japanese translation of uicontrol/2.
[scilab.git] / scilab / modules / elementary_functions / help / ja_JP / bitwise / bitget.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4  * 
5  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
6  * Copyright (C) 2011 - DIGITEO - Michael Baudin
7  * 
8  * This file must be used under the terms of the CeCILL.
9  * This source file is licensed as described in the file COPYING, which
10  * you should have received as part of this distribution.  The terms
11  * are also available at    
12  * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
13  * 
14  -->
15
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="bitget" xml:lang="ja">
17     
18     <refnamediv>
19         
20         <refname>bitget</refname>
21         
22         <refpurpose>指定した位置のビットを取得</refpurpose>
23         
24     </refnamediv>
25     
26     <refsynopsisdiv>
27         
28         <title>呼び出し手順</title>
29         
30         <synopsis>
31             
32             y = bitget(x,pos)
33             
34         </synopsis>
35         
36     </refsynopsisdiv>
37     
38     <refsection>
39         
40         <title>パラメータ</title>
41         
42         <variablelist>
43             
44             <varlistentry>
45                 
46                 <term>x :</term>
47                 
48                 <listitem>
49                     
50                     <para>
51                         
52                         <literal>m</literal>行<literal>n</literal>列の行列(double)または
53                         
54                         <literal>m1</literal> x <literal>m2</literal> 
55                         
56                         x ... x <literal>mm</literal> ハイパー行列(double)
57                         
58                         または符合なし整数(
59                         
60                         <literal>uint8</literal>, <literal>uint16</literal> または
61                         
62                         <literal>uint32</literal>)の
63                         
64                         <literal>m</literal>行<literal>n</literal>列行列.
65                         
66                         値は正の整数値である必要があります.
67                         
68                     </para>
69                     
70                 </listitem>
71                 
72             </varlistentry>
73             
74             <varlistentry>
75                 
76                 <term>pos :</term>
77                 
78                 <listitem>
79                     
80                     <para>
81                         
82                         <literal>m</literal>行<literal>n</literal>列の行列(double)または
83                         
84                         <literal>m1</literal> x <literal>m2</literal> 
85                         
86                         x ... x <literal>mm</literal> ハイパー行列(double)
87                         
88                         または符合なし整数(
89                         
90                         <literal>uint8</literal>, <literal>uint16</literal> または
91                         
92                         <literal>uint32</literal>)の
93                         
94                         <literal>m</literal>行<literal>n</literal>列行列.
95                         
96                         入力 <varname>pos</varname> は 1,2,...,<literal>bitmax</literal>
97                         
98                         の範囲とする
99                         
100                         必要があります.ただし, <literal>bitmax</literal> は <varname>x</varname>
101                         
102                         の最大ビット数です.
103                         
104                         値は正の整数値である必要があります.
105                         
106                     </para>
107                     
108                 </listitem>
109                 
110             </varlistentry>
111             
112             <varlistentry>
113                 
114                 <term>y :</term>
115                 
116                 <listitem>
117                     
118                     <para>
119                         
120                         <literal>m</literal>行<literal>n</literal>列の行列(double)または
121                         
122                         <literal>m1</literal> x <literal>m2</literal> 
123                         
124                         x ... x <literal>mm</literal> ハイパー行列(double)
125                         
126                         または符合なし整数の
127                         
128                         <literal>m</literal>行<literal>n</literal>列行列.
129                         
130                     </para>
131                     
132                 </listitem>
133                 
134             </varlistentry>
135             
136         </variablelist>
137         
138     </refsection>
139     
140     <refsection>
141         
142         <title>説明</title>
143         
144         <para>
145             
146             符合なし整数<varname>x</varname>を指定すると, この関数は
147             
148             <varname>x</varname>の二進数表現の
149             
150             <varname>pos</varname> 番目のビットを
151             
152             符合なし整数<varname>y</varname>(<literal>0</literal>
153             
154             または<literal>1</literal> )として返します.
155             
156         </para>
157         
158     </refsection>
159     
160     <refsection>
161         
162         <title>例</title>
163         
164         <programlisting role="example"><![CDATA[
165 // 19 is (10011)_2
166 // The 2nd bit is 1 (starting from the end).
167 x=uint8(19);
168 pos=2;
169 y = bitget(x,pos)
170 expected = 1;
171
172 // 13 is (1101)_2
173 dec2bin(13)
174 bitget(uint8(13),4:-1:1)
175
176 // The input x can be a positive double
177 bitget(13,4:-1:1)
178    ]]></programlisting>
179         
180     </refsection>
181     
182 </refentry>
183