gk-1 is the output at the k-th shift. This notation is consistent with the notation for the content of the registers at the start.