aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/javascript/reference/operators/bitwise_not/index.html
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-08-03 08:03:09 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-09-03 08:08:25 +0200
commit844f5103992238c0c23203286dad16a466e89c97 (patch)
treed537708951bb2b61be8192ffacc05a0ce6804f89 /files/fr/web/javascript/reference/operators/bitwise_not/index.html
parenta70fd5b73ecb10bec3906640023e2a1a46e118a2 (diff)
downloadtranslated-content-844f5103992238c0c23203286dad16a466e89c97.tar.gz
translated-content-844f5103992238c0c23203286dad16a466e89c97.tar.bz2
translated-content-844f5103992238c0c23203286dad16a466e89c97.zip
move *.html to *.md
Diffstat (limited to 'files/fr/web/javascript/reference/operators/bitwise_not/index.html')
-rw-r--r--files/fr/web/javascript/reference/operators/bitwise_not/index.html90
1 files changed, 0 insertions, 90 deletions
diff --git a/files/fr/web/javascript/reference/operators/bitwise_not/index.html b/files/fr/web/javascript/reference/operators/bitwise_not/index.html
deleted file mode 100644
index f3e1856a90..0000000000
--- a/files/fr/web/javascript/reference/operators/bitwise_not/index.html
+++ /dev/null
@@ -1,90 +0,0 @@
----
-title: NON binaire (~)
-slug: Web/JavaScript/Reference/Operators/Bitwise_NOT
-tags:
- - Bitwise operator
- - JavaScript
- - Language feature
- - Operator
- - Reference
-browser-compat: javascript.operators.bitwise_not
-translation_of: Web/JavaScript/Reference/Operators/Bitwise_NOT
----
-<div>{{jsSidebar("Operators")}}</div>
-
-<p>L'opérateur binaire NON (<code>~</code>) prend l'opposé de chaque bit de son opérande et fournit la valeur ainsi obtenue. À l'instar des autres opérateurs binaires, il convertit son opérande en un entier signé sur 32 bits.</p>
-
-<div>{{EmbedInteractiveExample("pages/js/expressions-bitwise-not.html")}}</div>
-
-<h2 id="syntaxe">Syntaxe</h2>
-
-<pre class="brush: js">
-~a
-</pre>
-
-<h2 id="description">Description</h2>
-
-<p>L'opérande est converti en un entier signé sur 32 bits. Les nombres avec plus de 32 bits voient leurs bits les plus significatifs être tronqués. Voici un exemple où l'entier qui suit est supérieur à une valeur pouvant être exprimée sur 32 bits : la conversion écrête la valeur pour obtenir un entier signé sur 32 bits :</p>
-
-<pre class="brush: js">
-Avant : 11100110111110100000000000000110000000000001
-Après : 10100000000000000110000000000001
-</pre>
-
-<p>Pour former le résultat, chaque bit qui compose l'opérande est inversé.</p>
-
-<p>La table de vérité pour l'opération <code>NON</code> est :</p>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th class="header" scope="col">a</th>
- <th class="header" scope="col">NON a</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>0</td>
- <td>1</td>
- </tr>
- <tr>
- <td>1</td>
- <td>0</td>
- </tr>
- </tbody>
-</table>
-
-<pre class="brush: js">
- 9 (base 10) = 00000000000000000000000000001001 (base 2)
- --------------------------------
-~9 (base 10) = 11111111111111111111111111110110 (base 2) = -10 (base 10)
-</pre>
-
-<p>L'entier signé sur 32 bits est inversé selon <a href="https://fr.wikipedia.org/wiki/Compl%C3%A9ment_%C3%A0_deux">le complément à deux</a>. Autrement dit, la présence du bit le plus significatif est utilisée pour exprimer des entiers négatifs.</p>
-
-<p>Appliquer un NON binaire sur n'importe quel nombre <code>x</code> fournira la valeur <code>-(x + 1)</code>. Ainsi, <code>~-5</code> renverra <code>4</code>.</p>
-
-<p>Étant donné l'utilisation d'une représentation sur 32 bits, <code>~-1</code> et <code>~4294967295</code> (2^32 - 1) donneront tous les deux <code>0</code>.</p>
-
-<h2 id="examples">Exemples</h2>
-
-<h3 id="Using_bitwise_NOT">Utiliser le NON binaire</h3>
-
-<pre class="brush: js">~0; // -1
-~-1; // 0
-~1; // -2
-</pre>
-
-<h2 id="specifications">Spécifications</h2>
-
-<p>{{Specifications}}</p>
-
-<h2 id="browser_compatibility">Compatibilité des navigateurs</h2>
-
-<p>{{Compat}}</p>
-
-<h2 id="see_also">Voir aussi</h2>
-
-<ul>
- <li><a href="/fr/docs/Web/JavaScript/Guide/Expressions_and_Operators#bitwise">Les opérateurs binaires dans le guide JavaScript</a></li>
-</ul>