X =
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
Y =
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
X ↔ Y
Ext-GCD(15, 11) :
i
GCD
Bezout
AOdd :
AEven :
A
↔
B
ax
ay
bx
by
|A-B|
A↔B
Sx
Sy
ax ←
Sx' ay ←
Sy' A ←
A/2 ax ←
ax + Y ay ←
ay + X ax ←
ax/2 ay ←
ay/2
0
15
11
1
0
0
1
1
15
11
1
0
0
1
4
0
1
1
1
1
2
12
16
6
8
2
2
11
6
8
0
1
9
1
Even
Even
3
4
3
1
11
3
4
0
1
10
1
3
5
3
5
5
14
20
7
10
4
5
↔
1
7
10
3
4
4
0
10
14
10
14
2
Even
Even
5
7
5
2
↔
1
5
7
3
4
1
1
16
22
8
11
6
1
↔
1
8
11
3
4
0
7
1
1
3
4
8
11
0
(3)(15) - (4)(11) = 1