Difference between revisions 32694813 and 32803564 on ptwikiO padrão IEEE 754 (definido pelo [[Instituto de Engenheiros Eletricistas e Eletrônicos]]) foi adotado em 1985 e desde então passou por algumas modificações, e define algumas regras de normalização a serem seguidas nas operações e representações de números binários com [[ponto flutuante]]. Antes disso, cada fabricante de computadores e outros dispositivos, possuía um formato de representação diferente. == Normalização == (contracted; show full)<th>Expoente</th> <th>Mantissa</th> </tr> <tr> <th>Zero</th> <td>0</td> <td>0s</td> <td> 10s</td> </tr> <tr> <th>+ Infinito</th> <td>0</td> <td>1s</td> <td>1s</td> </tr> <tr> <th>- Infinito</th> <td>1</td> <td>1s</td> <td>1s</td> </tr> <tr> <th>NaN</th> <td>0</td> <td>1s</td> <td>Diferente de 0s</td> </tr> </table> No padrão IEEE 754, os [[NaN]] (Not a Number), possuem sinal 0, expoente 1 e mantissa com qualquer valor - exceto tudo 0s, pois isso caracteriza infinito- e representam exceções como divisão por zero, raiz de negativos etc. == Convertendo número decimal para binário == Tomando por base o primeiro exemplo, -9.5, vamos representá-lo como ponto flutuante com precisão 32 bits. Exemplo: <pre> Sinal negativo → 1 (contracted; show full)[[nl:IEEE 754]] [[pl:IEEE 754]] [[ru:IEEE 754-2008]] [[sr:IEEE 754]] [[sv:IEEE 754-2008]] [[tr:IEEE 754-2008]] [[uk:IEEE 754]] [[zh:IEEE 754]] All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://pt.wikipedia.org/w/index.php?diff=prev&oldid=32803564.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|