Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
2 views21 pages

Introduction To Programing: Salem Belgurzi

The document provides an introduction to programming, covering key topics such as hardware and software, data storage, program execution, and flowcharts. It explains the roles of programmers, the differences between low-level and high-level languages, and the use of compilers for translating code. Additionally, it introduces C# as a versatile programming language and includes rules for creating flowcharts to represent processes.

Uploaded by

kcia1100011
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 views21 pages

Introduction To Programing: Salem Belgurzi

The document provides an introduction to programming, covering key topics such as hardware and software, data storage, program execution, and flowcharts. It explains the roles of programmers, the differences between low-level and high-level languages, and the use of compilers for translating code. Additionally, it introduces C# as a versatile programming language and includes rules for creating flowcharts to represent processes.

Uploaded by

kcia1100011
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/ 21

Introduction to

Programing

Introduction
Salem Belgurzi
Topics

• Introduction
• Hardware and Software
• How Computers Store Data
• How a Program Works
• Flowcharts
Introduction
• Computers can be programmed
• Designed to do any job that a program tells them to
• Program: set of instructions that a computer
follows to perform a task
• Commonly referred to as Software
• Programmer: person who can design, create, and
test computer programs
• Also known as software developer
Hardware and Software
• Hardware: The physical devices that make up a
computer
• Computer is a system composed of several components that
all work together
• Typical major components:
• Central processing unit
• Main memory
• Secondary storage devices
• Input and output devices
How Computers Store Data
• All data in a computer is stored in sequences of 0s
and 1s
• Byte: just enough memory to store letter or small
number
• Divided into eight bits
• Bit: electrical component that can hold positive or negative
charge, like on/off switch
• The on/off pattern of bits in a byte represents data stored in
the byte
How a Program Works
• Program must be copied from secondary memory
to RAM each time CPU executes it
• CPU executes program in cycle:
• Fetch: read the next instruction from memory into CPU
• Decode: CPU decodes fetched instruction to determine
which operation to perform
• Execute: perform the operation
From Machine Language to Assembly
Language
• Impractical for people to write in machine language
• Assembly language: uses short words
(mnemonics) for instructions instead of binary
numbers
• Easier for programmers to work with
• Assembler: translates assembly language to
machine language for execution by CPU
High-Level Languages
• Low-level language: close in nature to machine
language
• Example: assembly language
• High-Level language: allows simple creation of
powerful and complex programs
• No need to know how CPU works or write large number of
instructions
• More intuitive to understand
Compilers
• Programs written in high-level languages must be
translated into machine language to be executed
• Compiler: translates high-level language program
into separate machine language program
• Machine language program can be executed at any time.
• Source code: statements written by programmer
• Syntax error: prevents code from being translated
Flowcharts
 Type of diagram that represents a workflow or process

 A graphical or symbolic representation of a process, where each


step is represented by a different symbol and contains a short
description of the process step

 Used to design, document, analyze, manage, and communicate


processes or programs
Flowcharts – Logic Symbols
Flowcharts – Logic Symbols
Flowcharts – Sample Flow
Rules For Creating a Flowcharts
 Flowchart is the visual representation of an algorithm or a process.

 Rule 1: Flowchart opening statement must be ‘start’ keyword.

 Rule 2: Flowchart ending statement must be ‘end’ keyword.

• Rule 3: All symbols in the flowchart must be connected with an arrow line.

• Rule 4: Each decision point should have two or more distinct outcomes.

• Rule 5: Flow should generally move from top to bottom or left to right.
Example of a Flowcharts
 Draw a flowchart to input two numbers from the user and display
the largest of two numbers.
Example of a Flowcharts
Example of a Flowcharts
 Find the largest among three different numbers entered by the
user.
Example of a Flowcharts
Using C#
• C# (pronounced "C-sharp") is a modern, versatile,
object-oriented programming language developed
by Microsoft.
• C# is used to develop web apps, desktop apps,
mobile apps, database applications, games and
much more.
C# Example
Recently IEEE Spectrum came with the ranking sheet
of the most popular programming languages in 2024.

You might also like