Chapter 1: Introduction to Computer Programs

Programming is the art and science of writing instructions that a computer can follow to accomplish a task. This task can be playing a game, performing a calculation, or browsing the web, for example. However, before we can learn how to write programs, we should understand what a program is and how a computer can understand and execute the instructions we give it. In this chapter, we will study this in more detail, along with the basics of what a computer is, how it works, and its history.

Even a basic level of understanding of these topics will help us later on when we discuss the different aspects of writing programs, as we can then relate to how the computer will treat the code we write.

In this chapter, we will cover the following topics:

  • A perspective on the history and origins of the computer
  • Background knowledge of the original ideas behind programming
  • Understanding what a computer program is
  • Learning how a computer program works
  • An understanding of what machine code is