The terminating decimals (though that term should be reserved for base 10, but I have no better) in any base are precisely the fractions whose denominator has every prime factor represented in the factorization of the base. So in base 10, it is fractions with denominators of the form 2^x*5^y, where x and y are allowed to be zero.