Now the addition of hydrogen and a halogen to a non-symmetrical alkene or alkyne follows Markovnikov's rule. Under Markovnikov's rule, the H atom is added to the carbon, whether it be double-bonded or triple-bonded, with more hydrogens, and then the halogen atom or X atom is added to the triple-bonded or double-bonded carbon with fewer hydrogens.
If we take a look here, we have an alkene to start. The alkene on the left only has one hydrogen, and the one on the right has two. Following Markovnikov's rule, H would go to the double-bonded carbon with more hydrogens, so it would go here, and then the halogen will go to the one with fewer hydrogens, so it would go here. In this process, we made an alkyl halide.
Now, when we have an alkyne, we have two π bonds, so we need 2 moles of HX. Still following Markovnikov's rule, H would go to the now triple-bonded carbon with more hydrogens, and there'd be two of them adding, and then we'd have two halogens adding to the triple-bonded carbon with fewer hydrogens. So this one here, as a result of using two moles of HX, we wind up with a dihalide with both halogens adding to the same formerly triple-bonded carbon.
So just remember, we use Markovnikov's rule if our double or triple-bonded carbons have a different number of hydrogens each. Use this rule to determine what your final answer will be.