Conscience is an essential human attribute. Nevertheless, in the construction of formal models of the subject it is customarily left outside the framework of theoretical analysis. The Algebra of Conscience, whose first edition appeared in 1982, was the first specialized work modeling the phenomenon of conscience. The method used in this book made it possible to connect moral experience with decision-making procedures on the level of mathematical models. The application of such models allows us to propose the hypothesis of two fundamentally different ethical systems determining the normative patterns of human behavior in situations of conflict. Under the first ethical system the subject's self-esteem is raised if the subject seeks to resolve the conflict; in the second it is raised by seeking to dramatize the conflict. The new edition of The Algebra of Conscience is significantly expanded. The second part of the book, devoted to moral choice, is completely new. Based on the theory presented in the first part, it constructs the model of a subject capable of making an intentional choice. A special variable corresponds to the subject's intention. This development allows us to include within the model freedom of will and freedom of choice, and also to generalize classical 2×2 game theory to the case where outcomes, in addition to having utility measures, are either `positive' or `negative.' In its concluding chapters the book constructs a dynamic model of the intentional subject faced with a choice between two alternatives, neither of which is morally acceptable for the subject. It is shown that in this case the probabilities of choice of the alternatives may change chaotically. From this it follows that one cannot predict which alternative will be chosen or even the probabilities with which they will be chosen. Audience: The book is addressed to a broad readership having elementary knowledge of mathematical logic and the theory of probability. It can be used in college courses studying the modelling of moral choice. The book's material can also be used in the design of artificial intelligence systems.