In the GWS electroweak model, there are two fundamental charges: weak hypercharge and the third component of weak isospin (henceforth referred to as hypercharge and isospin respectively). The gauge boson of hypercharge is the B0, and those of isospin are the W+, W0, and W-. The B0 and W0 mix to make the photon and Z0. What I don't understand is what determines the charges acted upon by the photon and Z0. The Z0 acts on isospin just like the Ws, but the photon acts on electric charge, which, in the context of electroweak theory, is defined to be the isospin plus half the hypercharge. How is this derived?