comp01 module1

49
ABE International College of Business and Economics Main Campus Legarda, Manila GE231A Computer Fundamentals w/ MS Application Compiled by: Paolo H. Codon

Upload: paolocdn

Post on 10-Apr-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 1/49

ABE International College of Business and EconomicsMain CampusLegarda, Manila

GE231AComputer Fundamentals w/ MS Application

Compiled by:

Paolo H. Codon

Page 2: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 2/49

Course Outline

PRELIM PERIOD1. An Overview of the Computer System

1.1. The Parts of a Computer System1.1.1. What is a Computer?1.1.2. Hardware1.1.3. Software1.1.4. Data1.1.5. Users

1.2. Looking Inside the Machine1.2.1. Types of Hardware1.2.2. The CPU

1.2.3. Memory1.2.4. How Memory is measured1.2.5. Input and Output Devices1.2.6. Storage Devices

1.3. Classifications of Computers1.4. Standard Methods of Input1.5. Software: Bringing the Machine to Life1.6. Computers in Society

2. Introduction to Microsoft Word

2.1. The parts of Microsoft Word Interface

MIDTERM PERIOD

1. Transforming Data into Information1.1. How Computers Represent Data1.2. Number System

1.2.1. Binary System1.2.2. Decimal System1.2.3. Octal1.2.4. Hexadecimal

1.3. How Computers Represent Data - Bits and Bytes1.4. How Computers Represent Data - Text Codes1.5. How Computers Process Data

1.5.1. Factors Affecting Processing Speed1.5.2. Extending the Processor's Power to Other Devices

PRE-FINAL PERIOD

1. Flowcharting1.1. Introduction1.2. Objectives1.3. Meaning of A Flowchart1.4. Guidelines for Drawing a Flowchart

1.5. Advantages of Using Flowcharts1.6. Limitations of Using Flowcharts

2

Page 3: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 3/49

1.7. Examples of Flowcharts

FINAL PERIOD

1. Introduction to Data Communications

2. Introduction to Graphics and Multimedia 

PRELIM PERIOD

Lesson 1 - An Overview of the Computer System

1.1 The Parts of a Computer System

1.1.1 What is a Computer?1.1.2 Hardware1.1.3 Software1.1.4 Data1.1.5 Users

1.1.1 What is a Computer?

A computer is an electronic device used to process data. It can convert data

into information that is useful to people. A complete computer system includesfour distinct parts:

• Hardware• Software• Data• User 

1.1.2 HardwareA computer's hardware consists of electronic devices; the parts you can seeand touch. The term "device" refers to any piece of hardware used by thecomputer, such as a keyboard, monitor, modem, mouse, etc.

1.1.3 Software• Software – also called programs – consists of organizedsets of instructions for controlling the computer.

• Some programs exist for the computer's use, to help itmanage its own tasks and devices.

• Other programs exist for the user, and enable thecomputer to perform tasks for you, such as creating documents.

3

Page 4: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 4/49

1.1.4 Data• Data consists of raw facts, which the computer can manipulateand process into information that is useful to people.• Computerized data is digital, meaning that it has been reducedto digits, or numbers. The computer stores and reads all data as

numbers.• Although computers use data in digital form, they convert datainto forms that people can understand, such as text, numerals, sounds,and images.

1.1.5 Users• People are the computer's operators, or users.

• Some types of computers can operate without much interventionfrom people, but personal computers are designed specifically for useby people.

1.2 Looking Inside the Machine

1.2.1 Types of HardwareA computer's hardware devices are categorized as follows:

• Processor • Memory• Input and output (I/O) devices• Storage devices

1.2.2. The CPU• The processor is also called the central processing unit (CPU). Itmanages all devices and performs the actual processing of data.• The procedure that transforms raw data into useful informationis called processing. This function is divided between the computer'sprocessor and memory.• The CPU consists of one or more chips attached to thecomputer's main circuit board (the motherboard).

1.2.3. Memory• Memory also consists of chips attached to the

motherboard.

• Memory holds data and program instructions as the CPUworks with them. This memory is called Random AccessMemory (RAM).

• The CPU can find any piece of data in RAM, when itneeds it for processing.

• RAM is volatile, meaning it holds data only when thepower is on. When the power is off, RAM's contents are lost.

1.2.4. How Memory is Measured

4

Page 5: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 5/49

• The smallest usable unit of measure for memory is the byte –the amount of memory required to hold one character, like the letter Aor the numeral 2.

• Computers work with larger chunks of data, measured in

multiple bytes, as shown below:

Unit Approx. Value Actual Value(bytes) (bytes)

Kilobyte (KB) 1,000 1,024Megabyte (MB) 1,000,000 1,048,576Gigabyte (GB) 1,000,000,000 1,073,741,824

Terabyte (TB) 1,000,000,000,000 1,099,511,627,776

1.2.5.Input and Output Devices• Input devices accept data and instructions from the user or fromanother computer system. The keyboard and mouse are examples of input devices.

• Output devices return processed data back to the user or toanother computer system. The printer and monitor are examples.

• Communications devices (such as modems and networkinterface cards) perform both input and output, allowing computers toshare information.

1.2.6. Storage Devices• Storage devices hold data not currently being used by the CPU.Data is commonly stored on a magnetic or optical disk. Each type usesa special medium for storing data on its surface.

• A disk drive is a device that reads data from and writes data to a

disk. Most new computers feature a floppy disk drive, a hard disk drive,and an optical disk drive.

• The most common optical storage devices are CD-ROM andDVD-ROM drives.

1.3.Classification of Computers

Supercomputers

• Supercomputers are the most powerful computers. They are used for problems requiring complex calculations

5

Page 6: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 6/49

• Because of their size and expense, supercomputers are relatively rare.

• Supercomputers are used by universities, government

Mainframe Computers

• Mainframe computers can support hundreds or thousands of users,handling massive amounts of input, output, and storage.

• Mainframe computers are used in large organizations where manyusers need access to shared data and programs.

• Mainframes are also used as e-commerce servers, handlingtransactions over the Internet.

Minicomputers

• Minicomputers are smaller than mainframes but larger than

microcomputers.

• Minicomputers usually have multiple terminals.

• Minicomputers may be used as network servers and Internet servers.

Workstations

• Workstations are powerful single-user computers.

• Workstations are used for tasks that require a great deal of number-crunching power, such as product design and computer animation.

• Workstations are often used as network and Internet servers.

6

Page 7: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 7/49

Micro-computers or Personal Computers (PC)

• Microcomputers are more commonly known as personal computers.The term "PC" is applied to IBM-PCs or compatible computers.

• Full-size desktop computers are the most common type of PC.

• Notebook (laptop) computers are used by people who need the power of a desktop system, but also portability.

• Handheld PCs (such as PDAs) lack the power of a desktop or notebook PC, but offer features for users who need limited functions andsmall size.

7

Page 8: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 8/49

1.4.STANDARD METHODS OF INPUT

The Keyboard

• The Standard Keyboard Layout

• Ergonomic Keyboards

• How a Keyboard Works

Standard Keyboard Layout

• A standard computer keyboard has about 100 keys.

• Most keyboards use the QWERTY layout, named for the first sixkeys in the top row of letters.

Most keyboards have keys arranged in five groups:

1. Alphanumeric keys2. Numeric keypad3. Function keys4. Modifier keys5. Cursor-movement keys

Ergonomic Keyboards

• Long periods of keyboard use can cause injuries.

• An ergonomically correct keyboard can help you avoid injuries.• You also can avoid injuries by adopting correct keyboarding practices.

8

Page 9: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 9/49

How a Keyboard Works

When you press a key:

1. The keyboard controller detects the keystroke.2. The controller places a scan code in the keyboard buffer,indicating which key was pressed.3. The keyboard sends the computer an interrupt request, tellingthe CPU to accept the keystroke.

9

Page 10: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 10/49

The Mouse

What is a Mouse?

The mouse is a pointing device. You use it to move a

graphical pointer on the screen. The mouse can be used to issue commands, draw, andperform other types of input tasks.

Mouse Techniques

Using the mouse involves five techniques:

• Pointing; Move the mouse to move the on-screen pointer.

Clicking; Press and release the left mouse button once.

• Double-clicking; Press and release the left mouse button twice.

• Dragging; Hold down the left mouse button as you move thepointer.

• Right-clicking; Press and release the right mouse button.

Variants of the Mouse

• Trackballs

• Trackpads

• Integrated Pointed Devices

Trackballs

• A trackball is like a mouse turned upside-down.

• Use your thumb to move the exposed ball and your fingers to

press the buttons.• Many styles of trackball are available.

10

Page 11: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 11/49

Track pads

• A trackpad is a touch-sensitive pad that provides thesame functionality as a mouse.

• To use a trackpad, you glide your finger across itssurface.

• Trackpads provide a set of buttons that function likemouse buttons.

Integrated Pointing Devices

• An integrated pointing device is a small joystick built into thekeyboard.

• To use an integrated pointing device, you move the joystick.

• These devices provide a set of buttons that function like mousebuttons

11

Page 12: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 12/49

ALTERNATIVE METHODS

OF INPUT

This lesson includes the following sections:1. Devices for the Hand2. Optical Input Devices3. Audio-Visual (Multimedia) Input Devices

1-Devices for the Hand

• Pens

• Touch Screens

• Game Controllers

Pens

• With a pen-based system, you use an electronic pen to write onthe screen and choose commands.

• Pens are common input devices for handheld computers, like“personal digital assistants (PDAs).”

• Pens are handy for making notes or selecting commands, notfor inputting a lot of text.

12

Page 13: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 13/49

The user can point, tap, draw and write on the computer’s screen with a pen.

Touch Screens• Touch-screen systems accept input directly through themonitor.

• Touch screens use sensors to detect the touch of a finger. Theyare useful where environmental conditions prohibit the use of akeyboard or mouse.

• Touch-screen systems are useful for selecting options frommenus.

13

Page 14: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 14/49

Game Controller 

• The two primary types of game controllers are joysticks andgame pads.

• Game pads usually provide controls for each hand.

• Joysticks are popular for flight simulator and driving games.

2-Optical Input Devices• Bar Code Readers

• Image Scanners and OCR

Bar Code Readers• Bar code readers can read bar codes—patterns of printed bars.

• The reader emits light, which reflects off the bar code and into adetector in the reader. The detector translates the code into numbers.

• Flatbed bar code readers are commonly found in supermarkets.Courier services often use handheld readers.

14

Page 15: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 15/49

Bar code readers commonly track sales in retail storesImage Scanners and OCR

• Image scanners digitize printed images for storage and manipulation in a computer .

• A scanner shines light onto the image and interprets thereflection.

• Optical character recognition (OCR) software translatesscanned text into editable electronic documents.

Docume being

scanne

Co

 

15

Page 16: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 16/49

3-Audio-Visual (Multimedia) Input Devices• Microphones and Speech Recognition

• Video Input

Microphones and Speech Recognition

• Microphones can accept auditory input. A microphonerequires a sound card in the PC.

• A sound card can digitize analog sound signals, and convertdigital sound signals to analog form.

• With speech recognition software, you can use your 

microphone to dictate text, navigate programs, and choosecommands.

16

Page 17: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 17/49

Page 18: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 18/49

• In color CRTs, each pixel contains a red, green, and blue dot.These glow at varying intensities to produce color images.

- Flat-Panel Monitors

• Most flat-panel monitors use liquid crystal display (LCD)

technology.

• Passive matrix LCD uses a transistor for each row and columnof pixels.

• Active matrix LCD uses a transistor for each pixel on the screen.

• Thin-film transistor displays use multiple transistors for each pixel.

- Comparing MonitorsWhen comparing monitors, consider four features:

• Size

• Resolution

• Refresh rate

• Dot pitch- Size

• A monitor's size is the diagonal measurement of its face, ininches.

18

Page 19: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 19/49

• For years, 15" monitors (13"viewing area) were standard.

• Today, 17" monitors (15" viewing area) are common.

• Larger monitors are available, but can be expensive.

- Resolution• Resolution is the number of pixels on the screen,

expressed as a matrix (such as 600x800).

• A 17" monitor offers resolutions from 640x480 up to 1280x1024.

• The Video Graphics Array (VGA) standard is 640x480. Super VGA (SVGA) monitors provide resolutions of 800x600, 1024x768 or 

higher.

- Refresh Rate• Refresh rate is the number of times each second that theelectron guns scan the screen's pixels.

• Refresh rate is measured in Hertz (Hz), or cycles per second.

• Look for a refresh rate of 72 Hz or higher. A slower rate may cause eyestrain.

19

Page 20: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 20/49

Fast scanning = Quick refresh (less flicker)

- Dot Pitch• Dot pitch is the distance between the phosphor dots that makeup a single pixel.

• In color monitors, three dots (red, green, and blue) compriseeach pixel.

• Look for a dot pitch no greater than .28 millimeter.

Fine dot pitch = Crisp displays

 Monitors - Video Controllers• The video controller is an interface between the monitor and theCPU.

20

Page 21: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 21/49

• The video controller determines many aspects of a monitor'sperformance, such as resolution or the number of colors displayed.

• The video controller contains its own on-board processor and

memory, called video RAM (VRAM).

PC Projectors

• A PC projector connects to a PC and is used to project imageson a large screen.

21

Page 22: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 22/49

• Many PC projectors provide the same resolutions and color levels as high-quality monitors.

• Digital light processing (DLP) projectors use a microchip

containing tiny mirrors to produce very sharp, bright images.• Projected Screen

Figure - Projected Screen

Sound Systems

22

Page 23: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 23/49

Review• List the two most commonly used types of computer monitors.

• Explain how a CRT monitor displays images.

• Identify two types of flat-panel monitors and explain their differences.

• List four characteristics you should consider when comparingmonitors.

• Explain how a computer outputs sound.

1.6. Software: Bringing the Machine to Life• What is Software?

• System Software

• Application Software

What is Software?• Software is a set of electronic instructions that tells thecomputer how to do certain tasks. A set of instructions is oftencalled a program.

• When a computer is using a particular program, it is saidto be running or executing the program.

• The two most common types of programs are systemsoftware and application software.

23

Page 24: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 24/49

System Software• System software exists primarily for the computer itself, to helpthe computer perform specific functions.

• One major type of system software is the operating system(OS). All computers require an operating system.

• The OS tells the computer how to interact with the user and itsown devices.

 

• Common operating systems include Windows, the MacintoshOS, OS/2, and UNIX.

- Applications• Application software tells the computer how to accomplish tasksthe user requires, such as creating a document or editing a graphicimage.• Some important kinds of application software are:

• Word processing programs- for creating text-baseddocuments such as newsletters or brochures.

• Spreadsheet software- for creating numeric-baseddocuments such as budgets or balance sheets.• Database management software for building andmanipulating large sets of data.• Presentation programs for creating and presentingelectronic slide shows.• Graphics programs for designing illustrations or manipulating movies, photographs or animation.

• Web design tools and browsers and other  Internetapplications such as email programs.

24

Page 25: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 25/49

1.6.Computers in Society

• More impact than any other invention –  Changed work and leisure activities –  Used by all demographic groups

• Computers are important because: –  Provide information to users –  Information is critical to our society –  Managing information is difficult

• Computers at home –  Many homes have multiple computers –  Most homes have Internet –  Computers are used for 

• Business

• Entertainment• Communication• Education

• Computers in education –  Computer literacy required at all levels

• Computers in small business –  Makes businesses more profitable –  Allows owners to manage

• Computers in industry –  Computers are used to design products –  Assembly lines are automated

• Computers in government –  Necessary to track data for population

• Police officers• Tax calculation and collection

 –  Governments were the first computer users• Computers in health care

 –  Revolutionized health care –  New treatments possible –  Scheduling of patients has improved –  Delivery of medicine is safer 

Lesson 1 review• List the four parts of a computer system.

• Identify four types of computer hardware.

• List five units of measure for computer memory and storage.

• Provide two examples of input and output devices.

• Name and describe three types of storage devices.

• Differentiate the two main categories of computer software.

25

Page 26: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 26/49

List four specific types of application software.

MIDTERM PERIOD

Transforming Data into Information

This lesson includes the following sections:• How Computers Represent Data• How Computers Process Data• Factors Affecting Processing Speed• Extending the Processor's Power to Other Devices

How Computers Represent Data• Binary Numbers• The Binary Number System• Bits and Bytes• Text Codes

How Computers Represent Data – Binary Numbers

• Computer processing is performed by transistors, which areswitches with only two possible states: on and off.

• All computer data is converted to a series of binary numbers– 1

and 0. For example, you see a sentence as a collection of letters, butthe computer sees each letter as a collection of 1s and 0s.

26

Page 27: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 27/49

• If a transistor is assigned a value of 1, it is on. If it has a valueof 0, it is off. A computer's transistors can be switched on and off millions of times each second.

The Binary Number System

• To convert data into strings of numbers, computers use thebinary number system.

• Humans use the decimal system (“deci” stands for “ten”).

• The binary number system works the same way as the decimalsystem, but has only two available symbols (0 and 1) rather than ten(0, 1, 2, 3, 4, 5, 6, 7, 8, and 9).

A. binary2 -> decimal

11012 -> decimal

27

Page 28: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 28/49

First write 2 to the power of the numbers 0,1,2,3,...

23 22 21 20 

Now change them to their real values.

8 4 2 1

Now put the binary number underneath the other numbers and multiply thetop number by the number beneath it and put the answer underneath theother 2 with + between each number and add the bottom row together to getyour final answer.

8 4 2 11 1 0 18+4+0+1 = 13

11012 -> 13

B. binary2 -> octal8

10102 -> octal8 

001 010421 4210+0+1 = 1; 0+2+0 = 2

10102 -> 128 

C. binary2 -> hexadecimal16

101112 -> hexadecimal16 

First separate the binary number into groups of 4 digits. If the number at thefront has less than 4 digits then add 0s to the front of it.

0001 0111

Now use the numbers 8421 and multiply each time and add the resultstogether for each group to get the answer.

0001 01118421 84210+0+0+1 = 1; 0+4+2+1 = 7

101112 -> 1716

Decimal

28

Page 29: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 29/49

We count in what is called the decimal counting system. Decimal has 10 digitswhich are 0,1,2,3,4,5,6,7,8,9. Decimal is also called base 10 because it has10 digits. The reason why people started counting in decimal is because it has10 digits and we have 10 fingers and people used to use their fingers for counting.

A. decimal -> binary2

5 -> binary2 

First write a few 2s(because it's base 2) to the power of the numbers0,1,2,3,...

23 22 21 20 

Next calculate the values of these numbers.

8 4 2 1

The highest number must be greater than the number you want to convert.

Now divide the number to be converted by the number starting on the left.Write how many times the number divides into it underneath the number andthen write your remainder on top of the next number to be divided. You thendivide by the remainder each time after that.

5 5 1 18 4 2 10 1 0 1

The bottom line of numbers is the binary number. Make sure to leave out allleading 0s

5 -> 1012 

B. decimal -> octal8

This time we use 8 to the power of those numbers because we are workingwith base 8.

12 -> octal8 

82 81 80 

12 12 464 8 10 1 4

12 -> 148 

29

Page 30: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 30/49

C. decimal -> hexadecimal16

Decimal to hexadecimal works in the same way except that you use 16 to thepower of those numbers since that is the base this time.

26 -> hexadecimal16 

162 161 160 

26 26 10256 16 10 1 10

Before we write the answer we must change all numbers greater than 9 totheir hexadecimal equivalents.

1 101 A

26 -> 1A16 

Octal

Octal uses 8 digits which are 0,1,2,3,4,5,6,7 and is also called base 8. We usea subscripted 8 to show that a number is octal:

2758 

A. octal8 -> binary2

268 -> binary2 

2 6421 421010 110

268 -> 101102

B. octal8 -> decimal

258 -> decimal

81 80 

8 12 516+5 = 21

158 -> 21

30

Page 31: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 31/49

C. octal8 -> hexadecimal16

278 -> hexadecimal16 

First convert the octal number to binary.

2 7421 421010 111

Make groups of 4 and then convert to hexadecimal.

0001 01118421 8421

0+0+0+1 = 1; 0+4+2+1 = 7

278 -> 1716 

Hexadecimal

The word hexadecimal is made up of 2 parts which are hex(6) anddecimal(10). If you add 6 and 10 together you get 16 and that is how many

digits there are in hexadecimal. Hexadecimal is sometimes called hex or base16. To get 16 digits we have to use letters of the alphabet and those 16 digitsare 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F. Hexadecimal is often used instead of binary numbers because just 2 hexadecimal digits can make the samenumbers as 8 binary digits which in turn make up a byte. A subscripted 16 isused to show that a number is hexadecimal:

7F16 

A. hexadecimal16 -> binary2

2C16 -> binary2 

First write the number as decimals.

2 12

Now divide each number by the numbers 8 4 2 1.

2 128421 84210010 1100

Take the leading 0s away and you have your answer.

31

Page 32: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 32/49

2C16 -> 1011002 

B. hexadecimal16 -> decimal

Once again you use 16 instead of 2.

1F16 -> decimal

161 160 

16 11 F16+F = 16 + 15 = 31

1F16 -> 31

C. hexadecimal16 -> octal8

We do not convert directly from hexadecimal to octal but instead first convertto binary and then to octal.

4516 -> octal8 

First convert the hexadecimal number to binary.

4 5

8421 84210100 0101

Now make groups of 3 digits and then convert to octal.

001 000 101421 421 4210+0+1 = 1; 0+0+0 = 0; 4+0+1 = 5

4516 -> 1058 

How Computers Represent Data - Bits and Bytes• A single unit of data is called a bit, having a value of 1 or 0.

• Computers work with collections of bits, grouping them torepresent larger pieces of data, such as letters of the alphabet.

• Eight bits make up one byte. A byte is the amount of memoryneeded to store one alphanumeric character.

• With one byte, the computer can represent one of 256 differentsymbols or characters.

How Computers Represent Data - Text Codes

32

Page 33: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 33/49

Page 34: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 34/49

How Computers Process Data –Where Processing Occurs

• Processing takes place in the PC's central processingunit (CPU).

• The system's memory also plays a crucial role inprocessing data.

• Both the CPU and memory are attached to the system'smotherboard, which connects all the computer's devicestogether, enabling them to communicate.

How Computers Process Data –The Control Unit

The two main parts of a CPU are the control unit and the arithmetic logic unit(ALU)

• The control unit directs the flow of data through the CPU,and to and from other devices.

• The control unit stores the CPU's microcode, whichcontains the instructions for all the tasks the CPU can perform.

34

Page 35: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 35/49

How Computers Process Data –The Arithmetic Logic Unit

• The actual manipulation of data takes place in the ALU.

• The ALU can perform arithmetic and logic operations.

• The ALU is connected to a set of registers—small memoryareas in the CPU, which hold data and program instructions while theyare being processed.

ALU Operations List

ArithmeticOperations

LogicalOperations

+ Add = , ≠ equal to, not equal to

  − Subtract >, > greater than, not greater than

x Multiply <, < less than, not less than

  ÷ Divide ≥ , ≥ greater than or equal to,not greater than or equal

to

^ Raise by a power  ≤ , ≤ less than or equal to,not less than or equal to

How Computers Process Data –Machine Cycles

• The CPU follows a set of steps-called a machinecycle-for each instruction it carries out.

35

Page 36: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 36/49

• By using a technique called pipelining, many CPUscan process more than one instruction at a time.

• The machine cycle includes two smaller cycles:

During the instruction cycle, the CPU"fetches" a command or data from memory and"decodes" it for the CPU.

During the execution cycle, the CPU carriesout the instruction, and may store the instruction'sresult in memory.

How Computers Process Data –The Role of Memory

• RAM stores data and program code needed by the CPU. Thecontents of RAM change rapidly and often.

• Read-only memory (ROM) is nonvolatile (or permanent). Itholds instructions that run the computer when the power is first turnedon.

• The CPU accesses each location in memory by using a uniquenumber, called the memory address.

How Computers Process Data - Types of RAMThere are two basic types of RAM: static and dynamic

• Dynamic RAM (DRAM) chips must be rechargedwith electricity very frequently, or they will lose their contents.

• Static RAM (SRAM) does not need to berecharged

as often as DRAM, and can hold its contents longer.

• Another type of RAM, called flash memory, can store itscontents after power is turned off. Flash memory is used in digital

cameras to store pictures.

36

Page 37: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 37/49

Factors Affecting Processing Speed• Registers

• RAM

• The System Clock

• The Bus

• Cache Memory

Factors Affecting Processing Speed – Registers• The CPU contains a number of small memory areas, calledregisters, which store data and instructions while the CPU processesthem.

• The size of the registers (also called word size) determines theamount of data with which the computer can work at a one time.

• Today, most PCs have 32-bit registers, mean the CPU canprocess four bytes of data at one time. Register sizes are rapidlygrowing to 64 bits.

Factors Affecting Processing Speed – RAM• The amount of RAM in a PC has a direct affect on the system's

speed.

• The more RAM a PC has, the more program instructions anddata can be held in memory, which is faster than storage ondisk.

• If a PC does not have enough memory to run a program, it mustmove data between RAM and the hard disk frequently. Thisprocess, called swapping, can greatly slow a PC's performance.

37

Page 38: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 38/49

Figure - More RAM = Better Performance!

Factors Affecting Processing Speed –The System Clock

• The computer's system clock sets the pace for the CPU by usinga vibrating quartz crystal.

• A single "tick" of the clock is the time required to turn atransistor off and back on. This is called a clock cycle.

• Clock cycles are measured in Hertz (Hz), a measure of cyclesper second. If a computer has a clock speed of 300 MHz, then itssystem clock "ticks" 300 million times every second.

38

Page 39: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 39/49

• The faster a PC's clock runs, the more instructions the PC canexecute each second.

Factors Affecting Processing Speed –The Bus

• A bus is a path between the components of a computer. Data

and instructions travel along these paths.

• The data bus' width determines how many bits can betransmitted between the CPU and other devices.

 • The address bus runs only between the CPU and RAM, andcarries nothing but memory addresses for the CPU to use.

• Peripheral devices are connected to the CPU by an expansionbus.

Factors Affecting Processing Speed –Cache Memory

• Cache memory is high-speed memory that holds the mostrecent data and instructions that have been loaded by the CPU.

• Cache is located directly on the CPU or between the CPU andRAM, making it faster than normal RAM.

• CPU-resident cache is called Level-1 (L1) cache. External cacheis called Level-2 (L2) cache.

39

Page 40: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 40/49

• The amount of cache memory has a tremendous impact on thecomputer's speed.

Extending the Processor's Power to Other Devices• Ports

• Expansion Slots and Boards

Extending the Processor's Power to Other Devices – Ports

• External devices—such as those used for input and output—areconnected to the system by ports on the back of the computer.

40

Page 41: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 41/49

• PCs feature a number of built-in ports, which are ready to acceptdevices such as a printer, mouse, keyboard, phone line, microphoneand speakers, and others.

• Most computers come with a serial port and a parallel port. A

serial port transmits one bit of data at a time; a parallel port transmitsdata one byte at a time.

Adding Other Devices –Expansion Slots and Boards

• If the PC does not have a port for an external device, you caninstall an expansion board into one of the empty expansion slots.

• A board provides the correct port for the new device, andconnects the device to the CPU by way of the computer'sexpansion bus.

• Newer bus technologies such as Universal Serial Bus (USB)and IEEE 1394 enable many devices to be connected to one port.

• Small Computer System Interface (SCSI) is an older standardfor extending the bus to multiple devices through a single port.

Review• List two reasons why computers use the binary number system.• List the two main parts of the CPU and explain how they worktogether.• Explain the difference between RAM and ROM.• Identify two RAM technologies used in PCs.• List three hardware factors that affect processing speed.• Identify four connections used to attach devices to a PC.

41

Page 42: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 42/49

PRE-FINALS

1. Flowcharting

FLOWCHARTING

1.1 INTRODUCTION

The flowchart is a means of visually presenting the flow of data through aninformation processing systems, the operations performed within the systemand the sequence in which they are performed. In this lesson, we shallconcern ourselves with the program flowchart, which describes whatoperations (and in what sequence) are required to solve a given problem. Theprogram flowchart can be likened to the blueprint of a building. As we know adesigner draws a blueprint before starting construction on a building.Similarly, a programmer prefers to draw a flowchart prior to writing a computer program. As in the case of the drawing of a blueprint, the flowchart is drawnaccording to defined rules and using standard flowchart symbols prescribedby the American National Standard Institute, Inc.

1.2 OBJECTIVESAt the end of this lesson, you will be able to understand:-the meaning of flowchart-the basic parts of the flowchart such as flowchart symbols and the flow linesconnecting these symbols.

-the advantages and limitations of flowchart

1.3 MEANING OF A FLOWCHARTA flowchart is a diagrammatic representation that illustrates the sequence of operations to be performed to get the solution of a problem. Flowcharts aregenerally drawn in the early stages of formulating computer solutions.Flowcharts facilitate communication between programmers and businesspeople. These flowcharts play a vital role in the programming of a problemand are quite helpful in understanding the logic of complicated and lengthyproblems. Once the flowchart is drawn, it becomes easy to write the programin any high level language. Often we see how flowcharts are helpful in

explaining the program to others. Hence, it is correct to say that a flowchart isa must for the better documentation of a complex program.

1.4 GUIDELINES FOR DRAWING A FLOWCHARTFlowcharts are usually drawn using some standard symbols; however, somespecial symbols can also be developed when required. Some standardsymbols, which are frequently required for flowcharting many computer programs are shown in Fig. 1 :

42

Page 43: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 43/49

Start or end of the program

Computational steps or processing

function of a program

Input or output operation

Decision making and branching

Connector or joining of two parts of program

Magnetic Tape

Magnetic Disk

Off-page connector 

Flow line

43

Page 44: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 44/49

Annotation

Display

 Fig.1 Flowchart Symbols

The following are some guidelines in flowcharting:In drawing a proper flowchart, all necessary requirements should be listed outin logical order.The flowchart should be clear, neat and easy to follow. There should not beany room for ambiguity in understanding the flowchart.The usual direction of the flow of a procedure or system is from left to right or top to bottom.Only one flow line should come out from a process symbol.

or Only one flow line should enter a decision symbol, but two or three flow lines,one for each possible answer, should leave the decision symbol.

Only one flow line is used in conjunction with terminal symbol.

44

Page 45: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 45/49

Write within standard symbols briefly. As necessary, you can use theannotation symbol to describe data or computational steps more clearly.

If the flowchart becomes complex, it is better to use connector symbols toreduce the number of flow lines. Avoid the intersection of flow lines if you wantto make it more effective and better way of communication.Ensure that the flowchart has a logical start and finish. It is useful to test the validity of the flowchart by passing through it with asimple test data.

1.5 ADVANTAGES OF USING FLOWCHARTS

The benefits of flowcharts are as follows:

1. Communication: Flowcharts are better way of communicating the logic of asystem to all concerned.2. Effective analysis: With the help of flowchart, problem can be analysed inmore effective way.3. Proper documentation: Program flowcharts serve as a good programdocumentation, which is needed for various purposes.4. Efficient Coding: The flowcharts act as a guide or blueprint during thesystems analysis and program development phase.5. Proper Debugging: The flowchart helps in debugging process.6. Efficient Program Maintenance: The maintenance of operating program

becomes easy with the help of flowchart. It helps the programmer to putefforts more efficiently on that part

1.6 LIMITATIONS OF USING FLOWCHARTS

1. Complex logic: Sometimes, the program logic is quite complicated. In thatcase, flowchart becomes complex and clumsy.2. Alterations and Modifications: If alterations are required the flowchart mayrequire re-drawing completely.3.Reproduction: As the flowchart symbols cannot be typed, reproduction of flowchart becomes a problem.

The essentials of what is done can easily be lost in the technical details of how it is done.

1.7 EXAMPLES ON FLOWCHARTINGNow we shall present few examples on flowcharting for proper understandingof this technique. This will help in student in program development process ata later stage.Example 1Draw a flowchart to find the sum of first 50 natural numbers.Answer: The required flowchart is given in Fig. 1

45

Page 46: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 46/49

 Fig. 1 Sum of first 50 natural numbersFig 1 Flowchart for computing the sum of first 50 natural numbers.Example 2Draw a flowchart to find the largest of three numbers A,B, and C.Answer: The required flowchart is shown in Fig 2.

46

Page 47: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 47/49

Fig 2 Flowchart for finding out the largest of three numbers Example 3Draw a flowchart for computing factorial N (N!)Where N! = 1 ´ 2 ´ 3 ´ …… N .The required flowchart has been shown in fig 3

47

Page 48: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 48/49

Answer:

 Fig 3 Flowchart for computing factorial N

ASSESSMENT 1:Fill in the blank.A program flowchart indicates the_________ to be per formed and the __________ in which they occur.A program flowchart is generally read from _____________ to ________________ Flowcharting symbols are connected together by means of  ___________________ 

A decision symbol may be used in determining the ____________ or  ___________ of two data items. __________ are used to join remote portions of a flowchart ____________ connectors are used when a flowchart ends on one page andbegins again on other pageA ________ symbol in used at the beginning and end of a flowchart.The flowchart is one of the best ways of ________ a program.To construct a flowchart, one must adhere to prescribed symbols provided bythe __________ .The programmed uses a ____________ to aid him in drawing flowchartsymbols.

Answers:

48

Page 49: Comp01 module1

8/8/2019 Comp01 module1

http://slidepdf.com/reader/full/comp01-module1 49/49

Operations, sequenceTop, downFlow lineEquality, inequalityconnectors

Off -pageTerminaldocumentingANSI (American National Standards Institute)Flowcharting template

ASSESSMENT 2:1. Define Flowcharting.2. TERMINAL QUESTIONSDraw a flowchart to read a number N and print all its divisors.Draw a flowchart for computing the sum of the digits of any given number 

Draw a flowchart to find the sum of given N numbers.Draw a flowchart to computer the sum of squares of integers from 1 to 50Draw a flowchart to arrange the given data in an ascending order.