0% found this document useful (0 votes)
2 views

1-PL_Introduction

The document outlines the components of a computer system, including hardware (CPU, RAM, storage, and input/output devices) and software (programs and programming languages). It explains the process of writing and executing a program in C++, detailing the roles of compilers, linkers, and loaders. Additionally, it provides instructions for downloading and setting up Microsoft Visual C++ 2008 Express Edition for programming.

Uploaded by

Ahmed Al-nasheri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

1-PL_Introduction

The document outlines the components of a computer system, including hardware (CPU, RAM, storage, and input/output devices) and software (programs and programming languages). It explains the process of writing and executing a program in C++, detailing the roles of compilers, linkers, and loaders. Additionally, it provides instructions for downloading and setting up Microsoft Visual C++ 2008 Express Edition for programming.

Uploaded by

Ahmed Al-nasheri
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Computer System 3- Secondary Storage: is the

Computer system consists of: devices used for permanent


A) Hardware: storage of Data like Hard Disk,
Which includes: DVD, Flash disk, etc.
1- Central Processing Unit (CPU) 4- Input/Output Devices: which is
also known as the processor responsible for Data input and
which is responsible for output operations such as
processing data arithmetic and keyboard, monitor, Printers, etc.
logic operations
2- Main memory or Random Access
Memory(RAM) which store all
program that are currently
running and Data that currently
being processed or produced. RAM
is divided to locations each
location is one byte(one byte is
8 bit) and each location have a
unique address.
Computer System All Data and computer programs
Computer system consists of: stores in computer using machine
A) Software: Language.
Software are programs written to
perform specific tasks. For Bit: Binary Digit 0 or 1.
example, word processors. Byte: 8 Bit.
All software is written Kilo Byte: 210 Byte=1024 Byte.
in programming languages. Mega Byte: 220 Byte=1048576 Byte.
Giga Byte: 230 Byte=1073741824 Byte
Computer program: is a set of
instructions that perform Programming Language: is a set of
specific Task instructions and rules that
describe how to write a computer
Data and computer program are program.
stored in computer using machine Programming Language is written in
English like symbol. Example of
Language which is sequence of
programming Languages are:
0’s and 1’s.
Fortran, Cobol, Pascal, C, C++,
The digit 1 or 0 is called
Java, C#.
binary number or binary digit.
Programming Language: the steps of writing a computer
Computer only Understand machine program are the followings:
Language or Machine code. 1- You use a text editor to create
So computer Program that is a C++ program. This program is
written in some Programming called the source code, or source
Language need to be translated program. The program must be saved
to Machine Language. And that is in a text file that has the
the responsibility of Compiler. extension .cpp.
Compiler: is a Software that 2. The C++ program given in the
Translate the computer program preceding section contains the
written is some programming statement
Language to machine language
that can be executed on computer #include <iostream>
Given the following program:
#include <iostream> In a C++ program, statements that
using namespace std; begin with the symbol # are called
int main() preprocessor directives. These
{
cout << "My first C++ program." << endl; statements are processed by a
return 0; program called preprocessor.
}
3. The next step is performed by Linker: A program that combines
compiler which is to verify that the object program with other
the program obeys the rules of programs in the library and is
the programming language that is, used in the program to create the
the program is syntactically executable code.
correct and translate the program 5. load the executable program
into the equivalent machine into main memory for execution.
language. The compiler checks the A program called a loader
source program for syntax errors accomplishes this task.
and, if no error is found, Loader: A program that loads an
translates the program into the executable program into main
equivalent machine language. The memory.
equivalent machine language
program is called an object 6. The final step is to execute
program. the program.
4. A program called a linker
combines the object program
with the programs from
libraries.
The following figure shows the In this course we will learn to
steps of writing and executing write program using C++
computer program programming Language.
There are many C++ compiler
available to use for example gcc ,
Intel compiler , Microsoft etc.

In this course we will use


Microsoft C++ compiler in teaching
process. Note that any other
compiler will work and would be
suitable but will use Microsoft
compiler for the simplicity of
use.

We will use Microsoft Visual


Studio C++ 2008 Express Edition
which light and free to download
using the following link:
Visual studio 2008 express Open the folder
edition: VS2008ExpressENUX1397868 then go
https://go.microsoft.com/fwlink/? to VCExpress folder.
LinkId=104679

Use the link to download Visual


Studio iso file.

Extract the files using winrar by


write click on the iso file above Double click on setup
then choose extract to Note: the setup may require to
VS2008ExpressENUX1397868 download .Net 3.5 framework in
this case click on download and
install now.
The following window will appear
click next
Select (I have read and accept
the license terms) then click
Next

The following screen will appear


click Install

The following screen will appear


unselect the three options then Then click Exit.
click next Now visual C++ 2008 is ready to
use:
To start using visual studio 2008 To start writing a program:
go to 1- go to file menu then new then
Start menu project
Then
Visual C++ 9.0 Express Edition
Then
Microsoft Visual C++ 2008 Express

2- in project type always choose


win32 and in Template choose win32
Console Application
3- in name
Field choose
The Microsoft Visual C++ 2008 The name you
will start and ready to be use Want.
4- in location
Choose a
Location easy
To reach.
Click Next On the left side of the screen on
Solution Explorer
Right click on
Source Files
Then Add
Then New Item

Choose Console Application


and Empty Project In the next window choose C++
Then click finish file(.cpp)
Choose a name
For your file
Then click
Add

Now you are ready to start writing


your program.

You might also like