= Solution
Use the same program as $N$, replacing only its first line by a test for a final $1$:
$$
\begin{array}{c|l}
q_S&\mapsto ?_1(0,q_3,q_0)\\
q_0&\mapsto -(0,q_2,q_0)\\
q_1&\mapsto +_1(0,q_H)\\
q_2&\mapsto +_0(0,q_H)\\
q_3&\mapsto -(0,q_1,q_3)\\
q_H&\mapsto ?_\varepsilon(0,q_H,q_H).
\end{array}
$$
If the input ends in $1$, the $q_3$ loop erases it and eventually appends output $1$. Every other input, including the empty word, follows the $q_0$ loop and produces $0$. This is the characteristic function of $\{w1:w\in\mathbb B\}$.
Back to article page