Write the number in general form as a sum of place values:
Now split it in the right place for each divisor.
Divisibility by 5 and by 2. Every place value above the units — 10, 100, 1000, … — is a multiple of 10, so it is a multiple of both 5 and 2.
So N is divisible by 5 only when a is 0 or 5, and by 2 only when a is even. Only the units digit matters.
Divisibility by 4. 100 = 4 × 25, and every higher place value is a multiple of 100. So
= (a multiple of 4) + (the last two digits)
Hence N is divisible by 4 exactly when the two-digit number formed by the last two digits is. For 2856 → 56 = 4 × 14 ✓; for 1586 → 86 = 4 × 21 + 2 ✗.
Divisibility by 8. 1000 = 8 × 125, and every higher place value is a multiple of 1000. So
= (a multiple of 8) + (the last three digits)
Hence N is divisible by 8 exactly when the last three digits form a multiple of 8. For 2856 → 856 = 8 × 107 ✓; for 6686 → 686 = 8 × 85 + 6 ✗.