The structural and electronic properties of BN and BP compounds and BNxP1-x alloys have been investigated by full potential linearized augmented plane wave (FP-LAPW) method based on density functional theory (DFT). The total energies and electronic band structures of these compounds have been calculated for different approximations of exchange-correlation energy. The comparative study has showed that the Perdew-Wang-generalized gradient approximation (PW-GGA) is the best one to produce the measured structural quantities of the compounds, such as the lattice constant, bulk modulus, and first-order pressure derivative of the bulk modulus. The electronic quantities of the compounds, such as the width of the valance band and energy gaps at high symmetry points have been found to be in good agreement with the corresponding measured ones when the compounds were defined by the lattice constants of PW-GGA scheme. The PW-GGA approach was also applied on BNxP1-x alloys for obtaining the variation of the equilibrium lattice constants, bulk moduli, and minimum energy gaps as a function of the nitrogen concentration within the range of 0 < x < 1. It is found that these variations having large bowing parameters exclude the Vegard's linear rule. (C) 2008 Elsevier B.V. All rights reserved.