SlideShare a Scribd company logo
CSE 115 Programming Language I ECE@NSU
Overview of Computers
and
Programming
Mirza Mohammad Lutfe Elahi
CSE 115 Programming Language I ECE@NSU
2
Outline
• Overview of Computers
– Hardware
– Software
• Computer Languages
• Software Development Method
• Pseudo Code and Flowcharts
• Professional Ethics
CSE 115 Programming Language I ECE@NSU
3
Computers
• Computers receive input, store, process, and output
information.
• Computer can deal with numbers, text, images,
graphics, and sound.
• Computers are worthless without programming.
• Programming Languages allow us to write programs
that tell the computer what to do and to provide a way
to communicate with computers.
• Programs are then converted to machine instructions
so the computer can understand it.
CSE 115 Programming Language I ECE@NSU
4
Hardware & Software
• Hardware is the equipment used to perform the
necessary computations.
– Central Processing Unit (CPU), memory, disk storage,
monitor, keyboard, mouse, printer, etc.
• Software consists of the programs that enable us to
solve problems with a computer by providing it with a
list of instructions to follow
– Windows OS, MS Word, Mozilla Firefox, etc.
CSE 115 Programming Language I ECE@NSU
5
Computer Hardware
• Main Memory
– RAM - Random Access Memory - Memory that can be read and written in any
order (as opposed to sequential access memory), volatile.
– ROM - Read Only Memory - Memory that cannot be written to, non-volatile.
• Secondary Memory: Magnetic hard disks, Flash (solid state)
disks, Optical disks (CDs and DVDs).
• Central Processing Unit (CPU): Executes all computer
operations and perform arithmetic and logical operations.
• Input/Output Devices: keyboard, mouse, scanner, monitor,
printer, and speakers.
• Computer Networks – Computers that are linked together can
communicate with each other.
CSE 115 Programming Language I ECE@NSU
6
Components of a Computer
CSE 115 Programming Language I ECE@NSU
7
Memory
• Memory: a large collection of memory cells
• Each Memory Cell has an address and a value
• Bit: Binary digit = Either 0 or 1
• Byte: Made up of 8 bits
• Memory Address: position of a memory cell
• Memory Content: Value stored in memory
– Every memory cell has content, whether we know it or not
• Memory capacity
– Kilobyte (KB) = 210 = 1024 Bytes; Megabyte (MB) = 220 Bytes > 106 Bytes
– Gigabyte (GB) = 230 > 109 Bytes; Terabyte (TB) = 240 Bytes > 1012 Bytes
65
One bit
Byte = 8 bits
.
.
. Byte at
address 16
value = 65
.
.
.
0
1
2
3
16
17
18
Memory
Addresses
CSE 115 Programming Language I ECE@NSU
8
Computer Software
• Operating System - controls the interaction between
machine and user. Examples: Windows, Linux, etc.
– Communicates with computer user.
– Collects input and Displays output.
– Manages memory and processor time.
– Manages Storage Disk.
• Application Software - developed to assist a computer
user in accomplishing specific tasks. Example: MS
Word, Google Chrome, etc.
CSE 115 Programming Language I ECE@NSU
9
Computer languages
• High-level Language: Combines algebraic expressions and
high-level commands
– High Level : Very far away from the actual machine language
– Examples: Fortran, C, Prolog, C#, Perl, and Java.
• Machine Language: A collection of machine instructions
– Not standardized. There is a different machine language for every
processor family.
• Assembly Language: uses symbols (called mnemonics) that
correspond to machine language instructions.
– Low level: Very close to the actual machine language.
CSE 115 Programming Language I ECE@NSU
10
Compiler
• Compilation is the process of translating the source code (high-
level) into executable code (machine level).
• Source file: contains the original program code
– A Compiler turns the Source File into an Object File
• Object file: contains machine language instructions
– A Linker turns the Object File into an Executable
• Integrated Development Environment (IDE): a program that
combines simple text editor with a compiler, linker, loader, and
debugger tool
– Examples: Code::Blocks, Eclipse, Visual Studio, etc.
CSE 115 Programming Language I ECE@NSU
11
Editing, Translating, Linking, and
Running High-Level Language Programs
CSE 115 Programming Language I ECE@NSU
12
Flow of Information During Program
Execution
CSE 115 Programming Language I ECE@NSU
13
Software Development Method
1. Specify problem requirements
2. Analyze the problem
3. Design the algorithm to solve the problem
4. Implement the algorithm
5. Test and verify the completed program
6. Maintain and update the program
CSE 115 Programming Language I ECE@NSU
14
Steps Defined
1. Problem: statement that specifies the problem that should be
solved on the computer.
2. Analysis: Understanding the problem and identifying the
inputs, outputs, and required computation.
3. Design - Designing and developing the list of steps called
algorithm to solve the problem.
4. Implementation: writing the algorithm as a program using a
given programming language.
5. Testing - Testing requires checking and verifying that the
program actually works as desired.
6. Maintenance - Maintaining involves finding previously
undetected errors and keep it up-to-date.
CSE 115 Programming Language I ECE@NSU
15
Converting Miles to Kilometers
1. Problem: Your boss wants you to convert a list of miles to
kilometers. Since you like programming, you decide to write
a program to do the job.
2. Analysis
• We need to receive miles as input
• We need to output kilometers
• We know 1 mile = 1.609 kilometers
3. Design
1. Get distance in miles
2. Convert to kilometers
3. Display kilometers
CSE 115 Programming Language I ECE@NSU
16
Implementation in C Language
/*
* Converts distance in miles to kilometers.
*/
#include <stdio.h> // printf, scanf definitions
#define KMS_PER_MILE 1.609 // conversion constant
int main(void) {
float miles, // input – distance in miles
kms; // output – distance in kilometers
/* Get the distance in miles */
printf("Enter the distance in miles> ");
scanf("%f", &miles);
/* Convert the distance to kilometers */
kms = KMS_PER_MILE * miles;
/* Display the distance in kilometers */
printf("That equals %f kilometers.n", kms);
return 0;
}
Sample Run:
Enter the distance in miles> 10.0
That equals 16.090000 kilometers
CSE 115 Programming Language I ECE@NSU
17
Converting Miles to Kilometers
5. Test: We need to test the previous program to make sure it
works. To test we run our program and enter different values
and make sure the output is correct.
6. Maintenance: Next time, your boss wants to add a new feature,
so he wants you to add support for converting different units.
CSE 115 Programming Language I ECE@NSU
18
Pseudo Code and Flowchart
• Algorithm - A list of steps for solving a problem.
• Pseudo code - A combination of English phrases and
language constructs to describe the algorithm steps.
• Flowchart - A diagram that shows the step-by-step
execution of a program
CSE 115 Programming Language I ECE@NSU
19
Why Use Pseudo Code?
• The benefit of pseudo code is that it enables the programmer to
concentrate on the algorithm without worrying about all the
syntactic details of a particular programming language.
• In fact, you can write pseudo code without even knowing what
programming language you will use for the final
implementation.
• Pseudo code cannot be compiled or executed, and does not
follow syntax rules. It is simply an important step in producing
the final code.
• Example:
Input Miles
Kilometers = Miles * 1.609
Output Kilometers
CSE 115 Programming Language I ECE@NSU
20
Another Example of Pseudo Code?
• Problem: Calculate your final grade for CSE 115
• Specify the problem: Get different grades and then compute
the final grade.
• Analyze the problem: We need to input grades for quizzes,
assignments, exams, class performance and the percentage
each part counts for. Then we need to output the final grade.
• Design
1. Get the grades: exams, quizzes, assignments, and labs.
2. Grade = 0.2 * Quizzes + 0.1 * Assignments + 0.25 * Midterm Exam +
0.4 * Final Exam + 0.05 * Class Performance
3. Output the Grade
• Implement and Test: Learn how to program in C, Write the
program, then input some test values, calculate and check the
final grade.
CSE 115 Programming Language I ECE@NSU
21
Flowchart
Process Start or Terminal
Decision Document
Display Manual Input
CSE 115 Programming Language I ECE@NSU
22
Example of Flowchart
Start
Get Grades and
percentages
Calculate
Final grade
Display
Grade
End
CSE 115 Programming Language I ECE@NSU
23
Professional Ethics
• Privacy and Misuse of Data
– computer theft (computer fraud) - Illegally obtaining
money by falsifying information in a computer database
• Computer Hacking
– Virus - Code attached to another program that spreads
through a computer’s disk memory, disrupting the computer
or erasing information
– Worm - A virus that can disrupt a network by replicating
itself on other network computers
CSE 115 Programming Language I ECE@NSU
24
Professional Ethics
• Plagiarism and Software Piracy
– Software piracy – Violating copyright agreements by
illegally copying software for use in another computer
• Misuse of a Computer Resource
Ad

More Related Content

Similar to ch01_overview computer science and engineering.pdf (20)

Computer Programming In C.pptx
Computer Programming In C.pptxComputer Programming In C.pptx
Computer Programming In C.pptx
chouguleamruta24
 
Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
MohammedMohammed578197
 
C languaGE UNIT-1
C languaGE UNIT-1C languaGE UNIT-1
C languaGE UNIT-1
Malikireddy Bramhananda Reddy
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
Malikireddy Bramhananda Reddy
 
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDYC LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
Malikireddy Bramhananda Reddy
 
Unit ii
Unit   iiUnit   ii
Unit ii
sathisaran
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
Hossam Hassan
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
Gilbert NZABONITEGEKA
 
Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++
Mohamed El Desouki
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
TeddyDaka
 
CPP Lecture 1.pptx
CPP Lecture 1.pptxCPP Lecture 1.pptx
CPP Lecture 1.pptx
addisabebaw2
 
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptxUNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
RoselinLourd
 
X-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdfX-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdf
Alefya1
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
Ahmad Idrees
 
Paksitan Zindabad in ITDevelopment of IT
Paksitan Zindabad in ITDevelopment of ITPaksitan Zindabad in ITDevelopment of IT
Paksitan Zindabad in ITDevelopment of IT
ssuser6aa405
 
Intro in understanding to C programming .pptx
Intro in understanding to C   programming .pptxIntro in understanding to C   programming .pptx
Intro in understanding to C programming .pptx
abadinasargie
 
Intro in understanding to C programming .pptx
Intro in understanding to C   programming .pptxIntro in understanding to C   programming .pptx
Intro in understanding to C programming .pptx
abadinasargie
 
chapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfchapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdf
BernardVelasco1
 
Computer Programming In C.pptx
Computer Programming In C.pptxComputer Programming In C.pptx
Computer Programming In C.pptx
chouguleamruta24
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
Hossam Hassan
 
Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++
Mohamed El Desouki
 
Programming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptxProgramming requirements for beginning in software engineering.pptx
Programming requirements for beginning in software engineering.pptx
TeddyDaka
 
CPP Lecture 1.pptx
CPP Lecture 1.pptxCPP Lecture 1.pptx
CPP Lecture 1.pptx
addisabebaw2
 
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptxUNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
UNIT - 1jhjhjbkjhkjhkjhkjhkjhhkkhhh.pptx
RoselinLourd
 
X-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdfX-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdf
Alefya1
 
Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
Ahmad Idrees
 
Paksitan Zindabad in ITDevelopment of IT
Paksitan Zindabad in ITDevelopment of ITPaksitan Zindabad in ITDevelopment of IT
Paksitan Zindabad in ITDevelopment of IT
ssuser6aa405
 
Intro in understanding to C programming .pptx
Intro in understanding to C   programming .pptxIntro in understanding to C   programming .pptx
Intro in understanding to C programming .pptx
abadinasargie
 
Intro in understanding to C programming .pptx
Intro in understanding to C   programming .pptxIntro in understanding to C   programming .pptx
Intro in understanding to C programming .pptx
abadinasargie
 
chapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdfchapter1-161229182113 (1).pdf
chapter1-161229182113 (1).pdf
BernardVelasco1
 

Recently uploaded (20)

SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Sugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptxSugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptx
Dr. Renu Jangid
 
Operations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdfOperations Management (Dr. Abdulfatah Salem).pdf
Operations Management (Dr. Abdulfatah Salem).pdf
Arab Academy for Science, Technology and Maritime Transport
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 4-30-2025.pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 4-30-2025.pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdfIntroduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
james5028
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdfBiophysics Chapter 3 Methods of Studying Macromolecules.pdf
Biophysics Chapter 3 Methods of Studying Macromolecules.pdf
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
Kasdorf "Accessibility Essentials: A 2025 NISO Training Series, Session 5, Ac...
National Information Standards Organization (NISO)
 
SPRING FESTIVITIES - UK AND USA -
SPRING FESTIVITIES - UK AND USA            -SPRING FESTIVITIES - UK AND USA            -
SPRING FESTIVITIES - UK AND USA -
Colégio Santa Teresinha
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Kenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 CohortKenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 Cohort
EducationNC
 
APM Midlands Region April 2025 Sacha Hind Circulated.pdf
APM Midlands Region April 2025 Sacha Hind Circulated.pdfAPM Midlands Region April 2025 Sacha Hind Circulated.pdf
APM Midlands Region April 2025 Sacha Hind Circulated.pdf
Association for Project Management
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptxSCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
SCI BIZ TECH QUIZ (OPEN) PRELIMS XTASY 2025.pptx
Ronisha Das
 
Sinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_NameSinhala_Male_Names.pdf Sinhala_Male_Name
Sinhala_Male_Names.pdf Sinhala_Male_Name
keshanf79
 
Sugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptxSugar-Sensing Mechanism in plants....pptx
Sugar-Sensing Mechanism in plants....pptx
Dr. Renu Jangid
 
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdfIntroduction-to-Communication-and-Media-Studies-1736283331.pdf
Introduction-to-Communication-and-Media-Studies-1736283331.pdf
james5028
 
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulsepulse  ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
pulse ppt.pptx Types of pulse , characteristics of pulse , Alteration of pulse
sushreesangita003
 
dynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south Indiadynastic art of the Pallava dynasty south India
dynastic art of the Pallava dynasty south India
PrachiSontakke5
 
How to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odooHow to Set warnings for invoicing specific customers in odoo
How to Set warnings for invoicing specific customers in odoo
Celine George
 
Odoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo SlidesOdoo Inventory Rules and Routes v17 - Odoo Slides
Odoo Inventory Rules and Routes v17 - Odoo Slides
Celine George
 
Real GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for SuccessReal GitHub Copilot Exam Dumps for Success
Real GitHub Copilot Exam Dumps for Success
Mark Soia
 
Geography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjectsGeography Sem II Unit 1C Correlation of Geography with other school subjects
Geography Sem II Unit 1C Correlation of Geography with other school subjects
ProfDrShaikhImran
 
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
How to track Cost and Revenue using Analytic Accounts in odoo Accounting, App...
Celine George
 
apa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdfapa-style-referencing-visual-guide-2025.pdf
apa-style-referencing-visual-guide-2025.pdf
Ishika Ghosh
 
Kenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 CohortKenan Fellows Participants, Projects 2025-26 Cohort
Kenan Fellows Participants, Projects 2025-26 Cohort
EducationNC
 
To study Digestive system of insect.pptx
To study Digestive system of insect.pptxTo study Digestive system of insect.pptx
To study Digestive system of insect.pptx
Arshad Shaikh
 
Ad

ch01_overview computer science and engineering.pdf

  • 1. CSE 115 Programming Language I ECE@NSU Overview of Computers and Programming Mirza Mohammad Lutfe Elahi
  • 2. CSE 115 Programming Language I ECE@NSU 2 Outline • Overview of Computers – Hardware – Software • Computer Languages • Software Development Method • Pseudo Code and Flowcharts • Professional Ethics
  • 3. CSE 115 Programming Language I ECE@NSU 3 Computers • Computers receive input, store, process, and output information. • Computer can deal with numbers, text, images, graphics, and sound. • Computers are worthless without programming. • Programming Languages allow us to write programs that tell the computer what to do and to provide a way to communicate with computers. • Programs are then converted to machine instructions so the computer can understand it.
  • 4. CSE 115 Programming Language I ECE@NSU 4 Hardware & Software • Hardware is the equipment used to perform the necessary computations. – Central Processing Unit (CPU), memory, disk storage, monitor, keyboard, mouse, printer, etc. • Software consists of the programs that enable us to solve problems with a computer by providing it with a list of instructions to follow – Windows OS, MS Word, Mozilla Firefox, etc.
  • 5. CSE 115 Programming Language I ECE@NSU 5 Computer Hardware • Main Memory – RAM - Random Access Memory - Memory that can be read and written in any order (as opposed to sequential access memory), volatile. – ROM - Read Only Memory - Memory that cannot be written to, non-volatile. • Secondary Memory: Magnetic hard disks, Flash (solid state) disks, Optical disks (CDs and DVDs). • Central Processing Unit (CPU): Executes all computer operations and perform arithmetic and logical operations. • Input/Output Devices: keyboard, mouse, scanner, monitor, printer, and speakers. • Computer Networks – Computers that are linked together can communicate with each other.
  • 6. CSE 115 Programming Language I ECE@NSU 6 Components of a Computer
  • 7. CSE 115 Programming Language I ECE@NSU 7 Memory • Memory: a large collection of memory cells • Each Memory Cell has an address and a value • Bit: Binary digit = Either 0 or 1 • Byte: Made up of 8 bits • Memory Address: position of a memory cell • Memory Content: Value stored in memory – Every memory cell has content, whether we know it or not • Memory capacity – Kilobyte (KB) = 210 = 1024 Bytes; Megabyte (MB) = 220 Bytes > 106 Bytes – Gigabyte (GB) = 230 > 109 Bytes; Terabyte (TB) = 240 Bytes > 1012 Bytes 65 One bit Byte = 8 bits . . . Byte at address 16 value = 65 . . . 0 1 2 3 16 17 18 Memory Addresses
  • 8. CSE 115 Programming Language I ECE@NSU 8 Computer Software • Operating System - controls the interaction between machine and user. Examples: Windows, Linux, etc. – Communicates with computer user. – Collects input and Displays output. – Manages memory and processor time. – Manages Storage Disk. • Application Software - developed to assist a computer user in accomplishing specific tasks. Example: MS Word, Google Chrome, etc.
  • 9. CSE 115 Programming Language I ECE@NSU 9 Computer languages • High-level Language: Combines algebraic expressions and high-level commands – High Level : Very far away from the actual machine language – Examples: Fortran, C, Prolog, C#, Perl, and Java. • Machine Language: A collection of machine instructions – Not standardized. There is a different machine language for every processor family. • Assembly Language: uses symbols (called mnemonics) that correspond to machine language instructions. – Low level: Very close to the actual machine language.
  • 10. CSE 115 Programming Language I ECE@NSU 10 Compiler • Compilation is the process of translating the source code (high- level) into executable code (machine level). • Source file: contains the original program code – A Compiler turns the Source File into an Object File • Object file: contains machine language instructions – A Linker turns the Object File into an Executable • Integrated Development Environment (IDE): a program that combines simple text editor with a compiler, linker, loader, and debugger tool – Examples: Code::Blocks, Eclipse, Visual Studio, etc.
  • 11. CSE 115 Programming Language I ECE@NSU 11 Editing, Translating, Linking, and Running High-Level Language Programs
  • 12. CSE 115 Programming Language I ECE@NSU 12 Flow of Information During Program Execution
  • 13. CSE 115 Programming Language I ECE@NSU 13 Software Development Method 1. Specify problem requirements 2. Analyze the problem 3. Design the algorithm to solve the problem 4. Implement the algorithm 5. Test and verify the completed program 6. Maintain and update the program
  • 14. CSE 115 Programming Language I ECE@NSU 14 Steps Defined 1. Problem: statement that specifies the problem that should be solved on the computer. 2. Analysis: Understanding the problem and identifying the inputs, outputs, and required computation. 3. Design - Designing and developing the list of steps called algorithm to solve the problem. 4. Implementation: writing the algorithm as a program using a given programming language. 5. Testing - Testing requires checking and verifying that the program actually works as desired. 6. Maintenance - Maintaining involves finding previously undetected errors and keep it up-to-date.
  • 15. CSE 115 Programming Language I ECE@NSU 15 Converting Miles to Kilometers 1. Problem: Your boss wants you to convert a list of miles to kilometers. Since you like programming, you decide to write a program to do the job. 2. Analysis • We need to receive miles as input • We need to output kilometers • We know 1 mile = 1.609 kilometers 3. Design 1. Get distance in miles 2. Convert to kilometers 3. Display kilometers
  • 16. CSE 115 Programming Language I ECE@NSU 16 Implementation in C Language /* * Converts distance in miles to kilometers. */ #include <stdio.h> // printf, scanf definitions #define KMS_PER_MILE 1.609 // conversion constant int main(void) { float miles, // input – distance in miles kms; // output – distance in kilometers /* Get the distance in miles */ printf("Enter the distance in miles> "); scanf("%f", &miles); /* Convert the distance to kilometers */ kms = KMS_PER_MILE * miles; /* Display the distance in kilometers */ printf("That equals %f kilometers.n", kms); return 0; } Sample Run: Enter the distance in miles> 10.0 That equals 16.090000 kilometers
  • 17. CSE 115 Programming Language I ECE@NSU 17 Converting Miles to Kilometers 5. Test: We need to test the previous program to make sure it works. To test we run our program and enter different values and make sure the output is correct. 6. Maintenance: Next time, your boss wants to add a new feature, so he wants you to add support for converting different units.
  • 18. CSE 115 Programming Language I ECE@NSU 18 Pseudo Code and Flowchart • Algorithm - A list of steps for solving a problem. • Pseudo code - A combination of English phrases and language constructs to describe the algorithm steps. • Flowchart - A diagram that shows the step-by-step execution of a program
  • 19. CSE 115 Programming Language I ECE@NSU 19 Why Use Pseudo Code? • The benefit of pseudo code is that it enables the programmer to concentrate on the algorithm without worrying about all the syntactic details of a particular programming language. • In fact, you can write pseudo code without even knowing what programming language you will use for the final implementation. • Pseudo code cannot be compiled or executed, and does not follow syntax rules. It is simply an important step in producing the final code. • Example: Input Miles Kilometers = Miles * 1.609 Output Kilometers
  • 20. CSE 115 Programming Language I ECE@NSU 20 Another Example of Pseudo Code? • Problem: Calculate your final grade for CSE 115 • Specify the problem: Get different grades and then compute the final grade. • Analyze the problem: We need to input grades for quizzes, assignments, exams, class performance and the percentage each part counts for. Then we need to output the final grade. • Design 1. Get the grades: exams, quizzes, assignments, and labs. 2. Grade = 0.2 * Quizzes + 0.1 * Assignments + 0.25 * Midterm Exam + 0.4 * Final Exam + 0.05 * Class Performance 3. Output the Grade • Implement and Test: Learn how to program in C, Write the program, then input some test values, calculate and check the final grade.
  • 21. CSE 115 Programming Language I ECE@NSU 21 Flowchart Process Start or Terminal Decision Document Display Manual Input
  • 22. CSE 115 Programming Language I ECE@NSU 22 Example of Flowchart Start Get Grades and percentages Calculate Final grade Display Grade End
  • 23. CSE 115 Programming Language I ECE@NSU 23 Professional Ethics • Privacy and Misuse of Data – computer theft (computer fraud) - Illegally obtaining money by falsifying information in a computer database • Computer Hacking – Virus - Code attached to another program that spreads through a computer’s disk memory, disrupting the computer or erasing information – Worm - A virus that can disrupt a network by replicating itself on other network computers
  • 24. CSE 115 Programming Language I ECE@NSU 24 Professional Ethics • Plagiarism and Software Piracy – Software piracy – Violating copyright agreements by illegally copying software for use in another computer • Misuse of a Computer Resource