Digital fault diagnosis by low-cost arithmetical coding techniques