use bitwise division to improve efficiency