Recall that the electrophilic addition of a hydrogen halide like HBr to an alkene follows Markovnikov's rule, forming an alkyl bromide. In comparison, a conjugated diene such as 1,3-butadiene has two double bonds, both equally suited to react with HBr, resulting in two products. The products are often called 1,2- and 1,4-adducts, where the numbers indicate the mode of addition of the electrophilic reagent. The first step of the mechanism involves the addition of the proton to one of the terminal carbons giving an allylic carbocation intermediate, which is resonance stabilized. So, it will be favored over the relatively unstable primary carbocation. In the second step, the bromide ion can attack the allylic intermediate at either carbon bearing the positive charge. Nucleophilic attack at the second carbon results in the 1,2-addition product, whereas attack at the fourth carbon yields the 1,4-addition product. The product distribution varies with temperature, with the 1,4-adduct favored at higher temperatures and the 1,2-product at lower temperatures.