modified hooks to remove trailing whitespaces for help files
[scilab.git] / scilab / modules / elementary_functions / help / ja_JP / bitwise / bitcmp.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  *
4  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
5  * Copyright (C) 2011 - DIGITEO - Michael Baudin
6  *
7  * Copyright (C) 2012 - 2016 - Scilab Enterprises
8  *
9  * This file is hereby licensed under the terms of the GNU GPL v2.0,
10  * pursuant to article 5.3.4 of the CeCILL v.2.1.
11  * This file was originally licensed under the terms of the CeCILL v2.1,
12  * and continues to be available under such terms.
13  * For more information, see the COPYING file which you should have received
14  * along with this program.
15  *
16  -->
17 <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="bitcmp" xml:lang="ja">
18     <refnamediv>
19         <refname>bitcmp</refname>
20         <refpurpose>ビット毎の補数</refpurpose>
21     </refnamediv>
22     <refsynopsisdiv>
23         <title>呼び出し手順</title>
24         <synopsis>
25             y = bitcmp(x)
26             y = bitcmp(x, bitnum)
27         </synopsis>
28     </refsynopsisdiv>
29     <refsection>
30         <title>パラメータ</title>
31         <variablelist>
32             <varlistentry>
33                 <term>x :</term>
34                 <listitem>
35                     <para>
36                         <literal>m</literal>行<literal>n</literal>列の行列(double)または
37                         <literal>m1</literal> x <literal>m2</literal>
38                         x ... x <literal>mm</literal> ハイパー行列(double)
39                         または符合なし整数(
40                         <literal>uint8</literal>, <literal>uint16</literal> または
41                         <literal>uint32</literal>)の
42                         <literal>m</literal>行<literal>n</literal>列行列.
43                         値は正の整数値である必要があります.
44                     </para>
45                 </listitem>
46             </varlistentry>
47             <varlistentry>
48                 <term>n :</term>
49                 <listitem>
50                     <para>
51                         <literal>m</literal>行<literal>n</literal>列の行列(double)または
52                         <literal>m1</literal> x <literal>m2</literal>
53                         x ... x <literal>mm</literal> ハイパー行列(double)
54                         または符合なし整数(
55                         <literal>uint8</literal>, <literal>uint16</literal> または
56                         <literal>uint32</literal>)の
57                         <literal>m</literal>行<literal>n</literal>列行列.
58                         入力<literal>n</literal>は 1,2,...,<literal>bitmax</literal>
59                         の範囲であることが必要です.
60                         ただし,<literal>bitmax</literal> は <varname>x</varname>
61                         の最大ビット数です.
62                         <varname>bitnum</varname>は,正の整数値である必要があります.
63                         <varname>bitnum</varname>のデフォルト値は
64                         <literal>bitmax</literal>です.
65                     </para>
66                 </listitem>
67             </varlistentry>
68             <varlistentry>
69                 <term>y :</term>
70                 <listitem>
71                     <para>
72                         <literal>m</literal>行<literal>n</literal>列の行列(double)または
73                         <literal>m1</literal> x <literal>m2</literal>
74                         x ... x <literal>mm</literal> ハイパー行列(double)
75                         または符合なし整数の
76                         <literal>m</literal>行<literal>n</literal>列行列.
77                     </para>
78                 </listitem>
79             </varlistentry>
80         </variablelist>
81     </refsection>
82     <refsection>
83         <title>説明</title>
84         <para>
85             符合なし整数<literal>x</literal>を指定すると, この関数は
86             <literal>x</literal>の2進数形式の補数を値とする
87             符合なし整数<varname>y</varname>を返します.
88         </para>
89         <para>
90             整数 <varname>bitnum</varname> は最大ビット数を指定します.
91         </para>
92         <para>
93             <literal>x</literal>の2進数表現のビット数が<literal>bitmax</literal>
94             の値 (8, 16 または 32)
95             よりも小さい場合, <literal>bitmax</literal>ビット
96             (8, 16 または 32)の補数とするために
97             ビット '1' がこの補数に付加されます.
98         </para>
99         <para>
100             入力引数が1つのみの場合,
101             <varname>x</varname> は符号無し整数の行列とする必要があります.
102         </para>
103     </refsection>
104     <refsection>
105         <title>例</title>
106         <programlisting role="example"><![CDATA[
107 // 13 is (1101)_2
108 // We insert zeros in the begining to get a 8-bit number:
109 // (00001101)_2
110 // The 8-bits complement is then (11110010)_2
111 // which is 242
112 bitcmp(13,8)
113 expected = 242
114 // The input argument can be an unsigned int
115 bitcmp(uint8(99),8)
116 expected = 156
117    ]]></programlisting>
118     </refsection>
119 </refentry>