Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
88 views

Introduction To Computer and Programming

The document provides an overview of key concepts in computer programming including: 1) Hardware refers to the physical components of a computer while software provides instructions to hardware. 2) There are two main types of programming languages - imperative languages specify algorithms using statements while declarative languages describe computations without specifying control flow. 3) The programming process involves identifying a problem, designing a solution, writing code, and testing - with writing code being the least important part.

Uploaded by

MA Valdez
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

Introduction To Computer and Programming

The document provides an overview of key concepts in computer programming including: 1) Hardware refers to the physical components of a computer while software provides instructions to hardware. 2) There are two main types of programming languages - imperative languages specify algorithms using statements while declarative languages describe computations without specifying control flow. 3) The programming process involves identifying a problem, designing a solution, writing code, and testing - with writing code being the least important part.

Uploaded by

MA Valdez
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Mary Ann V.

Domincel ICT-12 4-5:30PM WTH

Introduction to Computer and Programming

1.1Why Program?

The practice of programming is one of teaching the computer to do


something. The purpose of  programming is to create. ... The
computer version of programming, (coding) is mostly used for process
automation/communication facilitation. But that's only because the tools
(programming languages) that we have now are so crude.

1.2Computer Systems: Hardware and Software

Hardware

Hardware refers to the physical elements of a computer. This is also sometime


called the machinery or the equipment of the computer. Examples of hardware in a
computer are the keyboard, the monitor, the mouse and the central processing
unit. However, most of a computer's hardware cannot be seen; in other words, it is
not an external element of the computer, but rather an internal one, surrounded by
the computer's casing (tower). A computer's hardware is comprised of many
different parts, but perhaps the most important of these is the motherboard. The
motherboard is made up of even more parts that power and control the computer.

In contrast to software, hardware is a physical entity. Hardware and software are


interconnected, without software, the hardware of a computer would have no
function. However, without the creation of hardware to perform tasks directed by
software via the central processing unit, software would be useless.

Hardware is limited to specifically designed tasks that are, taken independently,


very simple. Software implements algorithms (problem solutions) that allow the
computer to complete much more complex tasks.

Software

Software, commonly known as programs or apps, consists of all the instructions


that tell the hardware how to perform a task. These instructions come from a
software developer in the form that will be accepted by the platform (operating
Mary Ann V. Domincel ICT-12 4-5:30PM WTH

system + CPU) that they are based on. For example, a program that is designed for
the Windows operating system will only work for that specific operating system.
Compatibility of software will vary as the design of the software and the operating
system differ. Software that is designed for Windows XP may experience a
compatibility issue when running under Windows 2000 or NT.

Software is capable of performing many tasks, as opposed to hardware which can


only perform mechanical tasks that they are designed for. Software provides the
means for accomplishing many different tasks with the same basic hardware.
Practical computer systems divide software systems into two major classes:

 System software: Helps run the computer hardware and computer system


itself. System software includes operating systems, device drivers,
diagnostic tools and more. System software is almost always pre-installed on
your computer.
 Application software: Allows users to accomplish one or more tasks. It
includes word processing, web browsing and almost any other task for
which you might install software. (Some application software is pre-installed
on most computer systems.)

Software is generally created (written) in a high-level programming language, one


that is (more or less) readable by people. These high-level instructions are
converted into "machine language" instructions, represented in binary code, before
the hardware can "run the code". When you install software, it is generally already
in this machine language, binary, form.

1.3Programs and Programming Languages

Programming languages
A computer program written in the imperative programming style
Computer programs can be categorized by the programming
language paradigm used to produce them. Two of the main paradigms
are imperative and declarative.
Imperative languages
Imperative programming languages specify a sequential algorithm using
declarations, expressions, and statements:[16]
Mary Ann V. Domincel ICT-12 4-5:30PM WTH

 A declaration couples a variable name to a datatype – for


example:  var x: integer;
 An expression yields a value – for example:  2 + 2  yields 4
 A statement might assign an expression to a variable or use the value
of a variable to alter the program's control flow – for example:  x := 2
+ 2; if x = 4 then do_something();
One criticism of imperative languages is the side effect of an assignment
statement on a class of variables called non-local variables. [17]
Declarative languages
Declarative programming languages describe what computation should be
performed and not how to compute it. Declarative programs omit
the control flow and are considered sets of instructions. Two broad
categories of declarative languages are functional languages and logical
languages. The principle behind functional languages (like Haskell) is to not
allow side effects, which makes it easier to reason about programs like
mathematical functions.[17] The principle behind logical languages
(like Prolog) is to define the problem to be solved – the goal – and leave
the detailed solution to the Prolog system itself. [18] The goal is defined by
providing a list of subgoals. Then each subgoal is defined by further
providing a list of its subgoals, etc. If a path of subgoals fails to find a
solution, then that subgoal is backtrackedand another path is systematically
attempted.

1.4 What is a Program made of?

A computer program is a collection of instructions[1] that performs a


specific task when executed by a computer. A computer requires
programs to function.

A computer program is usually written by a computer programmer in


a programming language. From the program in its human-readable
form of source code, a compiler can derive machine code—a form
consisting of instructions that the computer can directly execute.
Alternatively, a computer program may be executed with the aid of
an interpreter.
Mary Ann V. Domincel ICT-12 4-5:30PM WTH

A collection of computer programs, libraries, and related data are


referred to as software. Computer programs may be categorized
along functional lines, such as application software and system
software. The underlying method used for some calculation or
manipulation is known as an algorithm.

1.5Input,Processing , and Output

The input–process–output (IPO) model, or input-process-


output pattern, is a widely used approach in systems
analysis and software engineering for describing the structure of an
information processing program or other process. Many
introductory programming and systems analysis texts introduce this as the
most basic structure for describing a process
A computer program or any other sort of process using the input-process-
output model receives inputs from a user or other source, does
some computations on the inputs, and returns the results of the
computations.[1] In essence the system separates itself from the
environment, thus defining both inputs and outputs, as one united
mechanism.[5] The system would divide the work into three categories:

 A requirement from the environment (input)


 A computation based on the requirement (process)
 A provision for the environment (output)
In other words, such inputs may be materials, human resources, money or
information, transformed into outputs, such as consumables, services, new
information or money.
As a consequence, Input-Process-Output system becomes very vulnerable
to misinterpretation. This is because, theoretically, it contains all the data,
in regards to the environment outside the system. Yet, on practice,
environment contains a significant variety of objects that a system is unable
to comprehend, as it exists outside systems control. As a result, it is very
important to understand where the boundary lies between the system and
the environment, which is beyond systems understanding. This is because,
often various analysts would set their own boundaries, favouring their point
of view, thus creating much confusion.[6]
Mary Ann V. Domincel ICT-12 4-5:30PM WTH

1.6The Programming Process

All programming involves creating something that solves a problem. The


problems can range from something of great scientific or national importance,
through to something as trivial as relieving personal boredom!

This section describes one approach to solving such problems - think of it as a


rough guide to the things you should do when entering the land of programming.

In broad terms, those things are:

1. Identify the Problem


2. Design a Solution
3. Write the Program
4. Check the Solution

Of these, only the third step is usually called "programming", but as you'll see
later, it's probably the least important stage of the process.

1. Identify the Problem - What Are You Trying To Do?


o Requirements
o Specification
2. Design a Solution - How Is It Going To Be Done?
3. Write the Program - Teaching the Computer
o Code
o Compile
o Debug
4. Check the Solution - Testing it Understands You

While this may sound like a great deal of effort to go to build a simple program,
don't worry, as after a while it will become second nature, and for small programs,
most of the stages can be done in your head.

You might also like