You are on page 1of 8

IT86 – IT

ELECTIVE 2
CHAPTER 1 - HOW A COMPUTER WORKS?
HOW A COMPUTER WORKS?

Computer can perform any job that a program tells it to.

 PROGRAM – it is a set of statements (often called instructions


or “commands”) that a computer follows in order to perform a s
pecific task.

 Programs (usually referred as “application software”) are


essential to a computer, because without them a computer is a
dummy machine that can do nothing at all.
What is Hardware?
HARWARE
 Refers to all devices or components that make up a computer.

BASIC COMPONENTS OF A COMPUTER


 Central Processing Unit - This is the part of a computer that actually performs
all the tasks defined in a program.
 Main Memory (RAM – Random Access Memory) - This is the area where
the computer holds the program (while it is being executed/run) as well as the
data that the program is working with. All programs and data stored in this type
of memory are lost when you shut down your computer or you unplug it from
the wall outlet.
 Secondary Storage Devices - This is usually the hard disk, and sometimes
(but more rarely) the CD/DVD drive. In contrast to main memory, this type of
memory can hold data for a longer period of time, even if there is no power to
the computer.
BASIC COMPONENTS OF A COMPUTER
 Input Devices - Input devices are all those devices that collect data from the
outside world and enter them into the computer for further processing.
Keyboards, mice, and microphones are all input devices.
 Output Devices - are all those devices that output data to the outside world.
Monitors (screens) and printers are output devices.

What is SOFTWARE?
- Everything that a computer does is under the control of software.

Two Categories of Software


1. System software
2. Application software.
TWO CATEGORIES OF SOFTWARE
1. SYSTEM SOFTWARE
- is the program that controls and manages the basic operations.

2. APPLICATION SOFTWARE
- refers to all the other programs that you use for your everyday tasks, such as
browsers, word processors, notepads, games, and many more.

How a Computer Executes (Runs) a Program


Compilers and Interpreters
 Compilers - compiler is a program that translates statements written in a high-
level language into a separate machine language program.
 Interpreter - is a program that simultaneously translates and executes the
statements written in a high-level language. As the interpreter reads each
individual statement in the program, it translates it into a machine language
code and then directly executes it.
 Machine Language – it is a specific low – level language only computer can
understand which are made up of zeros and ones.
What is source code?
- Sometimes called it as “code” ,it is the statements (often called instruction or
commands) that the programmer writes in a high – level language.
- The programmer first types the source code into a program known as a code
editor, and then uses either a compiler to translate it into a machine language
program, or an interpreter to translate and execute it at the same time.
What is Python?
 Python is a widely used general-purpose, high-level computer
programming language that allows programmers to create applications,
web pages, and many other types of software.
 Python is often referred to as a scripting language despite the fact that the
official website says that it’s a programming language.

What is the Difference Between a Script and a Program?


 Script is interpreted whereas a program is compiled, but this is actually not
their main difference.
 The main purpose of a script written in a scripting language such as
JavaScript, or VBA (Visual Basic for Applications) is to control another
application.
 Program written in a programming language such as C++, or C# executes
independently of any other application. A program is compiled into a separate
set of machine language instructions that can then be executed as stand-alone
any time the user wishes.
How Python Works?
 Computers do not understand natural languages such as English or Greek,
so you need a computer language such as Python to communicate with
them. Python is a very powerful high-level computer language.

Figure 1 Executing Python


statements using the Python Virtual
Machine

You might also like