No history yet

Legal Framework Structure

The First Legal Algorithm

Around 1754 BCE, the Babylonian king established one of history's most important legal innovations. His code wasn't just a list of rules; it was a system built on conditional logic. Each of its 282 laws follows a clear "if-then" structure. If a specific crime is committed, then a specific punishment is applied.

For example, Law #22 states: "If a man has committed robbery and is caught, that man shall be put to death." The logic is direct and unambiguous. This algorithmic approach removed judicial ambiguity and made the consequences of actions predictable.

Lesson image

This legal code was physically inscribed onto a massive, seven-and-a-half-foot tall diorite stele and placed in a public square. This act transformed the law from a set of abstract ideas into a concrete, publicly accessible protocol. Think of it as an early 'API' for justice. Any literate person could 'read' the documentation to understand the rules governing their society, from property rights and commerce to family law and professional standards.

Organizing Society with Code

The 282 laws were not random. They were meticulously organized by subject, addressing topics like theft, agriculture, slavery, and medical malpractice in distinct sections. This structure created a comprehensive framework for social order. By publicizing the rules and their consequences, Hammurabi aimed to create a stable and predictable society where people understood their rights and responsibilities.

Lesson image

However, the 'then' part of the equation wasn't the same for everyone. The punishments varied significantly based on the social status of the perpetrator and the victim. A crime committed against a nobleman carried a much harsher penalty than the same crime against a commoner or a slave. This reflects the rigid social hierarchy of Babylonian society, embedding social structure directly into the legal logic.

By codifying laws with conditional logic and making them public, Hammurabi established a blueprint for legal systems. His code was a monumental step toward the idea that justice should be based on established, predictable rules rather than the whims of a ruler.