You are on page 1of 3

MODULE I.

Lesson 1. An Overview of Computers and Programming Languages


Learning Outcomes: At the end of this lesson, you should have:
1. Enumerated and identified components of a computer systems and discussed how Central
Processing Unit and Main Memory processes data;
2. Defined Machine Language and explained Binary Units;
3. Identified and enumerated Processing a Java Program and determined the significance of
Java in Web development;
4. Analyzed problems and designed solution by applying basic problem solving; and
5. Identified the two basic approaches to programming design;
I. Key Concepts: Before starting this module, please watch first your orientation video on the
path, Computer Programming 2/0_Computer Programing 1 Orientation. For every discussion of
each topic, please refer to the different video files downloaded on your flash drives or visit
http://tiny.cc/compprog1 for saved online videos. Please follow the different directories to access
your video lectures.
A. An Overview of Computers and Programming Languages
Introduction.
Computers have greatly affected our daily lives simply by helping us complete many tasks. Also,
these programs or softwares are designed specifically for these task. Wherein these softwares
were created with the use of programming languages
1. Elements of a Computer System
Computers have two main components. The Hardware and the Software.
Hardwares are tangible parts of a computer system or parts that you can touch like the CPU,
Main memory, input and output devices, storages devices and etc.
 CPU – this is a component where arithmetic and logical operations are carried out.
 Main Memory – This is a hardware device that is directly connected to the CPU where all
programs must be brought into it before being executed.
 Secondary Storages – Provides a permanent storage for information like hard disks, flash
memory, flash drives and etc.
 Input devices – These are devices that feed the data and computer programs into computers.
Ex. Keyboard, Mouse, Secondary Storages
 Output devices – These are devices that computer uses to display results or outputs to end-
users. Ex. Printers, Monitors
Softwares are intangible parts of a computer system or in the opposite of hardwares, you can’t
touch these. But these softwares perform specific tasks. There are 2 types of softwares:
 System Softwares – these are programs that control the computer such as Operating
Systems. This Operating Systems monitors overall activity of the computer and provides
services such as memory management, Input/Output (I/O) management, Storage Management
and etc
 Application Softwares – These are programs written using programming languages that
perform a specific task. Ex. Word processors, Spreadsheets, games and etc.

2. Language of a Computer
Machine Language is the most basic language of a computer wherein it is a sequence of 0
(zeros) and 1 (ones). Every computer understands its own machine language in term of bit.
Bit – smallest size of data and is a binary digit either 0 or 1.
Byte – is a sequence of 8 bits. Likewise follows the different data sizes:

Unit Symbol Bits/Bytes


Kilobyte KB 1024 bytes
Megabyte MB 1024 KB = 1,048,576 bytes
Gigabyte GB 1024 MB = 1,073,741,824 bytes
Terabyte TB 1024 GB = 1,099,511,627,776 bytes
Petabyte PB 1024 TB = 1,125,899,906,842,624 bytes
Exabyte EB 1024 PB = 1,152,921,504,606,846,976 bytes
Zettabyte ZB 1024 EB = 1,180,591,620,717,411,303,424
bytes

3. Evolution of Programming Languages


Early computers programmed in machine language. Assembly languages were developed to
make programmer’s job easier. In assembly language, an instruction is an easy-to-remember
form called a mnemonic. To make the assembly language understandable by the computer,
an ASSEMBLER takes place to translate these assembly languages into machine language.
High- level languages make programming easier where these languages are closer to spoken
languages. Examples: Basic, FORTRAN, COBOL, C/C++, Java
High-level programming Language comprised of a Compiler and a Virtual Machine.
Compiler: this translates a program that are written in a high-level language into the
equivalent machine language/bytecodes.
Virtual Machine: these are hypothetical computer developed to make programs machine
independent.
4. Processing a Java Program
The following are the different actors considered on how a Java program is being processed.
Source program: written in a high-level language
Loader: transfers the compiled code (bytecode) into main memory
Interpreter: reads and translates each bytecode instruction into machine language and then
executes it.

You might also like