Each hidden unit starts with an exact weighted sum plus a bias. The table keeps the weights, inputs, and biases visible so the pre-activations have a shown source.

highlighted = computed this step

First hidden sum

For the first hidden unit, z1 is w11 times x1 plus w12 times x2 plus b1. Here that is 2.

z1=11  +  12    1=2z_1=1\cdot1\;+\;1\cdot2\;-\;1=2
Weighted sumsHidden pre-activations are recomputed.Weighted sumsHidden pre-activations are recomputed.forward pass (all exact)quantityrulevaluez11*1 + 1*2 - 12z21*1 - 1*2 + 0-1

Second hidden sum

For the second hidden unit, the negative weight on x2 changes the sign of that contribution. The exact result is z2=-1.

z2=11    12  +  0=1z_2=1\cdot1\;-\;1\cdot2\;+\;0=-1
Weighted sumsHidden pre-activations are recomputed.Weighted sumsHidden pre-activations are recomputed.forward pass (all exact)quantityrulevaluez11*1 + 1*2 - 12z21*1 - 1*2 + 0-1

Summary

Both pre-activations are exact integers. The visible biases b1=-1 and b2=0 are part of the recomputed source.

z1=2,z2=1z_1=2,\quad z_2=-1
Weighted sumsHidden pre-activations are recomputed.Weighted sumsHidden pre-activations are recomputed.forward pass (all exact)quantityrulevaluez11*1 + 1*2 - 12z21*1 - 1*2 + 0-1