[go: up one dir, main page]

0% found this document useful (0 votes)
24 views24 pages

Week 01

Uploaded by

manaskhalid042
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views24 pages

Week 01

Uploaded by

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

SECP1013: Introduction to Computing

LECTURE 01: INTRODUCTION TO COMPUTERS


BY: L AL AEN SULTAN

WEEK 01
Content
1. What is a Computer?
2. Applications of Computer
3. Types of computer
4. RAM
5. Input and Output Devices
6. Storage
7. CPU
8. Computer Programing
9. Programming Languages
10. Interpreter vs Compiler
Computer
 An electronic device that converts data into information
 Digital electronic device
 Programmable device
 Two-digit processing (Binary)

A computer is a programmable electronic device that accepts raw data as input and processes it with
a program to produce the result as output
Characteristics of Computer
Data & Information
Data:
Raw facts and figures

Information:
Processed form of Data that have some
meaning
Number System
1. Binary
2. Octal
3. Decimal
4. Hexadecimal
Main Components of Computer
Hardware
• Mechanical devices in the computer
• Anything that can be touched

Software
• Tell the computer what to do
• Also called a program
• Thousands of programs exist
Components of Computer in
terms of Functionality (Parts of
Computer)
1. Input Unit
2. Central Processing Unit (CPU)
3. Memory Unit
4. Output Unit
Input Devices
Accepts Data
Central Processing Unit (CPU)
Brain of the Computer
Memory
Store instructions, data
before processing and
after processing
Types of Memory
Random Access Memory (RAM)
• Volatile
• Stores current data and programs
• More RAM results in a faster system

Read Only Memory (ROM)


• Non-volatile
• Permanent storage of programs
• Holds the computer boot directions
Output Devices
Delivers information
Function of CPU
The main function of a computer processor is to execute instructions and produce an output.
Fetch, Decode, and Execute are the fundamental functions of the computer.

Fetch: the first CPU gets the instruction. That means binary numbers that are passed from RAM
to CPU.
Decode: When the instruction is entered into the CPU, it needs to decode the instructions. with
the help of ALU(Arithmetic Logic Unit), the process of decoding begins.
Execute: After the decode step the instructions are ready to execute
Store: After the execute step the instructions are ready to store in the memory.
What is a Program?
“A precise sequence of steps to solve a particular
problem”

OR

“A set of instructions defined to solve a problem”


Design Recipe
To design a program properly, we must:

• Analyze a problem statement, typically expressed as a word problem


• Express its essence, abstractly and with examples
• Formulate statements and comments in precise language
• Evaluate and revise the activities in light of checks and tests
Example
Problem: Find the sum two numbers N and M. Algorithm 1: Add two numbers entered by the user
The procedure is: Step 1: Start

1. Enter the two numbers in the variables N and Step 2: Declare variables num1, num2 and sum.
M. Step 3: Read values num1 and num2.
2. Sum them and save the result in the variable Step 4: Add num1 and num2 and assign the result to sum.
sum.
sum←num1+num2
3. Output the result Step 5: Display sum
Step 6: Stop
Flowchart:

Sum of Two Numbers

Read two numbers 529 and 256 from the keyboard and
find and display the sum of the two numbers.
Why Program?
Computer – programmable machine designed to follow instructions

Program – instructions in computer memory to make it do something

Programmer – person who writes instructions (programs) to make


computer perform a task

SO, without programmers, no programs; without programs, the


computer cannot do anything
Computer Programming
Computer programming is both an art and a science. It is an art because every aspect of a
program should be carefully designed. Listed below are a few of the things that must be designed
for any real-world computer program:

 The logical flow of the instructions


 The mathematical procedures
 The appearance of the screens
 The way information is presented to the user
 The program’s “user-friendliness”
 Manuals and other forms of written documentation
Logical flow:
Science: Follows strict rules and logic to ensure the program works.
Art: Different programmers can solve the same problem in unique, creative ways.

Mathematical procedures:
Science: Correct math is essential for accurate results.
Art: Creative solutions can make the program faster and more efficient.

Screen design:
Science: Screens must be functional and work on different devices.
Art: Good design makes the program look appealing and easy to use.

Presenting information:
Science: Information must be correct and easy to understand.
Art: Creative presentation helps users engage with the data better.

User-friendliness:
Science: Programs need to be easy to navigate and error-free.
Art: Intuitive design makes the program enjoyable to use.

Documentation:
Science: Clear and accurate instructions are essential.
Art: Well-written guides make it easy for users to understand and learn.
Programming Languages

A Programming Language is a
special language used to
write a computer program

You might also like