This rule took a while for me to internalize. It's tough to picture a decimal terminating when the denominator is so huge, such as DWG's example of 43/256. I found it helped me to think about the basic patterns:
1/2^1 = 0.5
1/2^2 = 0.25
1/2^3 = 0.125
1/2^4 = 0.0625
1/2^5 = 0.03125
1/2^6 = 0.015625
1/2^7 = 0.0078125
1/5^1 = 0.2
1/5^2 = 0.04
1/5^3 = 0.008
1/5^4 = 0.0016
1/5^5 = 0.00032
1/5^6 = 0.000064
1/5^7 = 0.0000128
Every one of these terminates, and the pattern indicates that would continue to be true for higher powers. The number of decimal places increases along with the powers of 2 or 5, but the number of decimal places will always be finite.
In contrast, any factors other than 2 or 5 in the denominator can quickly be shown to be non-terminating, even for the most basic case (exponent of 1). Higher powers would be even messier:
1/3 = 0.33333(3 repeating)
1/6 = 0.16666(6 repeating)
1/7 = 0.142857(142857 repeating)
1/9 = 0.11111(1 repeating)