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

Lecture-8 Computer Fundamentals

Uploaded by

Abu Sayeed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Lecture-8 Computer Fundamentals

Uploaded by

Abu Sayeed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 72

Computer Fundamentals CSE

-271

Course Title: Introduction to Computer Programming

Presented By

Saadman Sakib

Lecturer,
Department of CSE,
CUET
McGraw-Hill TechnologyEducation Copyright ©2006byThe McGraw-Hill Companies, Inc. All rights reserved.
Parts of the Computer System

• Computer systems have four parts


– Hardware
– Software
– Data
– User
Parts of the Computer System

• Hardware
– Mechanical devices in the computer
– Anything that can be touched
• Software
– Tell the computer what to do
– Also called a program
– Thousands of programs exist
• Data
– Pieces of information
– Computer organize and present data
• Users
– People operating the computer
– Most important part
– Tell the computer what to do
Essential Computer Hardware

• Processing devices
– Brains of the computer
– Carries out instructions from the program
– Manipulate the data
– Most computers have several processors
– Central Processing Unit (CPU)
– Secondary processors
– Processors made of silicon and copper
Essential Computer Hardware

• Memory devices
– Stores data or programs
– Random Access Memory (RAM)
• Volatile
• Stores current data and programs
• More RAM results in a faster system
– Read Only Memory (ROM)
• Permanent storage of programs
• Holds the computer boot directions
ROM

A good example of ROM in the computer is the computer


BIOS, a PROM chip that stores the programming needed to
begin the initial computer start up process. Using a non-
volatile storage is the only way to begin the start up process
for computers and other devices that use a similar start up
process. ROM chips are also used in gaming system cartridges,
like the original Nintendo, Gameboy, Sega Genesis, and a
number of others. The game cartridge stores the game
programming on a ROM chip that is read by the game console
when the cartridge is inserted into the console.
When the computer is turned off or if there is loss of power, what ever is
stored in RAM disappears. “Temporary Memory” – Short Term.

RAM ROM
1.Stores the currently active programs 1.Stores certain fixed routines such as
and their data the boot-up routines.
2.RAM is volatile 2. ROM is non-volatile
3.The contents of RAM can be changed 3. The contents of ROM cannot be
or deleted changed or deleted
4. RAM stands for random access 4. ROM stands for read only memory
memory
5. Writing data to a RAM chip is a faster 5. Writing data to a ROM chip is a slow
process process

8
Essential Computer Hardware

• Input and output devices • Storage devices


– Allows the user to interact – Hold data and programs
– Input devices accept data permanently
• Keyboard, mouse – Different from RAM
– Output devices deliver – Magnetic storage
data • Floppy and hard drive
• Monitor, printer, • Uses a magnet to access
speaker data
– Some devices are input – Optical storage
and output • CD and DVD drives
• Touch screens • Uses a laser to access
data
Categories of Software Two types
• System software
• Application software
• System SW
– Programs written for computer systems
• Compilers, operating systems
• Application software
• Application SW
– Programs written for computer users – Accomplishes a
• Word-processors, spreadsheets, & specific task
other application packages – Most common type
of software
• System software • MS Word
– Most important software – Covers most
– Operating system common uses of
• Windows 10 computers
– Network operating system (OS)
• Windows Server 2003
– Utility
• SymantecAntiVirus
Software Brings The Machine to Life
❖ The ingredient that enables any computer to perform any task is software, which contains
instructions.
❖ Set of instructions that drive a computer to perform specific tasks is called a program. These
instructions tell the machine's physical components what to do; without the instructions the
computer cannot do anything.
❖ Though the array of available programs is vast and varied most software fall into two major
categories; system software and application software.
❖ System software is a program that controls the computer hardware or that can be used to
maintain the computer in some way. An operating system tells the machine how to use its own
components.
❖ An operating system is essential for any computer, because it acts as in interpreter among the
hardware, application program and the user.
❖ When a program wants the hardware to do something, it communicates through the operating
system. When user wants the hardware to do something, the request of the user is handled by
the operating system.
❖ That's why and how the software gives the life to the machines. Otherwise it turned to be a
dead machine.
https://www.onlineclassnotes.com/2018/04/software-brings-machine-to-life-justify-this-
statement.html
Functions of Operating Systems

❖ Provide a user interface


❖ Run programs
❖ Manage hardware devices
❖ Organized file storage

McGraw-Hill TechnologyEducation Copyright©


Operating Systems

OS: Is a program that manages the computer hardware ,provides


a basis for application programs and acts as an intermediary
between the computer user & computer hardware.

Functions of Operating Systems:


• Provide a user interface
• Run programs
• Manage hardware devices
• Organized file storage
Types of Operating Systems

• Real-time operating system • Single user/Multitasking OS


– Very fast small OS – User performs many tasks at
once
– Built into a device – Most common form of OS
– Respond quickly to user input – Windows XP and OS X
– MP3 players, Medical devices – Require expensive computers
– Tend to be complex\
• Single user/Single tasking OS • Multi user/Multitasking OS
– One user works on the system – Many users connect to one
– Performs one task at a time computer
– Each user has a unique
– MS-DOS and Palm OS session
– Take up little space on disk – UNIX, Linux, and VMS
– Run on inexpensive computers – Maintenance can be easy
– Requires a powerful computer
McGraw-Hill TechnologyEducation Copyright ©2006byThe McGraw-Hill Companies, Inc. All rights reserved.
Monitors
• Cathode Ray Tube (CRT) • Liquid Crystal Display (LCD)

– Most common type of monitor


– Electrons fired from the back – Commonly found on laptops
– Electrons excite phosphor to – Desktop versions exist
glow – Solve the problems of CRT
– Phosphor is arranged in dots – Fluorescent lights provide
called pixels
– Dot mask ensures proper pixel is illumination
lit
• LCD drawbacks
• CRT drawbacks

– Very large – More expensive than CRT


– Very heavy – Must sit directly in front of
– Use a lot of electricity screen
– Can be more fragile than CRT
Monitors
• Cathode Ray Tube (CRT) • Liquid Crystal Display (LCD
Monitors and Video Cards

• Monitors impacts user effectiveness


• Monitors should have
– Crisp text
– Clear graphics
– Adjustable controls
– Clear edges

• Resolution
– Number of pixels on the screen
– Higher number creates sharper images
– Higher number creates smaller images
Monitors and Video Cards

• 4 things to consider while buying a monitor


– Size
– Resolution
– Refresh Rate
– Dot Pitch
Monitors and Video Cards
Monitors and Video Cards
Monitors and Video Cards
Chapter 3A
Ergonomics and Monitors

• Eyestrain:
– Fatigue of the eyes
– Steps to avoid
• Choose a good monitor
• Place the monitor 2 – 3 feet away
• Center of screen below eye level
• Avoid reflected light
• Electronic magnetic fields (EMF)
– Generated by all electronic devices
– EMF may be detrimental to health
– Steps to avoid:
• Keep the computer at arms length
• Take frequent breaks
• Use an LCD monitor
Ergonomics and Input Devices

• Ergonomics:
– Study of human and tool interaction
– Concerned with physical interaction
– Attempts to improve safety and
comfort
• Repetitive Strain Injury (RSI):
– Caused by continuous misuse of the
body
– Many professions suffer from RSI
• Carpal Tunnel Syndrome:
– Carpal tunnel is a passage in the wrist
– Holds nerves and tendons
– Prolonged keyboarding swells tendons
Ergonomics and Input Devices

• Techniques to avoid RSI:


– Sit up straight
– Have a padded wrist support
– Keep your arms straight
– Keyboard properly
– Take frequent breaks
McGraw-Hill TechnologyEducation Copyright ©2006byThe McGraw-Hill Companies, Inc. All rights reserved.
How Computers Represent Data

• The CPU • Text codes


– Central Processing Unit – Converts letters into binary
– Brain of the computer – Standard codes necessary for
– Control unit data transfer
• Controls resources in – ASCII
computer • American English
• Instruction set • symbols
– Arithmetic logic unit – Extended ASCII
• Simple math operations • Graphics and other
symbols
• Registers
– Unicode
• All languages on the
planet
How Computers Process Data

• Nonvolatile memory • Volatile memory


– Holds data when power is off Requires power to hold data
– Read Only Memory (ROM) Random Access Memory (RAM)
– Basic Input Output System Data in RAM has an address
(BIOS) CPU reads data using the address
– Power On Self Test (POST) CPU can read any address
5A-164
Components affecting Speed
Affecting Processing Speed

• Registers
– Number of bits processor can handle
– Word size
– Larger indicates more powerful computer
– Increase by purchasing new CPU
• Virtual RAM
– Computer is out of actual RAM
– File that emulates RAM
– Computer swaps data to virtual RAM
• Least recently used data is moved
• The computer‟s internal clock
– Quartz crystal
– Every tick causes a cycle
– Speeds measured in Hertz (Hz)
• Modern machines use Giga Hertz (GHz)
5A-166
Affecting Processing Speed

• The bus Peripheral control interface


– Electronic pathway between (PCI)
• components Connects modems and sound
– Expansion bus connects to cards
peripherals Found in most modern
– System bus connects CPU and computers
RAM
– Bus width is measured in bits Accelerated Graphics Port
(AGP)
– Speed is tied to the clock
Connects video card to
• Universal Serial Bus (USB) motherboard
– Connects external devices Extremely fast bus
– Hot swappable Found in all modern
– Allows up to 127 devices computers
– Cameras, printers, and scanners
Affecting Processing Speed

• PC Card • Cache memory


– Used on laptops – Very fast memory
– Hot swappable – Holds common or recently
– Devices are the size of a used data
credit card – Speeds up computer
processing
– Most computers have
several caches
– L1 holds recently used
data
– L2 holds upcoming data
– L3 holds possible
upcoming data
Optical Storage Devices

• CD-ROM:
– Most software ships on a
CD
– Read using a laser
• Lands, binary 1,
reflect data
• Pits scatter data
– Written from the inside
out
– CD speed is based on the
original
• Original CD read 150
Kbps
• A 10 X will read
1,500 Kbps
– Standard CD holds 650
MB
Printers

Impact Printers Non-Impact Printers

Daisy Dot- Inkjet Thermal Laser


wheel Matrix

35
Daisy Wheel Daisy Wheel

Injket Thermal Laser


Impact vs. Non-Impact Printer:
Impact printers physically transfer a dot or shape to the paper
Of those in the preceding slide, only dot-matrix uses impact printing
Non-impact printers spray or lay down the image with impact
Impact printers remain important because they can print multi-part forms
Factors affecting print quality:
(1) DPI:
It is a measurement of printer’s resolution indicating how many ink dots
can be placed by the printer in one square inch. The higher the DPI, the
sharper is image.
(2) Type of printer:
Each type of printer has its own capabilities of printing. Some types of
printers produce high quality print while other produce low quality print.
(3) Print Mode:
The printing mode may also affect the quality. For example the draft
mode increases the print rate but quality is reduced.
(4) Toner:
The quality and amount of toner also affects print quality.
Introduction to Computer Programming
Computer Languages

– Machine Language
• Uses binary code
• Machine-dependent
• Not portable
• Assembly Language
– Uses mnemonics
– Machine-dependent
– Not usually portable
• High-Level Language (HLL)
– Uses English-like language
– Machine independent
– Portable (but must be compiled for different platforms)
– Examples: Pascal, C, C++, Java, Fortran
Machine Language
• The representation of a computer program which is actually
read and understood by the computer.
– A program in machine code consists of a sequence of machine
instructions.
• Instructions:
– Machine instructions are in binary code
– Instructions specify operations and memory cells involved in the
operation
Example: Operation Address

0010 0000 0000 0100

0100 0000 0000 0101


0011 0000 0000 0110
Assembly Language

• A symbolic representation of the machine language of a


specific processor.
• Is converted to machine code by an assembler.
• Usually, each line of assembly code produces one machine
instruction (One-to-one correspondence).
• Programming in assembly language is slow and error-prone
but is more efficient in terms of hardware performance.
• Mnemonic representation of the instructions and data
• Example:
ADD AX,BX
SUB AX,CX
High-level language

• A programming language which use statements consisting of


English-like keywords such as "FOR", "PRINT" or “IF“, ...
etc.
• Each statement corresponds to several machine language
instructions (one-to-many correspondence).
• Much easier to program than in assembly language.
• Data are referenced using descriptive names
• Operations can be described using familiar symbols
• Example:
Cost = Price + Tax
Compilers & Programs
• Source program
– The form in which a computer program, written in some
formal programming language, is written by the programmer.
– Can be compiled automatically into object code or machine
code or executed by an interpreter.
– Pascal source programs have extension „.pas‟
• Object program
– Output from the compiler
– Equivalent machine language translation of the source
program
– Files usually have extension „.obj‟

• Executable program
– Output from linker/loader
– Machine language program linked with necessary libraries &
other files
– Files usually have extension „.exe‟
•Compilers: Translate a source (human-
Compiler vs. Interpreter writable) program to an executable (machine-
readable) program

•Interpreters: Convert a source program and


Ideal concept: execute it at the same time.

Source code Executable


Compiler

Input data Executable Output data

Source code

Interpreter Output data


Input data
Compiler vs. Interpreter

Compiler Interpreter
• Pros • Pros
–Less space –Easy debugging
–Fast execution –Fast Development

• Cons • Cons
–Slow processing –Not for largeprojects
–Partly Solved –Exceptions: Perl,Python
–(Separate compilation) –Requires morespace
–Debugging –Slower execution
–Improved thruIDEs –Interpreter in memory allthe time
The Uses of a Network /Main benefits of using a computer
network
❖ Simultaneous Access
o In organizations, many people may need to use the same data or programs. A
network solves this problem.
o Managers may assign access rights to users. Some users may only be able to read
data, others may be able to make changes to existing files.
❖ Shared Peripheral Devices
❖ Because peripheral (external) devices like printers can be expensive, it is cost-
effective to connect a device to a network so users can share it.
❖ Through a process called spooling, users can send multiple documents (called print
jobs) to a networked printer at the same time. The documents are temporarily
stored on the server and printed in turn.
❖ Personal Communication
o One of the most common uses of networks is for electronic mail (e-mail).
o An e-mail system enables users to exchange written messages (often with data files
attached) across the local network or over the Internet.
❖ Easier Backup
o Networks enable managers to easily back up important data.
Bus Topology

190
Bus Topology
Advantages:

1. Easy to implement and extend


2. Cable length required for this topology is the least compared
to other networks
3. Cost effective; only a single cable is used.
4. Failure of one station does not affect others

Disadvantages:

1. The cable length is limited


2. A cable break can disable the entire network
3. It is not suitable for networks with heavy traffic
Star Topology

192
Star Topology

Advantages:

1. Easy to connect new nodes or devices


2. Benefits from centralization
3. Failure of one node or link doesn‟t affect the rest of the network

Disadvantages:

1. If the central device fails whole network goes down


2. The setup cost is quite high
3. More cables are required to connect devices
A ring network is a network topology in which each node
connects to exactly two other nodes, forming a single
continuous pathway for signals through each node - a ring

Ring Topology

194
Ring Topology

Advantages:
1. This type of network topology is organized
2. All the traffic flows in only one direction at very high speed
3. Each computer has equal access to resources
4. The adding or removing of network nodes is easy

Disadvantages:
1.Each packet of data must pass through all the computers
between source and destination. This makes it slower than star
topology.
2.If one workstation or port goes down the entire network gets
affected.
3.Network is highly dependent on the wire which connects
different components.
Comparison Among the Merits and Demerits of

• BUS Topology
• STAR Topology
• RING Topology

BUS STAR RING

Each node is connected to Each node connects with a Each nodes connects
a common linear link hub or switch exactly two other notes
Usually used in office Used as LAN Used where data needs to
woks be checked every time
Easy to remove one of the Also easy to remove one Node removal is not easy
nodes of the nodes
If the bus breaks the If the hub or switch is If one of the computer
whole network breaks down the network won't goes down the whole
work network breaks
Mesh Topology
• In this topology, every
node has a dedicated
point-to-point
connection to every
other node on the
network. A fully
connected mesh network
has n(n-1)/2 channels to
link „n‟devices.
• Therefore, every device
on the network must
have „n-1′ input/output
(I/O) ports.
Mesh Topology
❖ Advantages ❖ Disadvantages
• It has multiple links, so if one • It becomes very
route is blocked then other routes expensive because a
can be used for data large number of
communication. cabling and „n-1′
• Each connection can have its own input/output (I/O)
data load, so the traffic problem is ports for n devices
eliminated. are required .
• It ensures the data privacy or • It is difficult to
security, because every message install.
travels along a dedicated link.
• Its performance is not affected
with heavy load of data
transmission.
Switch

A network switch is a small hardware device that joins multiple


computers together within one LAN
A switch is a combination of a hub and a bridge.
Advantages of switches Disadvantages of switches

– Increase available – More expensive than


network bandwidth hubs and bridges
– Reduced workload, – Difficult to trace
computers only receive network connectivity
packets intended for them problems through a
specifically switch
– Increase network – Does not filter
performance broadcast traffic
– Smaller collision domains
Switch vs. Hub
When Should I Use a Hub or Switch?

• In a small network (less than 30 users), a hub (or


collection of hubs) can easily cope with the network
traffic generated and is the ideal piece of equipment
to use for connecting the users.
• When the network gets larger (about 50 users), you
may need to use a switch to divide the groups of
hubs, to cut down the amount of unnecessary traffic
being generated.
Router
• A network router is a network device
with interfaces in multiple networks
whose task is to copy packets from
one network to another.
• Provide filtering and network traffic
control
• Used on LANs and WANs
• Connect multiple segments and
networks
• Multiple routers create an
“internetwork”
• Operate at the Network layer
• Create a table to determine how to
forward packets
• Filtering and traffic control based on
logical addresses
Advantages of routers Disadvantages of routers

– Can connect networks – Only work with


of different architecture routable protocols
– Choose best path – More expensive than
through or to a network hubs, bridges, and
– Create smaller collision switches
domains – Routing table updates
– Create smaller consume bandwidth
broadcast domains – Increase latency due to
a greater degree of
packet filtering and/or
analyzing
What is computer Network? Describe different types of
computer Network based on geographical area.

Computer Network:
A computer network, or simply a network, is a collection
of computers and other hardware components interconnected by
communication channels that allow sharing of resources and
information

.Different types of computer Network based on geographical


area:
I. LAN
II. MAN
III. WAN
Differences among LAN, MAN and WAN

LAN MAN WAN


Local Area Network MetropolitanArea Wide Area Network
Network
Covers local areas only Cover a larger covers large geographic areas
geographic area than
LAN

Less maintenance cost More maintenance cost


Competitive price

Faster than WAN Less speed than LAN


Higher speed
Hardware focus on Hardware focus on data Hardware focus on
sharing resources transmission communication
Computer Network
Classification: Geographical area

• Local Area Network (LAN)


➢ A local area network (LAN) is a group of computers within a
small area, such as a house, office or school, that are connected
to each other.
➢ Most academic institutions and corporate networks use LANs.
➢ The characteristics of a LAN are
➢ its arrangement of nodes,
➢ the physical media used to connect the nodes, e.g. fiber optic
cable, and
➢ the communication protocol used to send or receive data
Local Area Network (LAN)
Local Area Network (LAN)

• Advantages of Connecting computer in a LAN


➢ Workstation can share peripheral devices like printers. This is cheaper than
buying a printer for every workstation.
➢ User can save their work centrally on the network file server.
➢ User can communicate with each other and transfer data between
workstations very easily.
➢ Very high network speeds and data transfer rates.
➢ Protection from the outside world, thus creating a trusted computing
environment
• Disadvantages of Connecting computer in a LAN
➢ Special security measures are needed to stop user from using program and
data that they should not have access to.
➢ Network are difficult to set up and need to be maintained by skilled
technicians.
➢ Viruses spread easily.
➢ If the network server falls then all the user are affected
Metropolitan Area Networks
• A metropolitan area network (MAN) is a large computer network that
usually spans a city or a large campus.
• A MAN usually interconnects a number of local area networks (LANs)
using a high-capacity backbone technology, such as fiber-optical links,
and provides up-link services to wide area networks (or WAN) and
the Internet.
• Features which discriminates MANs from LANs or WANs
1. Its geographic scope falls between a WAN and LAN.
2. A MAN is not generally owned by a single organization
3. It often acts as high speed network to allow sharing of regional
resources.
• Advantage:
We can use MAN Within a cities and it seems much faster
• Disadvantage:
While we move our network to another city it doesn't work
Metropolitan Area Networks

A metropolitan area network based on cable TV.


Wide Area Network(WAN)

• A wide area network (WAN) is


a telecommunication network,
usually used for connecting
computers, that spans a large
geographical area.
• A WAN spans a large
geographic area, such as a
state, province or country.
• WANs often connect multiple
smaller networks, such as local
area networks (LANs) or
metro area networks (MANs).
Wide Area Network(WAN)

• Advantages Of WAN
➢ Share information/files over a larger area
➢ Large network cover
➢ Messages can be sent very quickly to anyone else on the network
• Disadvantages Of WAN
➢ Are expensive and generally slow
➢ Need a good firewall to restrict outsiders from entering and disruptingthe
network
➢ Setting up a network can be an expensive and complicated experience. The
bigger the network the more expensive it is.
➢ Security is a real issue when many different people have the ability to use
information from other computers.
LAN vs. WAN
Characteristics LAN WAN
Geographical Area Restricted to a limited Spans a large geographic area,
geographical coverage such as such as a state, province or
a house, office or school country
Data transmission Much lower since the data Very high because the
cost transmission medium is usually transmission mediums used is
owned by the user organization leased lines or public systems
such as telephone lines,
microwaves or satellites
Physical The computers, terminals and There may not be a direct
Connection peripherals devices are usually physical connection between
physically connected with various computers.
cables.
Speed of Much higher than WAN A WAN is usually slower than
the network LAN because it has lower
bandwidth.
Data transmission Fewer data transmission error Higher than LAN
error

You might also like