Unit I
Introduction to Computers and Programming Logic
Introduction
This course begins with an introduction to computers and logic that encapsulates the topics or lessons that you
need to learn, understand and value. Unit 1 is composed of three parts of which the first part pertains to
computer systems and its organization. The next part is the course directions where students are directed to
construct simple program logic using pseudocode or flowchart. Lastly, the students are directed to the topic
on program development life cycle and User Environments. Each student enrolled in Programming Logic and
Design are required to answer all assessment tasks and demonstrate their skills in programming logic.
Upon completion of this unit, you will able to have sound background in logic, no matter what programming
languages you eventually use to write programs.
Learning Outcomes
After completing this unit, you must be able to:
1. deconstruct a problem statement and identify the input, processing steps, and expected output and
storage.
2. value the role of computer programming logic in addressing real-world problems and contributing to
technological innovation and societal advancement.
3. construct flowchart in solving real case scenarios.
1
Lesson 1
Computer Systems
Introduction
Nowadays, almost everyone utilizes computers in some way. It is employed in many fields, including
engineering, medicine, business, and research. They are present in every piece of devices we regularly use,
including smartphones, cars, video games, washing machines, microwaves, and gadgets used for routine tasks
like manufacturing companies, banking, online purchasing, making bookings, sending email, and browsing
the internet.
The computer system, its basic concept, its key components, and their interrelationships will all be covered
in this topic.
It is important to emphasize these topics so that students start thinking in a modular way and concentrate on
making their programs efficient, robust, easy to read, and easy to maintain in different areas of application.
Learning Objectives
At the end of the lesson, you are expected to:
1. Discuss the components of computer system
2. Categorize computer system components according to their fundamental operation.
3. Illustrate the information processing cycle in a given problem scenario.
ICODE | Initiate Knowledge
What can you say about the pictures shown below? Relate your answer to computer systems. Answer on the
space provided.
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
Page | 2 Programming Logic and Design |
ICODE| Capture New Knowledge:
Just like the exercise given to you, the computer system are interrelated to produce an output. The
Computer system, its structure, and the interrelationships between its many parts are the main topics covered
in the sections that follow.
1.1.1 The Computer and the Information Processing Cycle
Computer nowadays is a must for every individual for their transactions whether personal or related to work .
Computers are already ingrained in our daily lives. Thus, computer literacy is essential to success in the present
times. Thus, in the modern world, computer literacy is crucial for success.
Computer literacy sometimes referred to as digital literacy which entails being up to date on computers and
their applications. To stay technologically knowledgeable, one must keep up with changes in computer technology.
• A computer system is a collection of related components required to process and store data using
a computer.
• A computer is an electronic device operating under the control of instructionsstored in its own
memory, that can accept data, process the data accordingto specific rules, produce results and store
results for future use.
Computers process data into information. Data are raw of facts which can include text, numbers,
images, audio and video. The data is provided as input to the computer, which is processed to generate some
meaningful information(output). For example, Jose, Alonzo and Rizal, are processed by the computer to give
full name of a person. A computer often holds data, information, and instructions in storage for future use.
The series of input,process, output, and storage activities is often referred to as the information processing cycle.
Most computers today communicate with other computers. As a result, communications also has become an
essential element of the information processing cycle.
Collects data Produces
Processing information Storage
(input)
(output)
Figure 1-1 The Information Processing Cycle
Computer System accomplish four major component Input, Process, Output and Storage as depicted
in Figure 1-1.
Input : Gathering data from outside sources and deliver it to other components in the computer system.
Devices such as keyboard, mouse, joysticks are used
Processing : Executing one or more computer programs on the data to generate useful information. Examples
are sorting, calculating, searching, etc.
Output: The result generated after the processing of data. The output may be in the form of text, sound, image,
document, etc. The computer may demonstrate the output on a monitor, printout/report, alarm. etc.
Storage: It refers to secondary storage, that is, the permanent placement of information on a device like a
disk, but it can also refer to temporary storage in some form of memory such as main memory (RAM) or
short-term storage such as registers and cache.
Although a computer can perform all four of these tasks, they are not always performed in this order.
For example, a program may require some input, followed by processing, followed by more input, followed
by more processing. Additionally, the results of a process can be output or stored in a file, omitting either
output or storage. The stored data can be retrieved later, whenever needed.
Page | 3 Programming Logic and Design |
1.1.2 The Computer Organization
The organization of the Computer System is depicted in Fig 1-2. Which includes (hardware, software
and liveware) that are designed to receive, process manage present information in a meaningful format
Figure 1-2 Computer System Organization(Von Neumann)
[Link] Hardware refers to the physical parts or components of a computer which are
physical objects that you can actually touch. These components include input
devices, output devices, a system unit, storage devices, and communications devices
(Figure 1-3).
Figure 1-3: Components of Computer Hardware
a. Input Devices – any hardware component that allows user to enter data andinstructions into
a computer
Examples: keyboard, mouse, microphone, scanner, web cam
b. Output Devices – any hardware component that conveys information to one ormore people
Page | 4 Programming Logic and Design |
Examples: printer, monitor, speakers
Fig1-4: Input and Output devices
c. System Unit – the case that contains the electronic components of the computerthat are used to
process data
Motherboard – the circuit board that connects the circuitry of the system
unit
Two main components of the motherboard
• Central Processing Unit (CPU) – the electronic component that interprets andcarries out the
basic instructions that operate the computer
• Memory – consists of electronic components that store instructions waiting tobe executed and
data needed by those instructions. Some memory forms arepermanent, most memory keeps data
and instruction temporarily, which meansits contents are erased when the computer is shut off.
Fig1-5: Example motherboard of Core i7
d. Storage Device – holds data, instructions and information permanently for futureuse. It records
(writes) and/or retrieves (reads) items to and from storage media.
Examples of storage media are: USB flash drive, Hard disk, Memory Cards,Optical Discs
(Compact Disc or CD, DVD)
Page | 5 Programming Logic and Design |
Fig1-6 : Example of memory devices
e. Communication Device – a hardware component that enables a computer to send (transmit) and
receive data, instructions and information to and from one or more computers or mobile devices.
A widely used communications device is a modem. Communications occur over transmission
media (satellites or cellular radionetworks). Some transmission media, such as satellites and cellular
radio networks,are wireless, which means they have no physical lines or wires.
Fig1-7: Example of communication devices
[Link] Software is a set of computer instructions that tells the hardware what to do. Software
composes programs, which are instruction sets written by programmers.
Prewritten programs can be purchased and downloaded from the Internet or kept on
a disk. Programs that play music and play games, for instance, are popular among
casual computer users and companies alike. You can also create your own
applications and the process of creating software instructions is called
Programming
.
Software can be classified into two broad types:
• Application software are programs that enable the end-user to perform specific, productive
tasks, such as MS Word for word processing or Photoshop for image manipulation,
spreadsheets for payroll and inventory programs, andeven games.
• System software are programs which manages and controls computer hardware so that
application software can perform a task. Operating systems, such as Microsoft Windows,
Mac OS X or Linux, are prominent examples of system software.
Page | 6 Programming Logic and Design |
A programming language is used to write computer instructions. Examples are: Visual Basic,
C#, C++, or Java. The instructions you write using a programming language arecalled program code.
Every programming language has rules governing its word usage and punctuation called the syntax.
Mistakes in a language’s usage are syntax errors.
Program instructions are stored in computer memory, which is a computer’s temporary, internal
storage. Random access memory, or RAM, is a form of internal, volatile memory. Programs that are
currently running and data items that are currently being used arestored in RAM for quick access. Internal
storage is volatile—its contents are lost when the computer is turned off or loses power. To be able to retrieve
and perhaps modify the storedinstructions later, these are stored on a permanent storage device, such as a
disk. Permanent storage devices are nonvolatile—that is, their contents are persistent and are retained even
when power is lost. If a power loss occurred while working on a computer, but you were able to recover
your work when power was restored, it’s not because thework was still in RAM. Your system has been
configured to automatically save your work at regular intervals on a nonvolatile storage device.
After a computer program is typed using programming language statements and stored in
memory, it must be translated to machine language that represents the millionsof on/off circuits within the
computer. Your programming language statements are called source code, and the translated machine
language statements are object code.
Each programming language uses a piece of software, called a compiler or an interpreter,
to translate your source code into machine language. Machine language isalso called binary language,
and is represented as a series of 0s and 1s. The compiler or interpreter that translates your code tells you if
any programming language component has been used incorrectly. Syntax errors are relatively easy to
locate and correct because your compiler or interpreter highlights them or displays an error message.
While compilers and interpreters differ in their execution processes, their fundamental goal
is identical: transforming human-readable code into machine-understandable instructions. Compilers
process the entire program at once before execution, whereas interpreters translate each instruction
individually as needed.
[Link]. Liveware refer to the human element in a technological system. Also known as orgware or
the humanware. Liveware encompasses the people who interact with and operate these system. This could
include:
• Users: Individuals who utilize the technology for specific purposes.
• Operators: People who maintain and manage the system.
• Developers: Those who create and design the software and hardware.
Page | 7 Programming Logic and Design |
ICODE | Organized Learned Concepts
Try firming up your learning in this lesson by answering the following questions:
1. Self-service kiosks are seen in airports and in GSIS offices, what computer system technologies and
functions are included in self-service kiosks? What other technologies should be provided? What is
the customer value of self-service kiosks for airline check-ins? What is the business value of self-
service kiosks?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
2. Computerized speech like IVR(Interactive Voice Response), are being used today, How could their
use of IVR be improved? What are the business benefits and limitations of IVR? How could their use
of IVR be improved? What types of business situations would benefit most from IVR technology?
Which would benefit the least?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
3. Will the cloud computing dominate the world demands for storage? Explain briefly.
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
ICODE | Demonstrate
A. Form a group of five. Gather 10 various everyday objects and categorize them based on their
function in the IPO cycle then present it in the class.
For instance, a pencil (input), a sharpener (process), and a sharpened tip (output).
ICODE | Evaluate Learning Experience
Problem Analysis: Analyze the scenario and give what is asked.
A. Below are example scenario of a user using an ATM machine. Select the appropriate instruction/s by
categorizing them into I input, P process and O output, S Storage.
No. Scenario I / P / O / S
1. Validate and process type of account
2. ATM pin number
3. Type of transaction
4. Retrieve records in banks database
5. Identify balance amount in the account
6. Amount of money to withdraw
7. Type of account
8. Money
9. Validate pin number
10. Receipt
Page | 8 Programming Logic and Design |
B. Illustrate in an IPOS chart INPUT, PROCESS, OUTPUT, STORAGE in the following problem
statement:
1. Read a number, find its square, store and print the result.
2. Read two numbers, calculate the sum of two numbers, then store and display it.
3. Read current year and birth year of a person . Find the age of the person , store and display the age.
REFLECTIONS:
1. What are the new concepts you learned in this lesson?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
2. What are the new skills you acquired in this lesson?
_______________________________________________________________________________________
_______________________________________________________________________________________
_______________________________________________________________________________________
______________________________________________________________________________________
Page | 9 Programming Logic and Design |