Wednesday, June 1, 2016

Bermain dengan Float.. :D

Contoh representasi float dalam decimal :
3/8 = 0.375 = 3*10**(-1) + 7*10**(-2) + 5*10**(-3)

 Contoh program dalam python untuk ngekonvert float ke binary :


Hasilnya :

Waaaaww... binary dari 0.1 kereeun.. :v

Decimal to Binary in Python