0% found this document useful (0 votes)
168 views

Computer Fundamentals and Programming

This document provides an overview of computer fundamentals and programming. It defines what a computer is, its basic components and capabilities. It describes how computers can accept, store, process and retrieve data. It outlines the characteristics of computers like speed, accuracy, storage capacity. It also discusses the different types of computers based on size like microcomputers, minicomputers, mainframes, supercomputers and based on function like servers, workstations, embedded computers. The document traces the history of calculating machines from the abacus to modern electronic calculators and generations of computers.

Uploaded by

Jayvee Ramos
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
168 views

Computer Fundamentals and Programming

This document provides an overview of computer fundamentals and programming. It defines what a computer is, its basic components and capabilities. It describes how computers can accept, store, process and retrieve data. It outlines the characteristics of computers like speed, accuracy, storage capacity. It also discusses the different types of computers based on size like microcomputers, minicomputers, mainframes, supercomputers and based on function like servers, workstations, embedded computers. The document traces the history of calculating machines from the abacus to modern electronic calculators and generations of computers.

Uploaded by

Jayvee Ramos
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 102

Computer Fundamentals and Programming

Computer

A computer is an electronic

programmable device that can store, retrieve and process data A computer is a device that accepts information (in the form of digitalized data) and manipulates it for some result based on a program or sequence of instructions on how the data is to be processed.

Computer
It can
accept data store data process data as desired, retrieve the stored data

as and when required print the result in desired format

Characteristics

Speed Accuracy Automatic Endurance Adaptability / Versatile Reduction of Cost Diligence Power of Remembering No IQ No Feeling Storage

Capabilities
Ability to perform certain logic operations
Ability to store and retrieve information Ability to control error Ability to check itself

Capabilities
Computers have the ability to perform arithmetic and logical

operations. Computers have the ability to store or remember a great amount and variety of information and retrieve or recall the information needed almost instantly. Computers have the ability to handle large volumes of repetitive tasks accurately over long periods of time for example, computing the scores of the National College Entrance Examination (NCEE) exams, Airline Reservation System, Social Security System. Computers can communicate with its operators and other machines. Communication may be in the form of printed output or messages sent on the screen (for example, ATM receipts, downloads/uploads, GPS, traffic control system, computerized packaging system). Computers are capable of remote processing where communication is established between the terminal, which is composed of screen display and keyboard, and the computer, simply by entering instructions in a local terminal (ATMs, for example).

Limitations
It must be checked and repaired from time to time.
It cannot function alone without help from human It cannot think on its own It only understands computer language to execute

command

Limitations
Computers are still subject to human direction and

control. They function only when input data and the necessary instructions to process the information have been provided. Computers can detect but generally cannot correct an inaccurate entry on their own. Computers are subject to occasional breakdown or computer malfunctions because of power failure, computer failure, humidity, temperature,maintenance, time, etc.

Classes by Size Classes by Function

Microcomputers (Personal computers)


A microcomputer is computer with microprocessor as

its central processing unit. They are physically small compared to mainframe and minicomputers. Many microcomputers (when equipped with a keyboard and screen for input and output) are also personal computers (in the generic sense)

Minicomputers (Midrange computers)


Minicomputers are much smaller than mainframe computers

and they are also much less expensive. The cost of these computers can vary from a few thousand dollars to several hundred thousand dollars. They possess most of the features found on mainframe computers, but on a more limited scale. They can still have many terminals, but not as many as the mainframes. They can store a tremendous amount of information, but again usually not as much as the mainframe. Medium and small businesses typically use these computers.

Mainframe
Mainframe computers are very large, often filling an entire

room. They can store enormous of information, can perform many tasks at the same time, can communicate with many users at the same time, and are very expensive. The price of a mainframe computer frequently runs into the millions of dollars. Mainframe computers usually have many terminals connected to them. These terminals look like small computers but they are only devices used to send and receive information from the actual computer using wires. Terminals can be located in the same room with the mainframe computer, but they can also be in different rooms, buildings, or cities. Large businesses, government agencies, and universities usually use this type of computer

Supercomputer
A supercomputer is focused on performing tasks involving

intense numerical calculations such as weather forecasting, fluid dynamics, nuclear simulations, theoretical astrophysics, and complex scientific computations. A supercomputer is a computer that is at the frontline of current processing capacity, particularly speed of calculation. The term supercomputer itself is rather fluid, and the speed of today's supercomputers tends to become typical of tomorrow's ordinary computer. Supercomputer processing speeds are measured in floating point operations per second or FLOPS

Servers
Server usually refers to a computer that is dedicated to

providing a service. For example, a computer dedicated to a database may be called a "database server". "File servers" manage a large collection of computer files. "Web servers" process web pages and web applications. Many smaller servers are actually personal computers that have been dedicated to providing services for other computers.

Workstations
Workstations are computers that are intended to serve

one user and may contain special hardware enhancements not found on a personal computer.

Information Appliances
Information appliances are computers specially

designed to perform a specific user-friendly function such as playing music, photography, or editing text. The term is most commonly applied to mobile devices, though there are also portable and desktop devices of this class.

Embedded Computers
Embedded computers are computers that are a part of a

machine or device. Embedded computers generally execute a program that is stored in non-volatile memory and is only intended to operate a specific machine or device. An automobile may contain a number of embedded computers; however, a washing machine and a DVD player would contain only one. The central processing units (CPUs) used in embedded computers are often sufficient only for the computational requirements of the specific application and may be slower and cheaper than CPUs found in a personal computer.

Calculating Machines
The first calculating device called ABACUS was

developed by the Egyptian and Chinese people. The word ABACUS means calculating board. It consisted of sticks in horizontal positions on which were inserted sets of pebbles.

Napiers bones
English mathematician John Napier built a mechanical

device for the purpose of multiplication in 1617 A D. The device was known as Napiers bones.

Slide Rule
English mathematician Edmund Gunter developed the

slide rule. This machine could perform operations like addition, subtraction, multiplication, and division. It was widely used in Europe in 16th century.

Pascal's Adding and Subtractory Machine


Blaise Pascal developed a machine at the age of 19 that

could add and subtract. The machine consisted of wheels, gears and cylinders.

Leibnizs Multiplication and Dividing Machine


The German philosopher and mathematician

Gottfried Leibniz built around 1673 a mechanical device that could both multiply and divide.

Babbages Analytical Engine


It was in the year 1823 that a famous English man

Charles Babbage built a mechanical machine to do complex mathematical calculations. It was called difference engine. Later he developed a general-purpose calculating machine called analytical engine. Charles Babbage is called the father of computer.

Mechanical and Electrical Calculator


In the beginning of 19th century the mechanical

calculator was developed to perform all sorts of mathematical calculations. Up to the 1960s it was widely used. Later the rotating part of mechanical calculator was replaced by electric motor. So it was called the electrical calculator.

Modern Electronic Calculator


The electronic calculator used in 1960 s was run with

electron tubes, which was quite bulky. Later it was replaced with transistors and as a result the size of calculators became too small. The modern electronic calculator can compute all kinds of mathematical computations and mathematical functions. It can also be used to store some data permanently. Some calculators have in-built programs to perform some complicated calculations.

First Generation Computers


First generation computers used Thermion valves. These computers were large in size and writing programs on them was difficult. Some of the computers of this generation were:
ENIAC
It was the first electronic computer built in 1946 at University

of Pennsylvania, USA by John Eckert and John Mauchy. It was named Electronic Numerical Integrator and Calculator (ENIAC). The ENIAC was 30 50 feet long, weighed 30 tons, contained 18,000 vacuum tubes, 70,000 registers, 10,000 capacitors and required 150,000 watts of electricity.

First Generation Computers


EDVAC
It stands for Electronic Discrete Variable Automatic Computer and was

developed in 1950. The concept of storing data and instructions inside the computer was introduced here. This allowed much faster operation since the computer had rapid access to both data and instructions. The other advantages of storing instruction was that computer could do logical decision internally.

EDSAC
It stands for Electronic Delay Storage Automatic Computer and was developed

by M.V. Wilkes at Cambridge University in 1949.

UNIVAC-1
Ecker and Mauchly produced it in 1951 by Universal Accounting Computer

setup.

Limitations of First Generation Computer


Followings are the major drawbacks of First generation computers. 1. The operating speed was quite slow. 2. Power consumption was very high. 3. It required large space for installation. 4. The programming capability was quite low.

Second Generation Computers


Around 1955 a device called Transistor replaced the bulky electric tubes in the first generation computer. Transistors are smaller than electric tubes and have higher operating speed. They have no filament and require no heating. Manufacturing cost was also very low. Thus the size of the computer got reduced considerably. It is in the second generation that the concept of Central Processing Unit (CPU), memory, programming language and input and output units were developed. The programming languages such as COBOL, FORTRAN were developed during this period. Some of the computers of the Second Generation were
IBM 1620: Its size was smaller as compared to First Generation

computers and mostly used for scientific purpose. IBM 1401: Its size was small to medium and used for business applications. CDC 3600: Its size was large and is used for scientific purposes.

Third Generation Computers


The third generation computers were introduced in 1964.

They used Integrated Circuits (ICs). These ICs are popularly known as Chips. A single IC has many transistors, registers and capacitors built on a single thin slice of silicon. So it is quite obvious that the size of the computer got further reduced. Some of the computers developed during this period were IBM-360, ICL-1900, IBM-370, and VAX-750. Higher level language such as BASIC (Beginners All purpose Symbolic Instruction Code) was developed during this period. Computers of this generations were small in size, low cost, large memory and processing speed is very high.

Fourth Generation Computers


The present day computers that you see today are the

fourth generation computers that started around 1975. It uses large scale Integrated Circuits (LSIC) built on a single silicon chip called microprocessors. Due to the development of microprocessor it is possible to place computers central processing unit (CPU) on single chip. These computers are called microcomputers. Later very large scale Integrated Circuits (VLSIC) replaced LSICs. Thus the computer which was occupying a very large room in earlier days can now be placed on a table. The personal computer (PC) that you see in your school is a Fourth Generation Computer.

Fifth Generation Computers


The computers of 1990s are said to be Fifth Generation

computers. The speed is extremely high in fifth generation computer. Apart from this it can perform parallel processing. The concept of Artificial intelligence has been introduced to allow the computer to take its own decision. It is still in a developmental stage.

Hardware Software Peopleware Dataware

Hardware
Hardware refers

to the physical component of the computer system

Monitor

Speaker

Keyboard

Printer

Mouse

System Unit

Floppy Disk Drive

CD-ROM Drive

Software
Software, or programs, instructs the computer what to

do. It is used to access, identify, and process information. Serving as the intermediary between computer users and the computer hardware Software refers to the intangible part of the computer system that consists of routines and programs, procedures and specialized aids that make the hardware components perform their functions. The two types of software are Operating Systems and Applications.

Operating System
Operating System is a software that manages all the applications in the computer and controls the hardware which loads these applications into the computers memory, runs these applications, and manages peripheral devices, such as disks and printers.

DOS

Application Software
Application Software are programs designed to perform specific data processing tasks for a particular application; oriented towards the solution of a specific problem than to a general class of problems
Word Processors for creating letters, memos, reports, and other write-ups. (OOo Writer, Wordstar, MS Word, WordPerfect) Electronic Spreadsheet especially designed for accounting and budget applications for it turns the screen into an electronic columnar pad where figures can be entered, automatically computed, and displayed. Plus: charts and graphs. (OOo Calc, Lotus, Symphony, MS Excel, Quatro) Database Management System coordinates the use of records and databases. (OOo Base, MS Access, DBase, Foxbase, Image, Informix, Oracle, Minisis) Multimedia, Desktop, and Image Editing Software used to create publication documents, images, stationeries, cards, posters, pie charts, line graphics and other drawings. (Pagemaker, Scribus, GIMP, Photoshop, Ventura Professional, WordPerfect, Flash, Blender)

Application Software
Entertainment Software (games, media players, media

authoring/editing software, etc.) for fun and relaxation. Examples: Tetris, Pacman, Word Wizard, Real Player, WinAmp, QuickTime Movie, Windows Media Player, Windows MovieMaker, Flash Anti-Virus Utilities special programs created to cure infected files or prevent virus infection Examples: Central Point Anti-Virus (CPAV), VirusScan, Virex (Virus Exterminators), Fox Patrol, AVG Engineering/Architectural Tools facilitate the design of structures like bridges, building, cars, and the like, used by engineers and architects. Example: CAD/CAM Network and Communications Software includes browsers, email clients, instant messaging programs, and other similar programs Examples: Mozilla Firefox, Mozilla Thunderbird, MS Internet Explorer, MS Outlook, Yahoo Messenger, Skype

Peopleware
Peopleware refers to people who directly use and work with

computer. Refers to personnel who manage and use the computer system, who design the applications and systems software, who write and encode the programs, who run the hardware, etc.

Computer Technician

Call Center Agent

Computer Programmer

Dataware
This is the systematic and organized collection of data

and procedures relevant to the organization. Data is processed following a procedure to generate information for the use of its management and environment.

Number System

A 0 0 1 1

B 0 1 0 1

A+B 0 1 1 10 ( 0 carry 1

1 + 1 + 1 = 1 1 (1 carry 1)

A 0 0 1 1 10

B 0 1 1 0 1

A-B 0 1 borrow 1 0 1 1

The steps for subtracting two binary numbers are as follows:


(1) Compute the one's complement of the subtrahend by subtracting each digit of the subtrahend by 1. A shortcut for doing this is to simply reverse each digit of the subtrahend - the 1's become 0's and the 0's become 1's.

(2) Add 1 to the one's complement of the subtrahend to get the two's complement of the subtrahend. (3) Add the two's complement of the subtrahend to the minuend and drop the high-order 1. This is your difference.

Reverse each digit of the number ( the 1's become 0's and the 0's become 1's) to get the 1s complement .

Example: +15 = 0000 1111


1s complement (15) = 1111 0000

Add 1 to the one's complement of the number to get the twos complement

Example: +15 = 0000 1111 1s complement 2s complement = 1111 0000 =+ 1 (-15) 1111 0001

+3 = 0000 0011 1s = 1111 1100 2s = + 1 (-3) 1111 1101

A 0 0 1 1

B 0 1 0 1

AxB 0 0 0 1

1)

2)

A 0 0 1 1

B 0 1 0 1

A/B 0 0 0 1

1)

2)

Octal addition is performed just like decimal addition, except that if a column of two addends produces a sum greater than 7, you must subtract 8 from the result, put down that result, and carry the 1. Remember that there are no such digits as "8" and "9" in the octal system, and that 810 = 108 , 910 = 118, etc.

Subtract the subtrahend from the minuend. If the minuend is less than the subtrahend, you will borrow a group of 810 to the next column. When you use the borrow, the column you borrow from is reduced by 1, and the amount of the borrow is added to the column of the minuend being subtracted.

1)

2)

3)

1. 2.

3. 4.

Multiply the given octal digits (the same in multiplying decimal digits) Do not place the answer yet. Divide the product by eight (8) and get the quotient and remainder. Place the remainder in the answer and carry the quotient. Multiply the next column of octal digits and add the carry quotient. Repeat step 2 to 3.

1)

Hexadecimal addition is performed just like decimal addition, except that if a column of two addends produces a sum greater than 15, you must subtract 16 from the result, put down that result, and carry the 1.

1)

2)

3)

4)

Subtract the subtrahend from the minuend. If the minuend is less than the subtrahend, you will borrow a group of 1610 to the next column. When you use the borrow, the column you borrow from is reduced by 1, and the amount of the borrow is added to the column of the minuend being subtracted.

1)

2)

An Algorithm is just a detailed sequence of simple steps that are needed to solve a problem. An algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem An algorithm is a finite set of instructions which, if followed, accomplish a particular task. The algorithm is the basic technique used to get the job done. Example: A recipe to make a cake.

The word is derived from the phonetic pronunciation of the last name of Abu Ja'far Mohammed ibn Musa al-Khowarizmi, who was an Arabic mathematician who invented a set of rules for performing the four basic arithmetic operations (addition, subtraction, multiplication and division) on decimal numbers.

Let's say that you have a friend arriving at the airport, and your friend needs to get from the airport to your house. Here are four different algorithms that you might give your friend for getting to your home

1. 2. 3.

Go to the taxi stand. Get in a taxi. Give the driver my address.

1. 2.

When your plane arrives, call my cell phone. Meet me outside baggage claim.

1. 2. 3.

Take the shuttle to the rental car place. Rent a car. Follow the directions to get to my house.

1.

2. 3. 4.

Outside baggage claim, catch a bus going to SM North Edsa. Transfer to bus going to Bulacan. Get off on Baliuag. Walk two blocks north to my house.

All four of these algorithms accomplish exactly the same goal, but each algorithm does it in completely different way. Each algorithm also has a different cost and a different travel time. Taking a taxi, for example, is probably the fastest way, but also the most expensive. Taking the bus is definitely less expensive, but a whole lot slower. You choose the algorithm based on the circumstances.

Your summer internship has you working with a surveyor. Part of your job is to study some maps that give distances in kilometers and some that use miles. The surveyor prefers to deal in metric measurements. Write a program that performs the necessary conversion. Algorithm: 1. Get the distance in miles. 2. Convert the distance to kilometers. 3. Display the distance in kilometers.

Write an algorithm to determine a students final grade and indicate whether it is passing or failing. The final grade is calculated as the average of four marks.

Algorithm: 1. Input a set of 4 marks. 2. Get the sum of the 4 marks. 3. Calculate the average by dividing the sum of 4 marks by 4. 4. Verify the status of the final grade by checking the value of average. (if it is greater than 74.5 , Print Passed, otherwise, Print Failed)

Pseudo code is a generic way of describing an algorithm without use of any specific programming language syntax. It is, as the name suggests, pseudo code it cannot be executed on a real computer, but it models and resembles real programming code, and is written at roughly the same level of detail.

Write a pseudo code that requires the user to input three numbers from the keyboard and output the result. Begin Input number1, number2, number3 Sum = number1 + number2 + number3 Print Sum End

Write a pseudo code that will accept two numbers from the keyboard and calculate the sum and product , then display the answer on the monitor screen. Begin Display Input two numbers Input number1, number2 sum = number1 + number2 print The sum is , sum product = number1 * number2 print The Product is , product End

Flowcharting is a tool developed in the computer industry, for showing the steps involved in a process. A Flowchart is a graphical representation of an algorithm.
A flowchart is a diagram made up of boxes, diamonds and other shapes, connected by arrows each shape represents a step in the process, and the arrows show the order in which they occur..

Symbol

Name Terminator Process

Function
Indicates the starting or ending of the program, process, or interrupt program. It represents any process, function, or action and is the most frequently used symbol in flowcharting.

Symbol

Name Input / Output

Function
Used for any Input / Output (I/O) operation. Indicates that the computer is to obtain data or output results

Decision

Used to ask a question that can be answered in a binary format (Yes/No, True/False)

Symbol

Name Connector

Function
The Connector Symbol represents the exit to, or entry from, another part of the same flowchart. It is usually used to break a flow line that will be continued elsewhere

Comment

Comment Symbols are used when additional explanation or comment is required. This symbol is usually connected to the symbol it is explaining by a dashed line.

Symbol

Name Offpage Connector

Function
Offpage Connector Symbols are used to indicate the flowchart continues on another page. Often, the page number is placed in the shape for easy reference.

Flow lines

Flow lines indicate the flow of operation, that is, the exact sequence in which the instruction are executed.

Symbol

Name Preparation

Function
It indicates the beginning of the repetition structure.

Predefined Process

It refers to separate flowchart (subprograms)

1. All boxes of the flowchart are connected with Arrows. (Not lines) 2. Flowchart symbols have an entry point on the top of the symbol with no other entry points. The exit point for all flowchart symbols is on the bottom except for the Decision symbol. 3. The Decision symbol has two exit points; these can be on the sides or the bottom and one side. 4. Generally a flowchart will flow from top to bottom. However, an upward flow can be shown as long as it does not exceed 3 symbols.

5. Connectors are used to connect breaks in the flowchart. Examples are: From one page to another page. From the bottom of the page to the top of the same page. An upward flow of more then 3 symbols 6. Subroutines and Interrupt programs have their own and independent flowcharts. 7. All flow charts start with a Terminator or Predefined Process (for interrupt programs or subroutines) symbol. 8. All flowcharts end with a terminator.

You might also like