Digital Systems: Principles and Applications