This course introduces students to fundamental constructs of programming using generic program logic design tools like flowcharting and pseudo coding to formulate algorithmic solutions to basic computing problems.
1. College of Computer Studies
Chapter 1 - Introduction to ITELOG 113
Presented by: Mark Jarus T. Talanquines, MIT
2. COMPUTER SYSTEM
COMPUTER SYSTEM - Combination of all the components required to
process and store data using a computer. Every computer system is
composed of multiple pieces of hardware and software.
ITELOG 113 - Program and Logic Formulation
3. COMPUTER HARDWARE
HARDWARE – is the equipment, or the physical devices, associated with a computer.
• The devices are manufactured differently for computers of varying sizes—for example,
large mainframes, laptops, and very small devices embedded into products such as
telephones, cars, and thermostats.
• However, the types of operations performed by different-sized computers are very similar.
ITELOG 113 - Program and Logic Formulation
4. COMPUTER SOFTWARE
SOFTWARE – is computer instruction that tell the hardware what to do. It is a program,
which are instruction sets written by programmers. You can buy prewritten programs that
are stored on a disk or that you download from the Web.
• Alternatively, you can write your own programs. When you write software instructions,
you are programming.
ITELOG 113 - Program and Logic Formulation
5. Software can be classified in 2 broad types:
1. System software - performs task necessary to the efficient management of the
hardware. It refers to the computer programs or library files whose purpose is to help run
the computer system. Ex. OS, Utility Program, Compilers/Interpreters.
2. Application software - are programs that help solve and meet user problems and
needs directly. They are designed to perform specific functions.
ITELOG 113 - Program and Logic Formulation
6. Application Software Classification
1. Commercial – comes prepackaged and is available from software vendors.
Commercial software must be purchased.
2. Shareware – are developed and released as demonstration version of the commercial
product. Each demonstration has an expiration date.
3. Open Source – created by generous programmers and released to the public domain
for free and for public use
ITELOG 113 - Program and Logic Formulation
7. Together, computer hardware and software
accomplish four major operations in most programs:
1. INPUT - Data items will enter the computer system and are placed in memory, where
they can be processed. Hardware devices that perform input operations include
keyboards, mouse, etc. Data items include all the text, numbers, and other raw material
that are entered into and processed by a computer.
2. PROCESS/STORAGE – Processing data items may involve organizing or sorting
them, checking them for accuracy, or performing calculations with them. The hardware
component that performs these types of tasks is the central processing unit, or CPU.
The processed data are then stored (temporary/ permanent)
3. OUTPUT - After data items have been processed, the resulting information usually is
sent to a printer, monitor, or some other output device so people can view, interpret,
and use the results. Programming professionals often use the term data for input items,
but use the term information for data that has been processed and output.
ITELOG 113 - Program and Logic Formulation
8. Together, computer hardware and software
accomplish four major operations in most programs:
ITELOG 113 - Program and Logic Formulation
9. COMPUTER PROGRAMMING
Computer Programming - (often shortened to programming or coding) is
the process of designing, writing, testing, debugging, and maintaining the
source code of computer programs.
• This source code is written in one or more programming languages (such
as Java, C++, C#, Python, etc.).
ITELOG 113 - Program and Logic Formulation
11. The role of a programming language can be
described in two ways:
1. Technical : It is a means for instructing a Computer to perform tasks.
2. Conceptual : It is a framework within which we organize our ideas about things and
processes.
According to the last statement, in programming we deal with two kinds of things:
1. Data - representing ''objects'' we want to manipulate.
2. Procedures - ''descriptions'' or ''rules'' that define how to manipulate data.
ITELOG 113 - Program and Logic Formulation
12. COMPUTER PROGRAMMER
Computer Programmer - computer programmer, developer, or coder is a person who
writes computer software. The term computer programmer can refer to a specialist in one
area of computer programming or to a generalist who writes code for many kinds of
software.
• A programmer's primary computer language (C, C++, Java, Lisp, Python etc.) is often
prefixed to the above titles, and those who work in a Web environment often prefix their
titles with Web.
• The term programmer can be used to refer to a Software developer, Web Developer,
Mobile Applications Developer, Embedded Firmware Developer, Software engineer,
Computer Scientist, or Software Analyst.
ITELOG 113 - Program and Logic Formulation
13. Person’s in Programming
• British countess and mathematician Ada Lovelace is popularly credited as history's first
programmer, as she was the first to express an algorithm intended for implementation on a
computer, Charles Babbage's analytical engine, in October 1842, intended for the calculation of
Bernoulli numbers.
• Her work never ran because Babbage's machine was never completed to a functioning standard in
her time; the first programmer to successfully run a program on a functioning modern electronically
based computer was pioneer computer scientist Konrad Zuse, who achieved this feat in 1941.
• The ENIAC programming team, consisting of Kay McNulty, Betty Jennings, Betty Snyder, Marlyn
Wescoff, Fran Bilas and Ruth Lichterman were the first regularly working programmers. To build
programs, people use languages that are similar to human language. The results are translated
into machine code, which computers understand.
ITELOG 113 - Program and Logic Formulation
14. The First Programming Language
• Even though there’s not a definite answer, Plankalkül, pronounced “Plan Calculus”, is
regarded as the world’s first high-level programming language for computers. Created by
German engineer Konrad Zuse between 1942 and 1945, the language didn’t receive
much attention. The popular languages that followed Plankalkül were Fortran and Lisp.
• Every other day, we come across the release of some new programming language. While
popular languages like Java and C++ continue to impress us with their timeless nature,
comparatively newer languages like Go and Swift are attracting the newer crowd.
ITELOG 113 - Program and Logic Formulation
Plankalkül or “Plan Calculus”
15. Programming languages fall into three broad
categories:
1. Machine Languages
2. Assembly Languages
3. Higher-Level Languages
ITELOG 113 - Program and Logic Formulation
16. Programming languages fall into three broad
categories (con):
1. Machine languages - (first-generation languages) are the most basic type of computer
languages, consisting of strings of numbers the computer's hardware can use. Different
types of hardware use different machine code. For example, IBM computers use
different machine language than Apple computers.
2. Assembly languages - (second-generation languages) are only somewhat easier to
work with than machine languages. To create programs in assembly language,
developers use cryptic English-like phrases to represent strings of numbers. The code
is then translated into object code, using a translator called an assembler.
3. Higher-level languages - Are more powerful than assembly language and allow the
programmer to work in a more English-like environment. Higher-level programming
languages are divided into three "generations”, each more powerful than the last:
• Third - generation languages
• Fourth - generation languages
• Fifth - generation languages
ITELOG 113 - Program and Logic Formulation
17. PROGRAMMING LANGUAGE
Mnemonics - is a device such as a pattern of letters, ideas, or associations that assists in remembering
something.
“ex. WYSIWYG = what you see is what you get“.
“ex. PEMDAS = Parenthesis, exponent, multiplication, division, addition, subtraction”.
“ex. SOHCAHTOA = Sin(x) = Opp/Hyp, Cos(x) = Adj/Hyp, and Tan(x) = Opp/Adj”.
ITELOG 113 - Program and Logic Formulation
18. Higher-level programming languages are
divided into three "generations”:
1. Third-Generation Languages - (3GLs) are the first to use true English-like phrasing, making
them easier to use than previous languages. 3GLs are portable, meaning the object code
created for one type of system can be translated for use on a different type of system.
The following languages are the 3GLs:
FORTRAN C
COBOL C++
BASIC Java
Pascal ActiveX
2. Fourth-generation languages - (4GLs) are even easier to use than 3GLs. 4GLs may use a
text-based environment (like a 3GL) or may allow the programmer to work in a visual
environment, using graphical tools.
The following languages are 4GLs:
Visual Basic (VB)
Visual C#
NetBeans Java
ITELOG 113 - Program and Logic Formulation
19. Higher-level programming languages are
divided into three "generations”(con):
3. Fifth-generation languages - (5GLs) are an issue of debate in the programming
community – some programmers cannot agree that they even exist. These high-level
languages would use artificial intelligence to create software, making 5GLs extremely
difficult to develop. Solve problems using constraints rather than algorithms, used in
Artificial Intelligence Prolog.
ITELOG 113 - Program and Logic Formulation
20. LANGUAGE AND ELEMENTS
1. Vocabulary - The vocabulary is the set of all the words in the language.
2. Syntax - Syntax consists of the rules for combining words into sentences, or statements as they
are more usually called in programming language.
3. Semantics - Semantics define the rules for interpreting the meaning of sentences
1. A compiler is a program that reads a high-level program and translates it all at once, before
running any of the commands.
2. An interpreter is a program that reads a high-level program and translates the program line-by-
line, alternately reading lines and carrying out commands.
ITELOG 113 - Program and Logic Formulation
21. PROGRAMMING ERRORS
• Programming errors are called bugs.
• The process of tracking them down and correcting them is called debugging.
• There are a three kinds of errors that can occur in a program, and it is useful to distinguish
them to track them down more quickly.
Syntax Error, Runtime Error, Logic or Semantics Error
ITELOG 113 - Program and Logic Formulation
22. PROGRAMMING ERRORS (con)
• Syntax Error - This kind of error occurs when we violate a syntax rule. These errors are
detected at compile time period. Usually, this is kind of error is easiest to find.
• Runtime Error - This kind of error occurs when we ask the computer to do something
that is illegal. These errors are detected at runtime.
• Logic or Semantics Error - This are also called as semantic error. It will compile and run
without generating error messages, but it will not do the right thing. These errors are very
hard to find because the computer can’t detect it.
ITELOG 113 - Program and Logic Formulation
23. UNDERSTANDING PROGRAM LOGIC
1. A program with syntax errors cannot be fully translated and cannot execute.
2. A program with no syntax errors is translatable and can execute, but it still might contain
logical errors and produce incorrect output as a result.
3. For a program to work properly, you must develop correct logic; that is, you must write
program instructions in a specific sequence, you must not leave any instructions out, and you must
not add extraneous instructions.
4. Although the syntax of programming languages differs, the same program logic can be
expressed in different languages.
5. Most simple computer programs include steps that perform input, processing, and output.
6. Write a computer program to double any number you provide.
ITELOG 113 - Program and Logic Formulation
24. PROGRAM DEVELOPMENT LIFE CYCLE
• The program development life cycle is a set of steps or phases that are used to develop a
program in any programming language.
1. Understand the problem.
2. Plan the logic.
3. Code the program.
4. Use software (a compiler or interpreter) to translate the program into machine language
5. Test the program.
6. Put the program into production.
7. Maintain the program
ITELOG 113 - Program and Logic Formulation