Overview of Computers and Programming Languages
Overview of Computers and Programming Languages
Programming 1
Using C++
Overview of Computers and
Programming Languages
The Language of a Computer
When you press A on your keyboard, the computer displays A on the screen. But what is
actually stored inside the computer’s main memory? What is the language of the
computer? How does it store whatever you type on the keyboard?
Remember that a computer is an electronic device. Electrical signals are used inside the
computer to process information.
Digital signals are more reliable carriers of information than analog signals and can
be copied from one device to another with exact precision. You might have noticed
that when you make a copy of an audio tape, the sound quality of the copy is not as
good as the original tape. On the other hand, when you copy a CD, the copy is as
good as the original. Computers use digital signal.
Because digital signals are processed inside a
computer, the language of a computer, called
machine language, is a sequence of 0s and 1s.
In assembly language, you can write the equation to calculate the weekly
wages as follows:
LOAD rate
MULT hours
STOR wages
Assembler – A program that translates a
program written in assembly language into an
equivalent program in machine language.
High-level
languages – closer to natural
languages, such as English, French, German,
and Spanish.
Answer:
Possible objects:
1. Video
2. Customer
4. Starring actors
5. Producer
6. Production company
10. Incrementing the number of copies in stock by one after a customer returns a particular
video
ANSI/ISO Standard C++
The programming language C++ evolved
from C and was designed by Bjarne Stroustrup
at Bell Laboratories in the early 1980s.
Determining the input, process, and output from a
program problem.
Example: Make a program that will ask the user to enter two whole numbers
and will calculate the sum, difference, product, quotient, and remainder of the
two numbers.
Input : number 1
number 2
Process: sum = number 1 + number 2
difference = number 1 – number 2
product = number 1* number 2
quotient = number 1 / number 2
remainder = number 1 % number 2
Output: sum
difference
product
quotient
remainder