Particle swarm optimisation (PSO), one of the most elegant algorithms in the field of nature-inspired optimisation, has many variants for solving different types of problems. One of these variants is binary particle swarm optimisation (BPSO), which is suitable for solving combinatorial optimisation problems. A main component of BPSO is the transfer function that maps continuous velocity values to probability values which in turn are used to update particle positions. Transfer function has a significant impact on the performance of BPSO algorithm. This paper proposes a novel transfer function with tunable parameters that allows different U-shaped transfer functions. For evaluating the proposed transfer functions, a set of benchmark functions and 0/1 knapsack problems are employed. The results show that the U-shaped transfer functions can significantly improve the performance of BPSO. It is also shown that the BPSO algorithms equipped with U-shaped transfer functions provide superior results compared to the existing transfer functions in the literature.