A computer needs help to work. 

A computer needs a list of steps to work. 
One way to do this is by giving commands. The computer follows each command one by one. It changes things as it goes.
Some steps can repeat. This is called a loop. A loop tells the computer to do a task many times.
Other steps can skip parts. The computer only does a task if something is true. This helps the computer make choices.
Most computer languages work this way. It is a very common way to build software. 
Computers need a list of steps to work. This way of giving orders is called imperative programming. It is like a recipe or a checklist. You give the computer a set of commands. The computer follows these commands one by one. 
As the computer works, it changes things. It uses memory to store information. This information is called the state. One way to change the state is with an assignment statement. This tells the computer to save a result in memory. 
Programs also use special tools to manage steps. A loop lets the computer repeat a task many times. A conditional statement lets the computer make a choice. It only does a task if a certain condition is met. Some programs use procedures. These are small parts that do one specific job.
Many famous languages use this style. Fortran was made for math in 1954. COBOL was made to look like English. C is a very important language used to build systems. Most computers today still use this way to run software.
Computers need clear instructions to do anything useful. One way to give these instructions is through imperative programming. This style uses commands to change the state of a process. You can think of the state as the current information held in the computer's memory. 
To make a program work, the computer follows specific tools. One tool is the assignment statement. This tells the computer to perform an operation and store the result in memory. 

People have been developing these languages for a long time. In 1954, John Backus at IBM began working on Fortran. It was the first major language to help people write complex programs easily. Later, in the 1960s, experts created ALGOL to help express math ideas. In 1960, COBOL was developed to look more like English. Grace Hopper was a major contributor to COBOL's development. In the 1970s, Dennis Ritchie created the C language at Bell Laboratories. 
Many different types of imperative languages exist with unique features. Fortran was built for scientific calculations and math. COBOL was designed so that managers could read the code. BASIC was created at Dartmouth College in 1964 to help students learn. 
Imperative programming is a lot like following a recipe in a kitchen. Each instruction tells you exactly what to do next. If the recipe says "add salt," you are changing the state of the food. 
Imperative programming is a fundamental paradigm in computer science. It is a method of writing software using statements that change a process's state. In this context, the state refers to the current information held in the computer's memory. 
To understand the mechanism, we must look at how these programs manipulate data. The core of this process involves assignment statements. These statements perform an operation on information in memory and then store the results back in memory for later use. High-level imperative languages also allow for the evaluation of complex expressions. These expressions combine arithmetic operations and function evaluations to produce a single value for assignment. To manage the flow of these instructions, programmers use several control structures. Looping statements, such as "while," "do while," or "for" loops, allow a sequence of instructions to repeat. A loop might run a predefined number of times or repeat until a specific condition is met. Conditional branching statements allow the computer to skip certain steps if a condition is not met. Unconditional branching, such as a "goto" or a procedure call, allows the execution to jump to a different part of the program.
Imperative programming can be organized into different types and levels of complexity. One major type is procedural programming. In this style, a program is built from one or more procedures, which are also called subroutines or functions. Procedural programming acts as a bridge toward declarative programming. A programmer can often understand what a procedure does just by looking at its name, its arguments, and its return types. Another important concept is structured programming. This involves heavy procedural programming, where state changes are localized to specific procedures. This makes programs easier to maintain and improves their overall quality. The concepts behind object-oriented programming attempt to extend these structured approaches even further.
History shows how these languages evolved from very simple beginnings. The earliest imperative languages were the machine languages used by original computers. These instructions were extremely simple, which made the hardware easier to build but made complex programming very difficult. A major turning point occurred in 1954 when John Backus at IBM began developing Fortran. Fortran was the first major high-level language to remove the obstacles of machine code. It introduced named variables, complex expressions, and subprograms. In the late 1950s and 1960s, the ALGOL language was developed to express mathematical algorithms more easily. During the same era, COBOL was created in 1960 to make programming syntax look more like English. Grace Hopper was a major contributor to the development of COBOL, which aimed to help managers read programs.
Specific languages were designed to meet very different needs throughout the 20th century. Fortran, unveiled in 1958 as "The IBM Mathematical FORmula TRANslating system," was built specifically for scientific calculations. It supported arrays and "do" loops but lacked string handling. BASIC, released in 1964 at Dartmouth College, was designed for students to learn programming. It pioneered the interactive session, allowing users to type commands like "new," "list," and "run" to manage their work. In the 1970s, Dennis Ritchie created the C language at Bell Laboratories to write the UNIX operating system. C is a small, powerful language that provides the facilities of assembly language with a high-level syntax. This allowed programmers to control exactly which regions of memory data should occupy.
As technology progressed, the focus shifted toward more advanced structures like object-oriented programming. This movement grew rapidly in the 1980s. Smalltalk-80 was released in 1980 by the Xerox Palo Alto Research Center, based on ideas from Alan Kay. Bjarne Stroustrup later designed C++, which was an object-oriented language based on C. He began this design in 1979, and the first implementation was completed in 1983. The late 1980s and 1990s saw a massive wave of new imperative languages that used object-oriented concepts. These include Perl, Python, PHP, Java, JavaScript, and Ruby. Even modern frameworks, such as Microsoft's .NET Framework, remain imperative at their core.
Understanding imperative programming helps us see the connection between human logic and machine execution. The way we follow a recipe in a kitchen is a perfect analogy. Each instruction tells us exactly what to do next, such as "add salt." By doing this, we are changing the state of the food. A process checklist works the same way, where each step is an instruction and the physical world holds the state. Because these concepts are so familiar to humans and so deeply embodied in computer hardware, the imperative style has become the standard language of the digital world.
🖼️ Images & Media (1)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.