Add bit operate functions.

Signed-off-by: Yunchao Chen <chenyc@marvell.com>