
First, observe that RegWrite is 1 for R-format instructions
and lw, and 0 for the others. Looking at the
table on p. 367, observe that the op code bits labeled Op3 and Op2
are both zeros for these instructions, and are not both zeros
otherwise. Therefore, all we have to do is create a circuit that
will produce 1 when Op2 and Op2 are both 0, and produce a 0 otherwise.
Such as: