Computer-Controlled Systems: Theory and Design