conversion.py

Created by famille-bvc

Created on March 24, 2022

538 Bytes


#0=>+
#1=>-

#ex : 

#0111 = 7
#1111 = -7

quand on fait complement, faire
gaffe a garder le bit de signe

sans bit de signe on peut 
représenter de 0 à 2^(n) -1
avec => -2^(n-1)<=n<=2^(n-1)-1

-> virgule fixe

virgule au rang k
________________________________
2^(n-1-k)   2^0,2^(-1)    2^(-k)
________________________________
(toujours avec le bit de signe)

-> virgule flottante

M*B^E

sur 32bits:
_____________
SE  E    M
_____________
1b 8b   23b

sur 64bits:
_____________
SE  E    M
_____________
1b 11b  52b

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.