An ethical code is adopted by an organization in an attempt to assist those in the organization called upon to make a decision (usually most, if not all) understand the difference between 'right' and 'wrong' and to apply this understanding to their decision. The ethical code therefore generally implies documents at three levels:
A code of ethics: A code of ethics often focuses on social issues. It may set out general principles about an organization's beliefs on matters such as mission, quality, privacy or the environment. It may delineate proper procedures to determine whether a violation of the code of ethics has occurred and, if so, what remedies should be imposed. The effectiveness of such codes of ethics depends on the extent to which management supports them with sanctions and rewards. Violations of a private organization's code of ethics usually can subject the violator to the organization's remedies (such as restraint of trade based on moral principles). The code of ethics links to and gives rise to a code of conduct for employees.
A code of conduct is a document designed to influence the behavior of employees: They set out the procedures to be used in specific ethical situations - such as conflicts of interest or the acceptance of gifts, and delineate the procedures to determine whether a violation of the code of ethics occurred and, if so, what remedies should be imposed. The effectiveness of such codes of ethics depends on the extent to which management supports them with sanctions and rewards. Violations of a code of conduct may subject the violator to the organization's remedies which can under particular circumstances result in the termination of employment.
A code of practice is adopted by a profession or by a governmental or non-governmental organization to regulate that profession, a code of practice may be styled as a code of professional responsibility, which will discuss difficult issues, difficult decisions that will often be need to made and provide clear account of what behavior is considered "ethical" or "correct" or "right" in the circumstances. In a membership context, failure to comply with a code of practice can result in expulsion from the professional organization. In its 2007 International Good Practice Guidance, Defining and Developing an Effective Code of Conduct for Organizations, the International Federation of Accountants  provided the following working definition: "Principles, values, standards, or rules of behavior that guide the decisions, procedures and systems of an organization in a way that (a) contributes to the welfare of its key stakeholders, and (b) respects the rights of all constituents affected by its operations."
Ethical Codes are often not adopted by management because of some over-riding corporate mission to promote a particular moral theory but accepted by management as pragmatic necessities in running an organization in a complex society in which moral concepts inevitably play an important part.
They are distinct from moral codes that may apply to the culture, education, and religion of a whole society.
Of course, certain acts that constitute a violation of ethical codes may also violate a law or regulation and can be punishable at law or by government agency remedies.
Even organizations and communities that may be considered criminal may have their own ethical code of conduct, be it official or unofficial. Examples could be hackers, thieves, or even street gangs.
Ladd, John. "The Quest for a Code of Professional Ethics: An Intellectual and Moral Confusion." In Deborah G. Johnson (ed.) Ethical Issues in Engineering. New Jersey: Prentice Hall, 1991.
Flores, Albert. "The Philosophical Basis of Engineering Codes of Ethics." In Vesilind P.A. and A. Gunn (eds), Engineering Ethics and the Environment. Cambridge: Cambridge University Press, 1998: 201-209.
James B. Sumner "Ethical related to Engineering" In eds G (Cambride Youth Club)