Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Ass. Lec. Tamara A. Anai 1
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Basic Concepts of Computer:
Computer is an electronic device which is used to store the data, as per
given instructions it gives results quickly and accurately.
• Data : Data is a raw material of information.
• Information : Proper collection of the data is called information.
Ass. Lec. Tamara A. Anai 2
Ass. Lec. Tamara A. Anai 3
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
• Data type :
is a classification of the type of data that a variable or object can hold in
computer programming. Data types are an important factor in virtually all
computer programming languages, including C#, C++, JavaScript, and
Visual Basic.
Examples of data types
• Boolean (e.g., True or False)
• Character (e.g., a)
• Date (e.g., 03/01/2016)
• Floating-point number (e.g., 1.234)
• Integer (e.g., 1234)
• String (e.g., abcd)
• Others
Ass. Lec. Tamara A. Anai 4
Information Processing Cycle
Ass. Lec. Tamara A. Anai 5
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Ass. Lec. Tamara A. Anai 6
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Ass. Lec. Tamara A. Anai 7
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Ass. Lec. Tamara A. Anai 8
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Ass. Lec. Tamara A. Anai 9
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
The Five Generations of Computers
Ass. Lec. Tamara A. Anai 10
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Generations of Computer
• The computer has evolved from a large-sized simple calculating machine to a
smaller but much more powerful machine.
• The evolution of computer to the current state is defined in terms of the
generations of computer.
• Each generation of computer is designed based on a new technological
development, resulting in better, cheaper and smaller computers that are
more powerful, faster and efficient.
• Currently, there are five generations of computer. In the following
subsections.
Ass. Lec. Tamara A. Anai 11
First Generation Computers
(1940-1956)
The first computers used vacuum tubes(a sealed glass tube containing a
near-vacuum which allows the free passage of electric current.) for
circuitry and magnetic drums for memory.
They were very expensive to operate and in addition to using a great deal of
electricity, generated a lot of heat.
Example : Electronic Numerical Integrator and
Computer (ENIAC) .
Ass. Lec. Tamara A. Anai 12
First Generation Computers
Advantages :
• It was only electronic device
Disadvantages :
• large in size
• Vacuum tubes burn frequently
• Maintenance problems
Ass. Lec. Tamara A. Anai 13
Second Generation Computers
(1956-1963)
• Transistors replaced vacuum tubes and ushered in the second
generation of computers.
• Second-generation computers moved from binary machine language
to symbolic.
• High-level programming languages were also being developed at this
time, such as early versions of COBOL and FORTRAN.
• Example : IBM 1401
Ass. Lec. Tamara A. Anai 14
Second Generation Computers
Advantages :
• Size reduced The very fast
Disadvantages :
• They over heated quickly
• Maintenance problems
Ass. Lec. Tamara A. Anai 15
Third Generation Computers
(1964-1971)
• The development of the Integrated Circuit (IC).
• Allowed the device to run many different applications at one time.
• Example: IBM System/360
Advantages :
ICs are very small in size
Improved performance
Production cost cheap
Ass. Lec. Tamara A. Anai 16
Fourth Generation Computers
(1971-present)
• The microprocessor brought the fourth generation of computers, as
thousands of integrated circuits were built onto a single silicon chip.
• From the central processing unit and memory to input/output
controls—on a single chip.
• . Fourth generation computers also saw the development of GUIs,
the mouse and other devices.
• Example: Macintosh 128k
Ass. Lec. Tamara A. Anai 17
Fifth Generation Computers
(present and beyond)
• Fifth generation computing devices, based on artificial intelligence.
• Are still in development, though there are some applications, such
as voice recognition.
• The use of parallel processing and superconductors is helping to
make artificial intelligence a reality.
• Example: Super computer
Ass. Lec. Tamara A. Anai 18
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Features of a Computer
High speed, accuracy large storage capacity, high reliability and
versatility are some of the important features of computers.
• SPEED : In general, no human being can compete to solving the
complex computation, faster than computer.
• ACCURACY : Since Computer is programmed, so what ever input we
give it gives result with accurately.
• STORAGE : Computer can store mass storage of data with appropriate
format.
• POWER OF REMEMBERING : It can remember data for us.
• Computer can work for hours without any break and creating error.
• We can use computer to perform completely different type of work at
the same time.
Ass. Lec. Tamara A. Anai 19
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Uses of Computer in Our Daily Life
Use of computer on regular basis in our life is very important. Technically in
daily life computer is used to convert raw facts and data into meaningful
information and knowledge. Computer science is explored and challenged by
humans daily.
Ass. Lec. Tamara A. Anai 20
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
1. Uses of the computer in Education 3. Uses of the computer in hospitals
field
2. Use of computer in the business 4. Uses of the computer in the
banking sector
Ass. Lec. Tamara A. Anai 21
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
5. Uses of the computer in government offices
6. Uses of the computer in the home
7. Uses of the computer in marketing
Ass. Lec. Tamara A. Anai 22
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
8. Computer used by various people around the world
for different reasons and purposes
•Kids
•High school students
•College students
•Job seekers
•Business owners
•Computer Professional & IT people
9. Uses of computer in new habits—Impact of computer in our life
10. Uses of computer to change life
Ass. Lec. Tamara A. Anai 23
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Types of Computers
1. Analog Computers
Analog computers are used to process continuous data. Analog computers
represent variables by physical quantities. Thus any computer which solve
problem by translating physical conditions such as temperature, pressure,
or voltage into related mechanical or electrical related circuits as an analog
for the physical phenomenon being investigated in general it is a computer
which uses an analog quantity and produces analog values as output.
Analog computers are very much speedy. They produce their results very
fast. But their results are approximately correct. All the analog computers
are special purpose computers.
Ass. Lec. Tamara A. Anai 24
2. Digital Computers
Digital computer represents physical quantities with the help of digits or
numbers. These numbers are used to perform Arithmetic calculations and
also make logical decision to reach a conclusion, depending on, the data
they receive from the user.
Ass. Lec. Tamara A. Anai 25
3. Hybrid Computers
Various specifically designed computers are with both digital and analog
characteristics combining the advantages of analog and digital computers
when working as a system. Hybrid computers are being used extensively in
process control system where it is necessary to have a close representation
with the physical world.
Ass. Lec. Tamara A. Anai 26
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Computer Classification
• Computers can be classified by size and power to:
1. Personal computer (PCs)
2. Workstation:
3. Minicomputer:
4. Mainframe:
5. Supercomputer
Ass. Lec. Tamara A. Anai 27
Computer Classification
•
Personal computer (PCs): a small, single-user computer based on a
microprocessor. In addition to the microprocessor, a personal
computer has a keyboard for entering data, a monitor for displaying
information, and a storage device for saving data.
• Workstation: a powerful, single-user computer. A workstation is like
a personal computer, but it has a more powerful microprocessor and
a higher-quality monitor.
Ass. Lec. Tamara A. Anai 28
Computer Classification
• Minicomputer: multi-user computer capable of
supporting from 10 to hundreds of users simultaneously.
• Mainframe: powerful multi-user computer capable of
supporting many hundreds or thousands of users
simultaneously.
• Supercomputer: an extremely fast computer that can
perform hundreds of millions of instructions per second.
Ass. Lec. Tamara A. Anai 29
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Computer Classification
• Compare between the previous type of
computers based on
• Price
• Processing Speed
• Storage Capacity
• Powerful
• Single-user or Multi-user
• Computer Size
Ass. Lec. Tamara A. Anai 30
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
There are 3 main types of PCs
Laptop computer
• Is a portable computer.
• Personal computer that can be easily carried and used in a variety of
locations.
Ass. Lec. Tamara A. Anai 31
Netbook Computer
• A netbook is a type of laptop that is designed to
be even more portable.
• Cheaper and less powerful than laptops or desktops.
• They are generally less powerful than other types of
computers, but they provide enough power for email
and internet access, which is where the name
"netbook" comes from.
Ass. Lec. Tamara A. Anai 32
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Mobile Devices
• A mobile device is basically any handheld computer.
• It is designed to be extremely portable.
• Some mobile devices are more powerful
• Types:
1.Tablet Computers
2.Smartphones
Ass. Lec. Tamara A. Anai 33
Tablet Computers
• Designed to be portable.
• The most obvious difference is that tablet
computers don't have keyboards or touchpads.
• Best used for tasks like web browsing, watching
videos, reading e-books, and playing games.
Ass. Lec. Tamara A. Anai 34
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Smartphones
• A powerful mobile phone
• Designed to run a variety of applications in addition to phone service.
• Compare it with the tablet?
• Internet access is an important feature of smartphones. (3G or 4G)
(Wi-Fi Service)
Ass. Lec. Tamara A. Anai 35
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Computer Components
Hardware
• Computer hardware is the collection of physical elements "Tangible
objects”
• That constitutes a computer system.
• The actual machinery, wires, transistors, and circuits … etc.
Ass. Lec. Tamara A. Anai 36
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Software
• Computer Programs
• Instructions and data
Ass. Lec. Tamara A. Anai 37
Computer Units
1.Input Unit 2.Output Unit 3.Central processing Unit
4.Primary Memory Unit 5.Secondary storage Unit
Ass. Lec. Tamara A. Anai 38
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Input Devices
• Input device is any peripheral (piece of computer
hardware equipment to provide data and control
signals to an information processing system such
as a computer or other information appliance.
• Input device Translate data from form that humans
understand to one that the computer can work
with. Most common are keyboard and mouse
Ass. Lec. Tamara A. Anai 39
Input Devices
Ass. Lec. Tamara A. Anai 40
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Output Unit
• An output device is any piece of computer
hardware equipment used to communicate the
results of data processing carried out by an
information processing system (such as a
computer)
• converts the electronically generated
information into human-readable form.
Ass. Lec. Tamara A. Anai 41
Ass. Lec. Tamara A. Anai 42
Output devices Examples
1. A monitor
LCD: Liquid crystal display CRT: Cathode Ray Tube
most familiar these days
Ass. Lec. Tamara A. Anai 43
Output devices Examples
2. Printer:
• Transfers data from a computer onto paper
Printer types:
1-Laser Printer.
2-Ink Jet Printer.
3-Dot Matrix Printer
Ass. Lec. Tamara A. Anai 44
Central Processing Unit
• CPU
• known as microprocessor or processor
• It is responsible for all functions and processes
Ass. Lec. Tamara A. Anai 45
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
CPU Components
• The CPU is comprised of three main parts
1. ALU (Arithmetic Logic Unit)
2. Control Unit (CU)
3. Registers: Stores the data that is to be executed next.
Ass. Lec. Tamara A. Anai 46
Arithmetic Logic Unit (ALU)
• Executes all arithmetic and logical operations.
• Arithmetic calculations like as addition, subtraction,
multiplication and division.
• Logical operation like compare numbers, letters, or
special characters
Ass. Lec. Tamara A. Anai 47
Control Unit (CU)
Control Unit (CU): controls and co-ordinates computer components.
• Read the code for the next instruction to be executed.
• Increment the program counter so it points to the next instruction.
• Read whatever data the instruction requires from cells in memory.
• Provide the necessary data to an ALU or register.
• If the instruction requires an ALU or specialized hardware to complete,
instruct the hardware to perform the requested operation.
Registers
• Registers :Stores the data that is to be executed next, "very
fast storage area".
Ass. Lec. Tamara A. Anai 48
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Unit of Measurement -Speed
• The speed of CPU measured by unit called Hertz (Hz)
• 1 Hz represent 1 cycle per second.
• The speed of CPU is known as Computer Speed.
CPU SPEED MEASURES
1 hertz or Hz 1 cycle per second
1 MHz 1 million cycles per second or 1000 Hz
1 GHz 1 billion cycles per second or 1000 MHz
Ass. Lec. Tamara A. Anai 49
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Computer Hardware
Central Processing Unit (CPU)
or
Microprocessor
Ass. Lec. Tamara A. Anai 50
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
The CPU is usually protected
from Heat by a
Fan combination
Ass. Lec. Tamara A. Anai 51
Motherboard
Ass. Lec. Tamara A. Anai 52
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Primary Memory
• 1. RAM.
• 2.ROM
Ass. Lec. Tamara A. Anai 53
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Primary Memory
1. RAM: Random Access Memory: is a memory scheme within
the computer system responsible for storing data on a
temporary basis, so that it can be promptly accessed by the
processor as and when needed.
• It is volatile in nature, which means that data will be erased
once supply to the storage device is turned off.
• RAM stores data randomly and the processor accesses these
data randomly from the RAM storage.
Ass. Lec. Tamara A. Anai 54
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Primary Memory
2. ROM (Read Only Memory): ROM is a permanent form of
storage. ROM stays active regardless of whether power supply
to it is turned on or off. ROM devices do not allow data stored
on them to be modified.
Ass. Lec. Tamara A. Anai 55
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Secondary Memory
• Stores data and programs permanently
• its retained after the power is turned off
• Main Examples
1. Hard Disk
2. Optical Disk
3. Flash memory
Ass. Lec. Tamara A. Anai 56
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Hard Disk
• Called Disk drive or HDD
• stores and provides relatively quick access to large
amounts of data.
• Stores data on an electromagnetically charged surface or
set of surfaces.
Ass. Lec. Tamara A. Anai 57
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Optical Disk & Flash
• an optical disc drive (ODD) is a disk drive that ses laser light
to store data.
• There are three main types of optical media: CD, DVD, and
Blu-ray disc
CD “Compact Disk” can store up to 700MB
DVD “ Digital Video Disk “ can store up to 8.4 GB
Blu-ray disc. can store up to 50 GB
Ass. Lec. Tamara A. Anai 58
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
3. Flash Disk
• A storage module made of flash memory chips. A Flash disks have no
mechanical platters or access arms, but the term "disk" is used because
the data are accessed as if they were on a hard drive. The disk storage
structure is emulated.
• What are the differences between RAM as a main memory and HDD as
a Secondary Memory?????
Ass. Lec. Tamara A. Anai 59
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Software
• Software is a generic term for organized collections of
computer data and instructions, often broken into two
major categories two major categories:
1. system software
2. application software
Ass. Lec. Tamara A. Anai 60
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
System software
• Known as Operating System (OS)
• is responsible for controlling, integrating, and
managing the individual hardware components of a
computer system
• Windows is an example of OS.
• example of System Software:
• 1) Microsoft Windows
• 2) Linux
• 3) Unix
• 4) Mac OSX
• 5) DOS
Ass. Lec. Tamara A. Anai 61
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Application software
• is used to accomplish specific tasks other than just running
the computer system.
• It may consist of:
• a single program, such as an image viewer;
• a small collection of programs (often called a software
package) that work closely together to accomplish a task,
such as a spreadsheet or text processing system;
• a larger collection (often called a software suite) of related
but independent programs and packages that have a
common user interface or shared data format, such as
Microsoft Office,
Ass. Lec. Tamara A. Anai 62
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Computer Programming
Languages
Ass. Lec. Tamara A. Anai 63
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Computer Programming Languages:
• A programming language is an artificial language that can be
used to control the behavior of a machine, particularly a
computer
• Programming languages, like human languages, are defined
through the use of syntactic and semantic rules, to determine
structure and meaning respectively.
Ass. Lec. Tamara A. Anai 64
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Machine language:
• It
is the lowest-level
programming language.
• Machine languages
are the only languages
understood by computers.
Ass. Lec. Tamara A. Anai 65
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Machine language:
• While easily understood by computers, machine languages
are almost impossible for humans to use because they
consist entirely of numbers.
For example, an x86/IA-32 processor can execute the
following binary instruction as expressed in machine
language:
Binary: 10110000 01100001 (Hexadecimal: 0xb061)
Ass. Lec. Tamara A. Anai 66
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Assembly Level Language:
• An assembly language is a low-level language for
programming computers.
• The word "low" does not imply that the language is inferior
to high-level programming languages but rather refers to the
small or nonexistent amount of abstraction between the
language and machine language, because of this, low-level
languages are sometimes described as being "close to the
hardware."
Ass. Lec. Tamara A. Anai 67
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Assembly Level Language (contd…):
• A utility program called an assembler, is used to translate
assembly language statements into the target computer's
machine code.
• Example: Assembly language representation is easier to
remember (more mnemonic)
mov al, 061h
This instruction means:
Move the hexadecimal value 61 (97 decimal) into the processor register
named "al".
Ass. Lec. Tamara A. Anai 68
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Example (Adds 2 numbers):
name "add"
mov al, 5 ; bin=00000101b
mov bl, 10 ; hex=0ah or bin=00001010b
add bl, al ; 5 + 10 = 15 (decimal) or hex=0fh or
bin=00001111b
Ass. Lec. Tamara A. Anai 69
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
High-level language:
• High-level languages are relatively easy to learn because the
instructions bear a close resemblance to everyday language,
and because the programmer does not require a detailed
knowledge of the internal workings of the computer.
• Each instruction in a high-level language is equivalent to several
machine-code instructions, therefore it is more compact than
equivalent low-level programs.
• High-level languages are used to solve problems and are often
described as problem-oriented languages
Ass. Lec. Tamara A. Anai 70
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
High-level language (Contd…):
Examples of HLL:
• BASIC was designed to be easily learnt by first-time programmers;
• COBOL is used to write programs solving business problems;
• FORTRAN is used for programs solving scientific and mathematical
problems.
• With the increasing popularity of windows-based systems, the next
generation of programming languages was designed to facilitate the
development of GUI interfaces;
for example, Visual Basic wraps the BASIC language in a graphical
programming environment.
• Support for object-oriented programming has also become more
common, for example in C++ and Java.
Ass. Lec. Tamara A. Anai 71
Dentistry College - University of Tikrit
Computer Science
The First Stage - First Semester - 2018-2019
Ass. Lec. Tamara A. Anai
Example (C program to add 2 numbers):
#include<stdio.h> //header files
Void main()
{
int a, b, c; // declaration of 3 variables
printf(“Enter two numbers:\n”);
Scanf(“%d”, &a); // read 1st number
Scanf(“%d”, &b); // read 2nd number
c=a+b; // compute the sum
printf(“Sum of 2 numbers is %d”, c); //print sum
}
Ass. Lec. Tamara A. Anai 72