Jacobi Symbol

NOTE: if its past 8:30 AM Eastern Time, dont worry about it. thanks for the consideration

The Question:
Exercise 13.1. Develop a “binary” Jacobi symbol algorithm, that is, one
that uses only addition, subtractions, and “shift” operations, analogous to
the binary gcd algorithm in Exercise 4.1.

heres the algorithm that i came about with so far:

Note: it is right, except for the fact that there cant be mod, division, multiplication, etc.