Somewhat understanding bit manipulation