dec = 0 read bin for i=length(bin)-1 .. 0 { dec += power if char[i] = 1 power *= 2 }
You can ask a new question or answer this question.