A photon at the threshold has exactly enough energy. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Photon energy is the training constant times frequency
With h equal to 2 joules per hertz and frequency 3 hertz, the photon carries 6 joules.
E=hf=2⋅3=6J
Equality reaches the gap in this toy model
The photon energy and band gap are both 6 joules, so the accepted bit is 1.