You are on page 1of 10

K to 12 Basic Education Curriculum

Technical Vocational Livelihood Education

PROGRAMMING LANGUAGES (CSS 2)


Number of Sessions (Time Allotment): 60 Hours (1st Quarter)

INTRODUCTION TO PROGRAMMING CONCEPTS


SUMMARY OF LEARNING OUTCOMES (LO):
➢ LO 01: Components of a Computer
➢ LO 02: Hardware Concepts
➢ LO 03: Digital Data Representation
➢ LO 04: Bits and Bytes
➢ LO 05: Digital Electronics
TANAUAN INSTITUTE, INC.
Senior High School Department
Modified Learning Scheme: Workbook
PROGRAMMING LANGUAGES (CSS 2)
1st Semester, S.Y. 2020-2021
Subject Teacher: LORENA A. AVILLANOZA

Name: ___________________________________ Score: ________________


Section: __________________________________ Date: _________________

Module 03: INTRODUCTION TO PROGRAMMING CONCEPTS

Topic : Lesson 01: Components of a Computer Session :


Lesson 02: Hardware Concepts WEEK 03
Lesson 03: Digital Data Representation 4 hrs.
Lesson 04: Bits and Bytes
Lesson 05: Digital Electronics

Objectives of the Lesson :


At the end of the lesson, the student should be able to:
• Define the term “computer” and identify the components of a Computer system,
• Explain the concepts of hardware and software,
• Differentiate application software from system software,

Values Integration:

Nowadays, animation is already a large part of daily life-from games in gadgets to mainstream
movies, they are anywhere, However, a few decades ago, animation is very limited. Animation came a long way
before getting to gadgets, televisions and big screens. The industry of animation began less than 150 years ago,
but it has developed into multiple platforms and became very accessible to everyone.

Today, animation plays a big part in multimedia content. Animation can be used to strengthen all special effects
in motion picture and productions or to create a whole movie by itself. It comes anywhere and it can go anywhere
from a large production team working in a highly specialized studio to an individual who’s working out on a
bedroom from the big cinema screen or to a mobile phone.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 1


Questions
1. What are the Importance of Programming?

2. What are the major contributions of Programming Nowadays?

3. What are some rules that you think must be followed when creating a program?

Discussion :

Lesson 01: COMPONENTS OF A COMPUTER

WHAT IS A COMPUTER?
• A Computer is an electronic device capable of performing
complex computations in a short time.

• It is a fast, electronic calculating machine that accepts input information, processes it


according to a list of internally stored instructions called a program, and produces the
resultant output information.

A program is a set of instructions telling a computer what to


do or how to behave.

Programming is the craft of implementing one or more interrelated abstract algorithms


using a particular programming language to produce a concrete computer program.

COMPONENTS OF A COMPUTER
• Hardware - the physical equipment of a computer system, including the
monitor, keyboard, central processing unit, and storage devices.

Hardware consists of devices, like the computer itself, the


monitor, keyboard, printer, mouse, and speakers. Inside your
computer, there are more bits of hardware including the
motherboard where you would find the main processing chips

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 2


that make up the central processing unit (CPU). The
hardware processes the commands it receives from the
software, and performs tasks or calculations.

• Software - refers to one or more computer programs and data held in the
storage of a computer for some purpose.

Software is the name given to the programs that you install


on the computer to perform certain types of activities. There
are operating system software, such as the Apple OS for a
Macintosh, or Windows 98 or Windows XP for a PC. There
are also application software, like the games we play, or the
tools we use to compose letters or do math problems.

Lesson 02: HARDWARE CONCEPTS

Data representation - data representation is the conversion of images, letters and sounds to digital
electrical signals. Here, a digital electrical signal refers to a combination or
sequence of “on” and “off” signals.

Digital electronics – is the technology used in the manipulation of “on” and “off” (digital electrical)
signals to perform complex tasks.

Digital device - most computers are digital, as opposed to analog, devices. A digital device works
with discrete signals such as 0 and 1 while an analog device works with continuous
data.

Analog device - a traditional light switch has two discrete states — on and off. A dimmer switch, on
the other hand, has a rotating dial that controls a continuous range of brightness —
from none (off) to full brightness. The first is therefore, a digital device while the latter
is an analog device.

Lesson 03: DIGITAL DATA REPRESENTATION

• How can a computer represent numbers using bits?


“0” and “1” are also known as bits or binary digits the computer
uses the binary number system which uses only two digits: 0 and 1.

A series of 0’s and 1’s results in a particular number much in the same
way we use the decimal number system.

The “0” and “1” are also known as bits or binary digits. A 5bit sequence or combination
of “0” and “1” could be written as 10011. At face value, this sequence may have no clear
significance. However, this gain meaning with additional information. For instance, this may

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 3


pertain to a certain character, number, or even the color of a dot on the screen,
depending on the context where this appears.

DIGITAL DATA REPRESENTATION:


The table below shows how the binary system works. The decimal system used ten symbols or
numerals (0 – 9) to represent numbers while the binary number system uses only two symbols
(0 and 1).

Decimal (Base 10) Binary Base 2


0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001

• Numeric data like your age, salary, and electricity bill are easily understood by humans but
how is it possible for a computer to show a number using only binary digits?

The computer uses the binary number system which uses only two digits: 0 and 1. There are
no 2’s or 3’s. A series of0’s and 1’s results in a particular number much in the same way as
the decimal number system we use.

How come 5 became 0101 when converted to binary?

Notice that there are 4 digits, namely, 0, 1, 0 and 1. The


positions of the 0’s and 1’s hold significant values. The

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 4


illustration will show the corresponding position and value in
the binary number system.

If the box contains 0, the value is turned “off”. However, if the


box contains 1, the value of that box is turned “on” and will be
added to the value of the number.

Such a number system, where the placement of a symbol or


numeral carries weight, is called a “positional number
system.” The decimal number system is considered a
positional number system.

How then can a computer represent words and letters using bits?

• Bits can also be used to represent character data. In this case, computers makes use of 0 and 1
as a replacement to dashes and dots.

Bits can also be used to represent character data. It is analogous to Morse code that uses the dots
and dashes to represent letters in the alphabet. In this case, computers make use of 0 and 1 as a
replacement to dots and dashes. For example, using the 8-bit or extended ASCII, the letters S,
T, and I have corresponding binary values.

Example:

Some of the common types of codes are:

• ASCII stands for American Standard Code for Information Interchange. It defines a set of characters
that are displayed on screen. Standard ASCII uses only seven bits for each character but it has been
extended to 8 bits to accommodate more symbols.

• EBCDIC stands for Extended Binary Coded Decimal Interchange Code, which is an alternative 8-bit
code used by older IBM mainframe computers.

• UNICODE is an 8, 16, or 32-bit character encoding scheme that provides codes for 65,000
characters that provides codes for 65,000 characters. This was developed to represents all the writing
systems of the world.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 5


Extended ASCII code:

Extended ASCII code makes use of a series of 0’s and 1’s to represent 256 characters (including
letters for uppercase and lowercase, numbers, and symbols).

Lesson 04: BITS AND BYTES

Some people interchange the use of bits and bytes. Note that bit is a contraction of binary digit. The
abbreviation for bit is a lowercase “b”. A byte is a collection of bits (8 to be exact) and is usually
abbreviated as an uppercase “B”. Usually, the unit bits are used when measuring transmission
speeds. An example of a speed transmission measurement is the transmission rate of a modem (e.g., 56
kilobits per second or kbps). On the other hand, the unit bytes are usually used in measuring capacity.
For instance, bytes are used to measure the capacity of hard disks (e.g., 80 GB or Giga Bytes).

BIT - an abbreviation of binary digit abbreviated as a lowercase “b”

BYTE - a collectio1n of bits (8 bits) abbreviated as an uppercase “B”

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 6


PREFIX ABBREVIATION VALUE

10
Kilo K
2

20
Mega M
2

30
Giga G
2

40
Tera T
2

Bits and bytes use prefixes to indicate large values. Note that the measurement is in base 2. A common
mistake is to think that the binary kilo prefix refers to a factor of 1000. Actually, the closest to 1000 in
binary is 2, which is 1024 and not 1000. Knowing that, we can evaluate then that a kilobit (a.k.a. Kb or
Kbit) is 1024 bits and a kilobyte (a.k.a. KB or Kbyte) is 1024 bytes. Note that the prefix is lowercase for
the decimal kilo and uppercase for the binary version. The table below shows the prefixes with the
corresponding abbreviation and capacity/value.

Hard Drive manufacturers provide approximate nonformatted capacities. Hence, an 80-GB HD will not
show 80GB after formatting. Sometime in the 90's, some manufacturers used miobytes to mean million
(106) bytes. In 2005, they introduced a new standard for binary prefixes that includes kibi- (Ki) for 210,
mebi- (Mi) for 220, gibi- (Gi) for 230, etc. These prefixes haven't been well adopted so far.

Lesson 05: DIGITAL ELECTRONICS

How are bits stored and transferred from one point to another?

Since most computers are electronic devices, bits take the form of electrical pulses traveling over the
circuits. All circuits, chips, and mechanical components forming a computer are designed to work with
bits.

Storage is either via electronic switches or electronic charges. Electronic switches are either on or off
while charging devices are either charged or discharged. One of the 2 states are identified as 0 while the
other is 1.

Since most computers are electronic devices, bits take the form of electrical pulses traveling over the
circuits. All circuits, chips, and mechanical components forming a computer are designed to work with
bits.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 7


Processor
or CPU

Input Output
Computer
Devices Devices

Memory

Basic parts of a Computer

• Input devices are machines that generate input for the computer, such as keyboard and mouse.
• Processor or CPU (Central Processing Unit) is the central electronic chip that controls the processes
in the computer. It determines the processing power of the computer.
• Memory is the part of the computer that stores applications, documents, and systems operating
information.
• Output devices are machines that display information from the computer, such as monitor, speaker,
and printer.

Activity :

ACTIVITY 1: Converting Binary codes:


At the end of the exercise, the students should be able to:
• learn more about Binary.
• familiarize with the rules and regulations in using the Binary.

Materials:
-Pen -A sheet of paper

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 8


References :

• Department of Technology Education at The University of Southern


Mississippi. (2007, February 26). Retrieved from
Dragon.ep.usm.edu/~it365/module/Basics/system.htm

• Hoffer J., George G., & Valacich J. (2008). In 5 Ed., Modern systems
analysis and design. Pearson Prentice Hall.

• Parsons J. J., & Oja D. (2010). In 8 Ed., Computer concepts Illustrated


Introductory. Cengage Learning.

PROGRAMMING LANGUAGES (CSS 2) / LORIE AVILLANOZA 9

You might also like