Fundamentals of logic design