I noticed that listing 1 isn’t considering 0 as an input for one of x/y (if both are 0 it is handled)

as it is written in the assignment, reduction will make 1 action before turning done to 1

is that a case we should adress? are we supposed to let reduction act 1 time like it does in the code?

and if i need to adress it, should i do it in reduction or gcd?

1 Like

When the signals `x_in == 0000`

, `y_in == 0000`

, and `done_in != 0000`

are input to an instance of the `reduction`

circuit, it outputs `done_out = 1`

(line 46).

Therefore, this case when \langle x \rangle = 0 and \langle y \rangle = 0 is already being handled with the first instance of the `reduction`

circuit inside the `gcd`

circuit. Hence, you don’t need handle this case separately; it is sufficient to follow the algorithm given in the `gcd(x, y)`

function.