Computer Programming: An Introduction To Programming
Computer Programming: An Introduction To Programming
An Introduction to Programming
2
Programming
Lets discuss why you think you are in a
programming course!
Its a mistake?
Programming
Everything involves computers now
Computer Programming
Is it difficult?
Programmers
Programs are the directions given to computers
Types
Machine languages
Assembly languages
High-level languages
7
Machine Languages
The first programmers had to write the program
instructions using only combinations of 0s and 1s
E.g., 00101 10001 10000
Instructions written in 0s and 1s are called
machine language or machine code
Each type of machine has its own language
Machine languages are the only way to communicate
directly with the computer
Programming in machine language is tedious and
error-prone; requires highly trained programmers
8
Assembly Languages
Assembly languages simplify programmers job
High-Level Languages
High-level languages allow programmer to use
English-like instructions
Control Structures!
Programs are written using three basic structures
Sequence
Used in every program you write
Repetition
Used in most programs you write
Selection
Used in most programs you write
Summary
Programs: step-by-step instructions that tell a computer how to
perform a task
Summary (continued)
Sequence structure: process the instructions,
one after another, in the order listed