Reputation: 1442
how to get binary of any decimal values...say for example 0.33, 0.6,0.5.. Can someone explain the concept..Once binary representation of decimal values are done..i need to understand the floating representation.
Upvotes: 0
Views: 2768
Reputation: 26
Here is the solution
0.33*2=0.66--------0
0.66*2=1.32--------1
0.32*2=0.64--------0
0.64*2=1.28--------1
0.28*2=0.56--------0
0.56*2=1.12--------1
0.12*2=0.24--------0
0.24*2=0.48--------0
0.48*2=0.96--------0
0.96*2=1.92--------1
0.92*2=1.84--------1
.................
this process continues until result becomes zero and write down to up after point eg:0.11000101010
Hope it may be useful to you.
Upvotes: 1