Digital systems : principles and applications