Just to state the obvious: any number divisible by 512 is divisible by 8.