A photon matches only when h times frequency equals the gap. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
A photon carries h times frequency
The training constant is 1 joule per hertz and the frequency is 5 hertz.
E=hf=1⋅5=5J
The photon fires only when the equality closes
The transition gap is 5 joules and the matched bit is 1.