Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 9

Samar Colleges Technological Institute

Samar Colleges Inc.

DIT – 80058
COMPUTER
PROGRAMMING 1

PRELIM MODULE
PART I - BASIC UNDERSTANDING OF COMPUTER

What is Computer?
A computer is an electronic device that manipulates information, or data. It has the ability
to store, retrieve, and process data.
You may already know that you can use a computer to type documents, send email, play
games, and browse the Web. You can also use it to edit or create spreadsheets, presentations, and
even videos.

Hardware vs. Software


Hardware – is any part of your computer that has a physical structure, such as the
keyboard or mouse. It also includes all of the computer’s internal parts.
Software – is any set of instructions that tells the hardware what to do and how to do it.
Example of software include web browsers, games, and word processors.
Everything you do on your computer will rely on both hardware and software. For example, right
now you may be viewing this in a web browser (software) and using your mouse (hardware) to
click from page to page.

WHAT ARE THE DIFFERENT TYPES OF COMPUTERS?


When most people hear the word computer, they think of a personal computer such as desktop or
laptop. However, computers come in many shapes and sizes, and they perform many different
functions in our daily lives. When you withdraw cash from an ATM, scan groceries at the store,
or use a calculator you’re using a type of computer.

DESKTOP COMPUTERS
Many people use desktop computers at work, home, and school. Desktop computers are designed
to be placed on a desk, and they’re typically made up of a few different parts, including the
computer case, monitor, keyboard and mouse.
LAPTOP COMPUTERS
The second type of computer you may be familiar with a laptop computer, commonly called a
laptop. Laptops are battery-powered computers that are more portable than desktops, allowing
you to use the, almost anywhere.
TABLET COMPUTERS
Tablet computers or tablets are handled computers that are even more portable than laptops.
Instead of a keyboard and mouse, tablets use a touch-sensitive screen for typing and navigation.
The iPad is an example of a tablet.

SERVERS
A server is a computer that serves up information to other computers on a network. For example,
whenever you use the Internet, you’re looking at something that’s stored on a server. Many
businesses also use local files servers to store and share files internally.

OTHER TYPES OF COMPUTERS:


Many of today’s electronics are basically specialized computers, though we don’t always think
of the that way. Here are a few common examples:
 Smartphones: Many cellphones can do a lot of things computers can do,
including browsing the Internet and playing games. They are often called
smartphones.

 Wearables: Wearables technology is a general term for a group of devices –


including fitness trackers and smartwatches – that are designed to be worn
throughout the day. These devices are often called wearables for short.

 Game Consoles: A game console is a specialized type of computer that is used


for playing video games om your TV.

 TVs: Many TVs now include applications – or apps – that let you access various
types of online content. For examples, you can stream video from the Internet
directly onto your TV.

PC and Macs
Personal computers come in two main styles: PC and Mac. Both are fully functional, but they
have a different look and feel, and many people prefer one or the other.
PC’s
This type of computer began with the original IBM PC that was introduced in 1981. Other
companies began creating similar computers, which were called IBM PC Compatible (often
shortened to PC). Today, this is the most common type of personal computer, and it typically
includes the Microsoft Windows operating system.
Macs
The Macintosh computer was introduced in 1984, and it was the first widely sold personal
computer with a graphical user interface, or GUI (pronounced gooey). All Macs are made by one
company (Apple), and they almost always use the Mac OS X operating system.

MEMORY
Memory is basically a device that has the capacity to store information. A memory unit is the
amount if data that the memory can hold. Besides, we measure this storage capacity in terms of
bytes. Moreover, there are different units of memory as per the requirement. Before studying the
units of memory let us know about the memory.’

Primary Memory
This is the internal memory that stores the data and instructions of the CPU. It is volatiles in
nature (data is lost when the power is disconnected).
The primary memory has two types:
 RAM (Random Access Memory) – as per the name, data can be accessed randomly
and quickly.
 ROM (Read Only Memory) – as per the name, we can only read data and cannot
write (store) to it.

Second Memory
As we know that the primary memory is volatile therefore, we need some devices to store the
data permanently so we use some external storage devices for this purpose which we name as the
secondary memory. Some examples: CD, DVD, etc.
The storage capacity of the memory is expressed in various units of memory. These are as
follows:
 BIT – a microprocessor uses binary digits 0 and 1 to decide the OFF and ON state
respectively, of various circuits. Furthermore, a bit is the smallest unit of
representation in the binary language.
 Nibble – a nibble is a collection of 4 bits.
 Byte – a byte is the representation of a group of 8 bits. Moreover, a byte is a unit that
expresses any word, symbols, or character in the computer language. Besides,
computer memory is always in term of multiples of bytes.
 Word – A computer word is similar to a bye, as it is also a group of bits. Moreover, a
computer word is fixed for each computer. At the same time, it varies from computer
to computer. Besides, the length if a computer word is the word-size or word length.
Therefore, a computer stores information in the form of computer word.
 Kilobyte
o It is the most common unit of memory which is the smallest of all. But, it is
greater than the byte.
o The abbreviation for kilobytes is ‘KB’
o It contains 1000 bytes. Besides, it is synonyms is kibibytes which contain
1024 (2^10) bytes.
o Megabytes usually measures the size of text documents, graphics of websites,
individual files, etc.
 Megabyte
o The abbreviation for megabyte is ‘MB’.
o It contains 100,00 bytes. Besides, it is synonyms to mebibytes which contains
1048576 (2^20) bytes.
o Kilobytes usually measure the size of large files. For example, high-resolution
images, songs, storage of compact disks, etc.
 Gigabyte
o The abbreviation for the gigabyte is ‘GB’ or ‘gigs’.
o It contains 1000,000,000 bytes. Besides, it is synonyms to gibibytes which
contain 1073741824 (2^30) bytes.
 Terabyte
o The abbreviation for terabytes is ‘TB’
o It contains one trillion bytes. Besides, it is synonyms to tebibytes which
contains (2^40) bytes.
o Kilobytes usually measure the capacity of large storage devices, for example,
HDDs (Hard Disk Drives).
 Petabyte
o The abbreviation for petabyte is ‘PB’.
o It contains 10^15 bytes. Besides, it is synonyms to pebibytes which contains
2^50 bytes.
o Petabytes usually measure the total data storage in large networks or server
farms. For example, the data in Google or Facebook data server is around
more than 10 PBs.
 Exabyte
o The abbreviation for exabyte is ‘EB’.
o It contains 10^18 bytes. Besides, it is synonyms to exbibyte which contains
2^60 bytes.
o The exabyte unit is so large that it does not even measure the storage of large
cloud servers. Rather, it can be used to measure the amount of data transfer
over the internet for a certain time limit.
 Zettabyte
o The abbreviation for zettabyte is ‘ZB’.
o It contains 10^21 bytes. Besides, it is synonyms to zebibytes which contains
2^70 bytes.
o It can measure a huge amount of data. In fact, the whole data in the world is
just a few zettabytes.
 Yottabyte
o The abbreviation for yottabyte is ‘YB’.
o It contains 10^24 zettabytes. Besides, it is synonyms to yobibytes which
contains 2^80 bytes.
o It is a tremendously huge unit of measurement. Therefore, it has no practical
use.
PART II – ABOUT ASCII AND BINARY

What is ASCII?
ASCII Stands for "American Standard Code for Information Interchange." ASCII
is a character encoding that uses numeric codes to represent characters. These include upper and
lowercase English letters, numbers, and punctuation symbols.

How does ASCII work?


It is a code that uses numbers to represent characters. Each letter is assigned a number
between 0 and 127. An upper- and lower-case character are assigned different numbers.

What is Binary?
is a base-2 number system invented by Gottfried Leibniz that's made up of only two
numbers or digits: 0 (zero) and 1 (one). This numbering system is the basis for all binary code,
which is used to write digital data such as the computer processor instructions used every day.

How does Binary work?


The 0s and 1s in binary represent OFF or ON, respectively. In a transistor, a "0"
represents no flow of electricity, and "1" represents electricity being allowed to flow. In this way,
numbers are represented physically inside the computing device, permitting calculation.

Why do computers use binary?

Binary is still the primary language for computers and used with electronics and computer
hardware for the following reasons.

 It is a simple and elegant design.


 Binary's 0 and 1 method is quick to detect an electrical signal's off (false) or on (true) state.
 Having only two states placed far apart in an electrical signal makes it less susceptible to
electrical interference.
 The positive and negative poles of magnetic media are quickly translated into binary.
 Binary is the most efficient way to control logic circuits.
How ASCII and Binary work. | ASCII code and Binary Tutorial

https://www.youtube.com/watch?v=H4l42nbYmrU

PART III - ONLY PROGRAMING WILL UNDERSTAND


WHAT IS PROGRAMING?

Programming is the process of creating a set of instructions that tell a computer how to perform a
task.

HOW DOES PROGRAMMING WORK?

Almost all programming languages work the same way: You write code to tell it what to do:
print ("Hello, world"). The code is compiled, which turns it into machine code the computer can
understand. The computer executes the code, and writes Hello, world back to us

How Java Program Works, Compiler, Interpreter | Java Tutorial:


https://youtu.be/fhfVkPpIwjk

Write your first java program in your mobile phone.

https://www.youtube.com/watch?v=iKm-oq8d8eU
(This will count as your activity 4. Send your output and codes on google classroom)

My first java program - In computer:

https://youtu.be/KhMthd24_TE

You might also like