Skip to main content

Introduction

Modern computer systems are made of hardware and software components. hardware components are those components that have a physical presence. The motherboard, the CPU, and memory are examples of hardware. There is a phyical item that you can actually see. Software components on the other hand do not have a tangible physical presence. Software tells the computer what to do and when to do it. It provides the instructions on what calculations to make and how to make those calculations. It tells the computer how to handle user interactions, and how to display the result to the user by colouring a pixel a certain way.

Programming is about the creation of software. Software makes your computer come to life. Software runs on hardware so hardware is required. However, a computer is just a really expensive paperweight without software. Learning to program is about learning to create software.

To develop software, we can't think of the computer as a magical box... we need to have a mental model of computers and all the essential components. In this first chapter will provide a broad description about the parts of a computer.

We will also describe how programs get turned into applications through the compilation process and illustrate a simple program written in the C language

Learning Outcomes

After completing this chapter, students will be able to:

  1. Distinguish between hardware and software and explain their interdependence
  2. Identify key hardware components (CPU, RAM, storage, GPU, OS) and their roles in program execution
  3. Explain the three-stage C compilation process: preprocessing, compilation, and linking
  4. Analyze the structure of a simple C program including main(), function calls, and return statements
  5. Predict program output from printf() statements with escape sequences
  6. Understand the purpose of libraries and header files in extending program functionality
  7. Write and execute a basic C program that produces formatted output