Ah yes, this is a very nice method. I've been doing this since 7th grade
I happened to have a trig book from the 50's, no electronics, and a whole summer vacation of having fun with math.
In binary:
Let:
A=Result
B=Remainder
Initial:
d=0
b=01 01.00 00
a=0
Cycle 1
;shift upper two bits in b to D
b=01 00 00 00
d=00 00 00 01
2*A
;A=00 00 00 00
A→C
;C=00 00 00 00
2*C+1
:C=00 00 00 01
cp C,D
if C is less than or equal to D
D-C→D
; D= 00 00 00 00
A+1→A
;A=00 00 00 01
Repeat;shift upper two bits in b to D
b=00 00 00 00
d=00 00 00 01
2*A
;A=00 00 00 10
A→C
;C=00 00 00 10
2*C+1
:C=00 00 00 11
cp C,D ;C is greater than D
x if C is less than or equal to D ;False
x D-C→D ;Not Executed
x ; D= xx ;""
x A+1→A ;""
x ;A=xx ;""
RepeatThe first two bits calculated in this case is the integer part and after that all the bits are the fractional part (in binary).
EDIT: Those
are supposed to be ; D. grrr...