<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.math.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.decbin.php',
    1 => 'decbin',
    2 => 'Wandelt von dezimal zu bin&auml;r um',
  ),
  'up' => 
  array (
    0 => 'ref.math.php',
    1 => 'Mathematische Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.cosh.php',
    1 => 'cosh',
  ),
  'next' => 
  array (
    0 => 'function.dechex.php',
    1 => 'dechex',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/math/functions/decbin.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.decbin" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">decbin</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">decbin</span> &mdash; <span class="dc-title">Wandelt von dezimal zu binär um</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.decbin-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>decbin</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$num</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Gibt die binäre Darstellung der in <code class="parameter">num</code> angegebenen
   Ganzzahl als Zeichenkette zurück.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.decbin-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">num</code></dt>
     <dd>
      <p class="para">
       Der umzuwandelnde Dezimalwert.
      </p>
      <table class="doctable table">
       <caption><strong>Wertebereich der Eingabe unter 32bit-Systemen</strong></caption>
       
        <col />
        <col />
        <col />
        <thead>
         <tr>
          <th>positive <code class="parameter">num</code></th>
          <th>negative <code class="parameter">num</code></th>
          <th>Rückgabewert</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>0</td>
          <td class="empty">&nbsp;</td>
          <td>0</td>
         </tr>

         <tr>
          <td>1</td>
          <td class="empty">&nbsp;</td>
          <td>1</td>
         </tr>

         <tr>
          <td>2</td>
          <td class="empty">&nbsp;</td>
          <td>10</td>
         </tr>

         <tr>
          <td colspan="3">... weiterer Verlauf ...</td>
         </tr>

         <tr>
          <td>2147483646</td>
          <td class="empty">&nbsp;</td>
          <td>1111111111111111111111111111110</td>
         </tr>

         <tr>
          <td>2147483647 (größte vorzeichenbehaftete Ganzzahl)</td>
          <td class="empty">&nbsp;</td>
          <td>1111111111111111111111111111111 (31 Einsen)</td>
         </tr>

         <tr>
          <td>2147483648</td>
          <td>-2147483648</td>
          <td>10000000000000000000000000000000</td>
         </tr>

         <tr>
          <td colspan="3">... weiterer Verlauf ...</td>
         </tr>

         <tr>
          <td>4294967294</td>
          <td>-2</td>
          <td>11111111111111111111111111111110</td>
         </tr>

         <tr>
          <td>4294967295 (größte vorzeichenlose Ganzzahl)</td>
          <td>-1</td>
          <td>11111111111111111111111111111111 (32 Einsen)</td>
         </tr>

        </tbody>
       
      </table>

      <table class="doctable table">
       <caption><strong>Wertebereich der Eingabe unter 64bit-Systemen</strong></caption>
       
        <col />
        <col />
        <col />
        <thead>
         <tr>
          <th>positive <code class="parameter">num</code></th>
          <th>negative <code class="parameter">num</code></th>
          <th>Rückgabewert</th>
         </tr>

        </thead>

        <tbody class="tbody">
         <tr>
          <td>0</td>
          <td class="empty">&nbsp;</td>
          <td>0</td>
         </tr>

         <tr>
          <td>1</td>
          <td class="empty">&nbsp;</td>
          <td>1</td>
         </tr>

         <tr>
          <td>2</td>
          <td class="empty">&nbsp;</td>
          <td>10</td>
         </tr>

         <tr>
          <td colspan="3">... weiterer Verlauf ...</td>
         </tr>

         <tr>
          <td>9223372036854775806</td>
          <td class="empty">&nbsp;</td>
          <td>111111111111111111111111111111111111111111111111111111111111110</td>
         </tr>

         <tr>
          <td>9223372036854775807 (größte vorzeichenbehaftete Ganzzahl)</td>
          <td class="empty">&nbsp;</td>
          <td>111111111111111111111111111111111111111111111111111111111111111 (63 Einsen)</td>
         </tr>

         <tr>
          <td class="empty">&nbsp;</td>
          <td>-9223372036854775808</td>
          <td>1000000000000000000000000000000000000000000000000000000000000000</td>
         </tr>

         <tr>
          <td colspan="3">... weiterer Verlauf ...</td>
         </tr>

         <tr>
          <td class="empty">&nbsp;</td>
          <td>-2</td>
          <td>1111111111111111111111111111111111111111111111111111111111111110</td>
         </tr>

         <tr>
          <td class="empty">&nbsp;</td>
          <td>-1</td>
          <td>1111111111111111111111111111111111111111111111111111111111111111 (64 Einsen)</td>
         </tr>

        </tbody>
       
      </table>

     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.decbin-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Binärdarstellung von <code class="parameter">num</code> als Zeichenkette.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.decbin-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>decbin()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="annotation-interactive phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">echo </span><span style="color: #0000BB">decbin</span><span style="color: #007700">(</span><span style="color: #0000BB">12</span><span style="color: #007700">) . </span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo </span><span style="color: #0000BB">decbin</span><span style="color: #007700">(</span><span style="color: #0000BB">26</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt folgende Ausgabe:</p></div>
    <div class="example-contents screen">
<div class="annotation-interactive examplescode"><pre class="examplescode">1100
11010</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.decbin-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.bindec.php" class="function" rel="rdfs-seeAlso">bindec()</a> - Wandelt von bin&auml;r zu dezimal um</span></li>
    <li><span class="function"><a href="function.decoct.php" class="function" rel="rdfs-seeAlso">decoct()</a> - Wandelt von dezimal zu oktal um</span></li>
    <li><span class="function"><a href="function.dechex.php" class="function" rel="rdfs-seeAlso">dechex()</a> - Wandelt von dezimal zu hexadezimal um</span></li>
    <li><span class="function"><a href="function.base-convert.php" class="function" rel="rdfs-seeAlso">base_convert()</a> - Wandelt einen numerischen Wert zwischen verschiedenen Zahlensystemen um</span></li>
    <li>
     <span class="function"><a href="function.printf.php" class="function" rel="rdfs-seeAlso">printf()</a> - Liefert einen formatierten String</span> unter Verwendung von <code class="literal">%b</code>,
     <code class="literal">%032b</code> oder <code class="literal">%064b</code> als Format
    </li>
    <li>
     <span class="function"><a href="function.sprintf.php" class="function" rel="rdfs-seeAlso">sprintf()</a> - Gibt einen formatierten String zur&uuml;ck</span> unter Verwendung von <code class="literal">%b</code>,
     <code class="literal">%032b</code> oder <code class="literal">%064b</code> als Format
    </li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>