0% found this document useful (0 votes)
14 views38 pages

Discussion 1

Uploaded by

johnanora101
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)
14 views38 pages

Discussion 1

Uploaded by

johnanora101
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/ 38

INTRODUCTION TO

COMPUTING

LECTURE 1
by:
ENGR. MELOJEAN C. MARAVE
ONE CANNOT LEAVE
WITHOUT
TECHNOLOGY

TECHNOLOGY IS
NOW A WAY OF LIFE
“BEHIND THE
SCENE”

is driven by a

COMPUTER
PROGRAM
OBJECTIVES:
1. Understand the actions and processes these
technologies are providing.
2. Explore the step – by – step procedures on how
these technologies came to reality.
3. Assist the students in the different cycle of
Computer Programming from the resources
used for processing, how it is processed, when
it is to be processed, the output of the process,
and the fuel that drives the process.
4. Guide the students to appreciate the analysis
side of programming.
5. Facilitate students the simplest way of
appreciating and learning the “behind the
scene” of technology.
As the tool always says,
it always begins with
“START” and end with a
“STOP”. This is the start
of the journey, let as
explore the first symbol
of flowcharting that
would bring us to the
world of computer
RELATIONSHIP OF THE COMPONENTS

INPUT OUTPUT
PROCESS

OUTPUT
Figure 1:
Components of a Computer System
BLUE PRINT
- Is the logic and ideas transformed into a
map of how computer should do things.
-It also serve as the basis of how a computer
functions, and how data are processed inside the
computer.
SOFTWARE (Implementation)
- Instructions that tells the computer what
to do.
HARDWARE (Execution)
- Physical computer itself.
DATA
- Refers to numbers, alphabets, and
alphanumeric characters.
CENTRAL PROCESSING UNIT (CPU)
- It is just a tiny square piece of Integrated
Circuit (IC) attached on the mother board that
normally has a dimension of “1x1”, though small in
size, its functions in the computer system is
enormous because it functions as the “BRAIN OF
THE COMPUTER”
COMPONENTS OF CENTRAL PROCESSING UNIT

CONTROL UNIT (C.U.)


- The command center of the processor.

Functions
1. Read and interpret instructions.
2. Direct flow of operations of computer and
hardware devices.
3. Control the flow of instructions and data.
COMPONENTS OF CENTRAL PROCESSING UNIT

REGISTER
- A temporary storage microchip that holds
data during processing.

Type
RANDOM ACESS MEMORY (RAM)
- Volatile character – data are lost once
electric current is turned off; it just holds data
temporarily for processing.
The ROM Advantages
• It is non-volatile.
• ROM costs less. In other words, it is cheaper.
• It does not need to be refreshed and is static.
• ROM has simple circuits.
• It is reliable
• The size of the ROM is more extended when compared to
RAM
• It is more accessible to the interface
• ROM’s design and speed is easy
• Its functions can be easily modified
• Data storage is permanent in ROM
• Data is secured when stored in ROM
• ROM is responsible for starting up the computer. It also
loads the operating system.
• ROM has a small battery that comes with a longer life.
Disadvantages of ROM
• ROM is permanent. In other words, it cannot be changed.
• Re-creating the ROM is not possible.
• Changes are not possible once it is written because it is
read-only.
COMPONENTS OF CENTRAL PROCESSING UNIT

ARITHMETIC and LOGIC UNIT (A.L.U.)


- The most significant component inside the
CPU.
- It is the chief of operations of the computer.

Two Major Operations


1. Mathematical Operations
2. Relational Operations
COMPUTER – is defined as electronic device that can
accept, process, and store vast amount of data to
produce useful information.

SYNTAX
- is the rule that governs a programming
language. (Every programming language is unique
and have their specific set of syntax
Example: C Language syntax
printf(“Enter your name”);
COMPILER– transform the code into a machine
language (series of 0’s and 1’s to represent ON and
OFF states of the computer devices. It is also the
representation of the digital electronic charges inside
the computer).

COMPUTER PROGRAM OR CODE– is a set of logical


instructions given to a computer for data processing
that is interpreted by a compiler to produce useful
information.
COMPUTER PROGRAMMERS– write computer
instructions in computer programming language.
PROGRAMMING LANGUAGE

-is a formal language comprising a set of


instructions that produce various kinds of output. It is
used in computer programming to implement
algorithms. Most programming languages consist of
instructions for computers.
GUIDE QUESTIONS IN PLANNING AND
DEVELOPING A PROGRAM:

1. What is the problem?


2. What are the available data?
3. What output information or data is needed?
4. When do you need the output?
5. What is processing is needed to produce the
output?
6. What is the desired output?
7. Where should the output go?
FLOWCHART

- is a modeling tool used to illustrate data,


instructions, process, information, and workflow
by the use of specialized symbols.
- is a step – by – step graphical
representation of a solution.
BASIC FLOWCHART SYMBOLS

OVAL

NAME DESCRIPTION

Define the starting


TERMINAL and ending point
of a flowchart
BASIC FLOWCHART SYMBOLS

HEXAGON

NAME DESCRIPTION

The preparation or
INITIALIZATION initialization of
memory space for
data processing
BASIC FLOWCHART SYMBOLS

PARALLELOGRAM

NAME DESCRIPTION
The inputting of
data for
INPUT / OUTPUT processing, and the
printing out of
processed data
BASIC FLOWCHART SYMBOLS

RECTANGLE
/SQUARE
NAME DESCRIPTION
Manipulation of
data (assignments
PROCESS and mathematical
computations)
BASIC FLOWCHART SYMBOLS

NAME DESCRIPTION
Defines the logical
sequence of the
FLOW LINES program. It points
to the next symbol
to be performed.
BASIC FLOWCHART SYMBOLS

NAME DESCRIPTION
Connects to the
flowchart to avoid
ON – PAGE spaghetti
CONNECTOR connection on the
same page
BASIC FLOWCHART SYMBOLS

NAME DESCRIPTION
Connects the
flowchart on
OFF – PAGE different page to
CONNECTOR avoid spaghetti
connection.
BASIC FLOWCHART SYMBOLS

or

NAME DESCRIPTION
Process conditions
using relational
DECISION operators. Used for
trapping and
filtering data.
EXAMPLE:
EXAMPLE:
1ST PAGE 2ND PAGE
How data are represented in the program
VARIABLE
- is a primary storage location that can assume
different numeric or alphanumeric values. It is also a
memory space allocated by a computer user for
processing and storing data.
- need names to be identified.
Example: Firstname, A, X

DATA TYPE
- is the type of the data being processed in the
program. However, data type is language specific and
may have different representations.
VARIABLES NAME CHARACTERISTICS
 Must be descriptive and significant to the
data, problem and its solution. It should be
descriptive enough to identify the process or
data it is referring to.
 Combinations of alphanumeric characters
(alphabet, numbers and special characters)
can be used as a variable name provided that
it starts with an alphabet.
 Although the length of variable name can
have 256 characters, the lesser the number of
characters the more efficient the program is.
EXAMPLES OF VARIABLE NAME

 Sum, Product
 First_name, Last_name
 Int1, int1, int_1
 Answer, num1, numero_1
 Kasarian, Total
BASIC DATA TYPES
DATA TYPE DESCRIPTION EXAMPLE
*Integer Whole number 12, 900, 34000,
657
**Float or Integer with decimal 0.12, 5.125, 0.04,
Double numbers 3.1416, 100.56
*Character Alphabets and special M x * & ?
characters
*String Combination of Sum , Product
characters FirstName, int_1
*Boolean Reply of the compiler Values are either 1
in the program that is for YES or 0 for NO
performed behind
the scene

* Used mostly by all programming languages


** C / C++, Java, Visual Basic and other Languages Specific
MATHEMATICAL OPERATORS
OPERATION SYMBOL EXAMPLE EXPLANATIO
N
Multiplication * A*B Multiply the value
of variable A to
variable B
Division / X/Y Divide the value of
variable X by the
value of variable Y
Addition + int1 + int2 Add the value of
variable int1 to
the value of
variable int2

Subtraction - A–B Subtract the value


of variable B to
variable A
Exponentation ^ C^2 Square the value
of variable C
EXAMPLES:
MATHEMATICAL COMPUTER
EXPRESSION EXPRESSION
1. 3xy 3*x*y
2. X2 + Y2 (x * x) + (y * y) or
x^2 + y^2
3. 3x (3 * x) / (y * y*y)
y3 or (3* x) / (y^3)
4. a2 +
b2 ((a * a) + (b *
cd b)) / (c*d)
or (a^2 + b^2)/
(c * d)
RELATIONAL/LOGICAL OPERATORS
OPERATION SYMBOL EXAMPLE EXPLANATIO
N
Greater than > A>B The value of variable
A is greater than to
the value of variable
B

Less than < X<Y The value of variable


X is less than to the
value of variable Y

Equal to == int1 == int2 The value of variable


int1 is equal to the
value of variable int2

Not equal to <> Net <> Gross The value of variable


Net is not equal to
the value of variable
Gross
RELATIONAL/LOGICAL OPERATORS
OPERATION SYMBOL EXAMPLE EXPLANATIO
N
Greater than or >= Pay1 >= Pay 2 The value of variable
equal to Pay1 is greater than
or equal to the value
of the variable Pay2

Less than or equal to <= Age1 <= Age2 The value of variable
Age1 is less than or
equal to the value of
the variable Age2
TYPES OF VARIABLES
DESTRUCTIVE
- variables that destroy or change its
value after processing. This type of variable is
normally the temporary storage of data during
processing.

Constructive
- variables that maintains its value after
being used in the process
EXAMPLES
DESTRUCTIVE
- variables that destroy or change its
value after processing. This type of variable is
normally the temporary storage of data during
processing.

Constructive
- variables that maintains its value after
being used in the process
Thank you!!!
God Bless us All!

You might also like