add utilities around bit manipulations