This 1997 book is a self-contained tutorial on Z, a formal notation for modelling, specifying and designing computer systems and software, for experienced professionals and serious students in programming and software engineering. It presents realistic case studies emphasising safety-critical systems, with examples drawn from embedded controls, real-time and concurrent programming, computer graphics, games, text processing, databases, artificial intelligence, and object-oriented programming. It motivates the use of formal methods and discusses practical issues concerning how to apply them in real projects. It also teaches how to apply formal program derivation and verification to implement Z specifications in real programming languages with examples in C. The book includes exercises with solutions, reference materials, and a guide to further reading.