Nothing Special   »   [go: up one dir, main page]

Presentation 2

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 70

Chapter 1 part one

Fundamentals of Computers
Objectives

After learning this chapter, you will able to…

 Define what computer is


 Identify Computer Architectures
 Define functional units of computer
 Define what a software is
 Identify software types
What is computer?
Think about some of the different ways that people use
computers.

In school, students use computers for tasks such as:

 writing papers,

 searching for articles,

 sending email, and

 participating in online classes


At work, people use computers to

 analyze data

 make presentations,

 conduct business transactions,

 communicate with customers and coworkers,

 control machines in manufacturing facilities, and

 do many other things.


At home, people use computers for tasks such as
 paying bills,
 shopping online,
 communicating with friends and
 playing computer games.

Note: don’t forget that cell phones, iPods®, Blackberries®,


car navigation systems, and many other devices are
computers too.

So, the uses of computers are almost limitless in our


everyday lives.
Cont…
 Computers can do such a wide variety of things
because they can be programmed. This means that
computers are not designed to do just one job, but
to do any job that their programs tell them to do.
 regarding to it’s use Webster’s Dictionary (1980)
defines it as “a programmable electronic device
that can store, retrieve, and process data”
Cont…
Simply put, a computer is an electronic machine
that:
 Accepts input information,

 Processes the information according to a list of


internally stored instructions and
 Produces the resulting output information
computer hardware and Software

Computer is the integration of both hardware and


software
 The term hardware refers to all of the physical

devices, or components, that a computer is made of.


 The programs that run on a computer are referred to
as software.
 A computer is not one single device, but a system of

devices that all work together.


Functional units of computer system

 The central processing unit (CPU)


 Main memory
 Secondary storage devices
 Input devices
 Output devices
Typical components of a computer system
Functional units of a computer

Input unit accepts Arithmetic and logic unit(ALU):


information: •Performs the desired
•Human operators, operations on the input
•Electromechanical devices information as determined
•Other computers by instructions in the memory

Memory
Arithmetic
Input
Instr1 & Logic
Instr2
Instr3
Data1 Fundamentals of Computers
Output Data2 Control

I/O Processor
Stores
information: Control unit coordinates
Output unit sends various actions
•Instructions,
results of processing: •Input,
•To a monitor display, •Data
•Output
•To a printer •Processing 11
The CPU

 The CPU is the most important component in a computer


because without it, the computer could not run software
 In the earliest computers, CPUs were huge devices made of
electrical and mechanical components such as vacuum tubes
and switches.
 Today, CPUs are small chips called microprocessors and it
is more powerful
Comparison
Comparison
Old computer(ENIAC) New computer (CPU)
 huge devices  small chips called
 8 feet tall &100 feet microprocessor
long  More powerful.
 and weighed 30 tons.  fast
Main Memory
 computer’s work area
 This is where the computer stores a program while the
program is running, as well as the data that the program is
working with.
 suppose you are using a word processing to write an essay
in a classes. While you do this, both the word processing
program and the essay are stored in main memory.
 Main memory is commonly known as random-access
memory, or RAM.
Main Memory
 because the CPU is able to quickly access data stored at
any random location in RAM.
 And it is usually a volatile type of memory that is used
only for temporary storage while a program is running.
 When the computer is turned off, the contents of RAM
are erased.
Inside your computer, RAM is stored in chips,
Secondary Storage Devices

 Secondary storage is a type of memory that can hold data


for long periods of time, even when there is no power to the
computer.
 Programs are normally stored in secondary memory and
loaded into main memory as needed.
 Important data, such as word processing documents,
payroll data, and inventory records, is saved to secondary

storage as well.
Secondary Storage Devices

 The most common type of secondary storage device is the


disk drive.
 External disk drives can be used to create backup copies of
important data or to move data to another computer.
 In addition to external disk drives, many types of devices
have been created for copying data, and for moving it to
other computers.
 Floppy disk, USB drive, CD drive and DVD are the
common one
Input Devices
 Input is any data the computer collects from people and
from other devices.
 The component that collects the data and sends it to the
computer is called an input device.
 Common input devices are the keyboard, mouse, scanner,
microphone, and digital camera.
 Disk drives and optical drives can also be considered as
input devices because programs and data are retrieved from
them and loaded into the computer’s memory.
Output Devices
Output is any data the computer produces for people or for
other devices. It might be

a sales report,

a list of names, or

a graphic image.
Common output devices are
video displays,

printers and

speaker.

Disk drives and CD recorders can also be considered


output devices because the system sends data to them in
order to be saved.
Software

If a computer is to function, software is not optional.


Everything that a computer does, from the time you turn
the power switch on until you shut the system down, is
under the control of software.

There are two general categories of software:


 system software and

 application software.
System Software

The programs that control and manage the basic


operations of a computer

It includes three types of programs::


 Operating Systems
 Utility Programs
 Software Development Tools
 An operating system is the most fundamental set
of programs on a computer.
Cont…
The operating system controls
 the internal operations of the computer’s hardware,
 manages all of the devices connected to the
computer,
 allows data to be saved to
 retrieved from storage devices, and
 allows other programs to run on the computer.
Examples: Windows Vista, Mac OS X, and Linux.
Cont…
Utility Programs: performs a specialized task that
enhances the computer’s operation or safeguards data.
 Examples of utility programs are
 virus scanners,
 file compression programs, and
 data backup programs.
Cont…
Software Development Tools are the programs that
programmers use to create, modify, and test software.
 Assemblers, compilers, and interpreters are examples of
programs that fall into this category.
Application Software

 Programs that make a computer useful for everyday


tasks
 These are the programs that people normally spend most
of their time running on their computers.
 Examples : Microsoft Word, a word processing program,
Adobe Photoshop, image editing program, spreadsheet
programs, email programs, web browsers, and game
programs.
Checkpoint

1.1 What is a program?

1.2 What is hardware?

1.3 List the five major components of a computer system.

1.4 What part of the computer actually runs programs?


What is programming?

Programming is the process of creating a set of


instructions that tell a computer how to perform a task.

A program is a set of instructions that guide the computer


in carrying out a specific task.
 To write a program, we need to have programming
languages such as java , SQL, Python, and C++.
 Computer can not understand these languages
Cont…
 So the program must be translated to a language that
the machine can understand, called machine language
and then executed.
 This is done by the following translators:
 Assembler
 Compiler
 Interpreter
Representing numbers
in a computer
 Computers are built from transistors and each
transistor can only be ON or OFF switch ( two option)

 Data storage devices can be optical or magnetic

 Optical storage stores data by controlling light


whether it is reflected or not (two option)

 Magnetic device store data by magnetizing particles


and we have two magnetic poles ( two option)
Cont…
In general computers are two state devices so it
needs two state numbers to store its data and to
manipulate it. Therefore binary number system
is more convent to represent numbers in a
computer
Number system

It is a technique to represent a number in a computer


system architecture.

Computer architecture supports the following number


system
o Decimal number system
o Binary number system
o Octal number system
o Hexadecimal number system
Decimal number system

 Decimal number system has only ten (10)


digits from 0 to 9.
 Every number represents with 0,1,2,3,4,5,6,
7,8 and 9 in this number system.
 The base of decimal number system is 10,
because it has only 10 digits.
Binary Number System

 A Binary number system has only two digits that


are 0 and 1.
 Every number represents with 0 and 1 in this
number system.
 The base of binary number system is 2, because it
has only two digits.
Octal number system

 Octal number system has only eight (8) digits


from 0 to 7.
 Every number represents with 0,1,2,3,4,5,6 and 7
in this number system.
 The base of octal number system is 8, because it
has only 8 digits.
Hexadecimal number system

 A Hexadecimal number system has sixteen (16)


alphanumeric values from 0 to 9 and A to F.
 Every number represents with 0,1,2,3,4,5,6,
7,8,9,A,B,C,D,E and F in this number system.
 The base of hexadecimal number system is 16, because
it has 16 alphanumeric values.
 Here A is 10, B is 11, C is 12, D is 13, E is 14 and F is
15.
Conversion of Numbers system

From Binary to Octal


Starting from the right end, separate the bits into
groups of three and replace each group with the
corresponding octal digit.
100010112 = 010 001 011 = 2138
From Binary to Hexadecimal
Starting at the right end of the binary point,
separate the bits into groups of four and replace
each group with the corresponding hexadecimal
digit.

Example : convert a binary digit number 10001011 2


to hexadecimal equivalent.

solution
100010112 = 1000 1011 = 8B16
From binary to decimal
From Octal to Binary

Replace each octal digit with the corresponding 3-


bit binary string.

Example : convert the octal digit number 213 8 into


binary.

Solution
2138 = 010 001 011 = 100010112
From Hexadecimal to Binary

Replace each hexadecimal digit with the


corresponding 4-bit binary string.

Example: convert 8B16 to binary equivalent


Conversion of Decimal Numbers

It is frequently necessary to convert decimal numbers


to equivalent binary numbers. The most frequently
used methods for this conversion is
 Repeated division-by-2 or
 multiplication-by-2 method.
Conversion of Decimal Numbers
Conversion of Fractions

From binary to octal and hex number


 Starting at the binary point, group the binary digits that lie to
the right into groups of three or four. And replace the groups
with their corresponding octal and hex string of digits
Example: convert the binary fraction 0.101112 into octal
and hexadecimal number ?
Solution
0.101112 = 0.101 1102 = 0.568
0.101112 = 0.1011 10002 = 0.B816
From decimal to binary

When converting decimal fraction to binary, multiply repeatedly

by 2 any fractional part. The equivalent binary number is

formed from the 1 or 0 in the units position.

Example: Convert the decimal number 0.625 to binary.

Solution:

0.625 x 2 =1.250 1 (M S B)

0.250 x 2 = 0.500 0

0.25 x 2 = 1.00 1 (L S B)

Therefore, 0.625 = 0.101


Cont…
Note: Any further multiplication by 2 in example
above will equal to 0; therefore the multiplication
can be terminated. However, this, is not so. Often it
will be necessary to terminate the multiplication
when an acceptable degree of accuracy is obtained.
The binary number obtained will then be an
approximation.
Decimal-to-Octal Conversion:

To convert decimal numbers to their octal equivalent,


the following methods are used:

1. Repeated division-by-8 for whole-number

2. Repeated multiplication-by-8 for fractional


number
Repeated Division-by-8 Method:

is a method of converting decimal to octal and it is


only applied to whole numbers.
Example 8: Convert the following decimal numbers to
their octal equivalent:

(a) 245 (b) 175


Solution

3
Repeated Multiplication-by-8 Method:

To convert decimal fractions to their Octal equivalent


requires repeated Multiplication by 8, as shown in
the following example.

Example 9: Convert the decimal fraction 0.432 to


octal number equivalent .
Solution
Binary Arithmetic

Binary arithmetic includes the basic arithmetic operations of


addition, subtraction, multiplication and division.

The following sections present the rules that apply to these


operations when they are performed on binary numbers.

Binary Addition:

Binary addition is performed in the same way as addition in


the decimal-system and is, in fact, much easier to master.
Binary addition obeys the following four basic rules:
Cont…
Example 12: Add (a) 111 and 101 (b) 1010, 1001 and
1101

Solution

a) b)

111 1010
101 1001
1100 1101
1 00 0 0 0
Binary Subtraction:

Binary subtraction is just as simple as addition.

Subtraction of one bit from another obey the


following four basic rules

0–0=0

1 – 1 =0

1–0=1

10 – 1 = 1 with a transfer (borrow) of 1.


Cont…

When doing subtracting, it is sometimes necessary to


borrow from the next higher-order column.

The only it will be necessary to borrow is when we try


to subtract a 1 from a 0. In this case a 1 is borrowed
from the next higher-order column, which leaves a 0
in that column and creates a 10 i.e., 2 in the column
being subtracted.
Example 13: Perform the following subtractions
 Part (c) involves to borrows, Since a 1 is to be

subtracted from a 0 in the first column, a borrow is

required from the next higher-order column.

 However, it also contains a 0; therefore, the second

column must borrow the 1 in the third column. This

leaves a 0 in the third column and place a 10 in the

second column.

 Borrowing a 1 from 10 leaves a 1 in the second

column and places a 10 i.e, 2 in the first column:


Cont…

When subtracting a larger number from a smaller


number, the results will be negative. To perform this
subtraction, one must subtract the smaller number
from the larger and prefix the results with the sign of
the larger number
Binary multiplication:

 Binary multiplication is performed in the same manner as


decimal multiplication.
 It is much easier, since there are only two possible results of
multiplying two bits.
The Binary multiplication obeys the four basic rules.

0x0=0

0x1=0

1x0=0

1x1=1
Multiplication of fractional number is performed in the
same way as with fractional numbers in the decimal
numbers.

Example 16: Perform the binary multiplication 0.01 x

11.

Solution:
0.01
11x
01
01 +
0.11
Binary Division

Division in the binary number system employees the


same procedure as division in the decimal system, as
will be seen in the following examples.
Example 17: Perform the following binary
division.
(a) 110 ÷ 11 (b) 1100 ÷ 11
Solution
Cont…

You might also like