Added method for merging bits.