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

Comprog Lecture 1

Uploaded by

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

Comprog Lecture 1

Uploaded by

ronthefourth
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 84

OVERVIEW OF A COMPUTER SYSTEM

Computer System
• A set of instructions for a computer to follow is called a
program. The collection of programs used by a computer is
referred to as the software for that computer. The actual
physical machines that make up a computer installation are
referred to as hardware. As we will see, the hardware for a
computer is conceptually very simple.
However, computers now come with a large array of
software to aid in the task of programming. This software
includes editors, translators, and managers of various sorts.
The resulting environment is a complicated and powerful
system
COMPONENTS OF COMPUTER SYSTEM

Computer hardware - Are physical parts/tangible parts of a computer. eg


Input devices, output devices, central processing unit and storage devices

Computer software - also known as programs or applications. They are


classified into classes namely - system software ,utility application and
application software
Liveware - is the computer user. Also known as orgware or the humanware.
The user commands the computer system to execute on instructions.
Computer Peripheral

• A peripheral is a device that can be attached to the computer


processor. Peripheral devices can be external, such as
a mouse, keyboard, printer, monitor or scanner. Peripheral devices can
also be internal, such as a CD-ROM drive,
DVD-R drive or modem.
Devices are usually classified as input, output or backing storage devices.
• Input Devices
Input can take a variety of forms, from commands you enter from
the keyboard to data from another computer or device. A device
that feeds data into a computer processor is called an input device.
Examples of common input devices are:
keyboards, mouse, joystick, microphone and scanner
• Output Devices
Output can also appear in a variety of forms - text, video,
graphics, and so on. A device that shows data from a
computer processor is an output device.
Examples of common output devices are:
monitors, laser printers, ink jet printers, speakers and
headphones
• Backing Storage Devices
Backing storage is a device which holds and retains data.
These devices allow the user to save data in a more
permanent way than RAM so that data is not lost and may be
used at a later time.
Examples of common backing storage devices are:
hard disk drive, floppy disk drive, CD-RW drive, flash memory
and DVD-RAM drives
• Different Types Of Devices
There are various types of input, output and
backing storage devices that are being produced
by many different manufacturers. Each type of
device has its own characteristics. Some devices
are:
faster at transmitting data;
can store more data;
are more accurate;
are smaller in physical size and hence portable;
are cheaper, don’t need cables to connect to the
computer etc.
• Input Devices – Keyboards
Keyboard is one of the most common input device
that is used to enter letters, numbers, and other
symbols to give the computer with information and
instruction.
• Can be connected to the computer through wired
(USB & PS2) or wireless (Bluetooth) connection.
• Input Devices – Pointers
Pointing devices have become increasingly important with the introduction of
GUI(Graphical User Interface) and WIMP(windows, icons, menus, pointer)
operating systems.
Originally used with graphics packages they are now used with almost every type
of package.
Pointing devices take the forms of trackerball, joystick and mouse.
• Trackerballs are used on laptops or by people who may have difficulty moving
their fingers. A large ball is rotated at the top of the device and the user’s palm
turns the ball and hence the pointer on screen. (Trackerballs have mostly been
replaced by trackpads on laptops.)
• Joystick is an input device that is often used to control video games, and
usually have one or more push-buttons whose state can also be read by the
computer.
• The mouse is still the most common pointer. It is still the main input device
used with computers at home and in the workplace. The mouse allows the
user to point and click on items on the screen.
• Webcam
Webcam is an input device most often used
to enable people to see each other when
communicating over the internet, or for recording
video blogs, or other videos.
• Microphone
Microphones are audio input devices. The
microphone feeds a sound signal to the computer,
where it can be recorded, or streamed across the
internet.
Microphones are often built into laptops,
webcams and mobile phones nowadays.
• Input Devices – Sound
The simplest form of input device for sound is the
microphone. This involves the use of software
which samples the incoming signal. An analogue to
digital converter is required to convert the
electrical signals from the microphone into ones
which can be stored by the computer. This is
usually done by a sound card which allows
the microphone to be attached to the computer
and sound to be captured.
• Scanner
- An input device that optically scans images,
printed text, handwriting or an object and converts
it to a digital image.
• Monitor
-An output device that enables users to interact with a
computer more easily. The monitor essentially displays a
signal sent by the computer in a visual format.
-Monitors look similar to televisions in outward
appearance, but typically have a higher display
resolution than televisions, enabling greater visual
detail, plus they lack a tuner to change channels.
• Input Devices – Sound
The simplest form of input device for sound is the
microphone. This involves the use of software
which samples the incoming signal. An analogue to
digital converter is required to convert the
electrical signals from the microphone into ones
which can be stored by the computer. This is
usually done by a sound card which allows
the microphone to be attached to the computer
and sound to be captured.
• Speaker
- A computer speaker is another
common type of output device used
to play music and movies.
- Speakers can be usually connected
to the system unit or laptop using
3.5 jack plug but there are many
wireless speakers nowadays that use
Bluetooth technology.
• Projector
– Projector is an optical output device that "project" still or
moving images onto a screen, blank wall, or other surface.
– They are typically used for presentations, watching movies, or
as a teaching aid, and connect to the computer via VGA or
HDMI port.
• Printer
– Printer is another common form of output device
used to generate hard copies of electronic data stored
on a computer, most often text or images onto paper.
– Inkjet and laser printers are two of the most common
types of printer found today, with modern printers
connecting to the computer via the USB port or WI-FI.
• Backing Storage – Magnetic Disks
Magnetic disks have been widely used as a fast backing
storage media. The capacity of fixed disk systems has been
growing very fast over recent years and the cost per
megabyte has dropped dramatically.
• Backing Storage – Tape
Tape has been used as a backup medium in commercial
situations for many years. It is very cheap and secure. Its
main disadvantage is the serial nature of access which
makes it very slow to access data unless it has first been
sorted. There are many different types of tape
technologies.
• Backing Storage – Optical Drives
Optical technologies involving the use of lasers have contributed to the production
of CD and DVD drives. A plastic disc is scanned using a laser which reflects off
pits on the surface of the disc differently from areas where there is no pit.
There are many different types of CD and DVD drives.
CD-ROM drives allow different types of CD’s to be read.
• CD-R drives allow CD-ROMs and audio CDs to be written. CD-R software is also
required to enable the CD to be ‘burned’. Often, it is the software package, not the
drive itself, that determines how easy or difficult it is to create CD-ROMs.
• CD-RW drives enables CDs to be written onto it in multiple sessions. One of the
problems with CD-R disks is that you can only write to them once. With CD-RW
drives and disks, you can treat the optical disk just like a floppy or hard disk,
writing data onto it multiple times.
• DVD-R, DVD-RW, DVD+R, DVD+RW and DVD-RAM are different types of DVD
drive and allow similar tasks to be carried out except the storage capacity and
access times are much faster.
• Backing Storage – Solid State Devices
There are many devices on the market today that allow data to be saved on small, portable backing
storage devices. These can be take the form of a pen, key ring or even a watch.
USB Flash Memory
A USB flash memory a memory chip with a USB plug, you plug it into your
computer, copy the file onto it, then simply plug it into the USB socket of the other
computer and access the file. They are small enough to attach to your keyring and
are difficult to damage. Remove the cap and the USB plug is revealed. Plug it in and the computer will
automatically recognise it. Files are stored on it simply by
dragging and dropping them onto the icon. Storage Capacities start from 64
Megabytes upwards. This type of memory uses Erasable Programmable Read Only
Memory (EPROM) technology. USB flash drives have less storage capacity than an
external hard drive, but they are smaller and more durable because they do not
contain any internal moving parts. Flash drives also are called pen drives, key
drives or simply USB drives.
Memory Card Reader/Writer
These can be used with most of the memory card formats to allow the cards to be used as a
file transfer medium similar to the USB Flash Memory. The reader/writer is connected to a
USB port and once a memory card has been connected is identified by the system as an
external drive. Files can simply be dragged and dropped to transfer data. Once full/empty
the card is simply removed and another fitted. This is useful as it allows memory cards
from digital cameras etc to be removed and used without the camera being connected to
the computer.
COMPONENTS OF COMPUTER SYSTEM

Computer hardware - Are physical parts/tangible parts


of a computer. eg Input devices, output devices, central
processing unit, storage devices and communication
devices

Computer software - also known as programs or


applications. They are classified into classes namely -
system software ,utility software and application
software
Liveware - is the computer user. Also known as orgware
or the humanware. The user commands the computer
COMPUTER HARDWARE

Hardware refers to the physical, tangible computer


equipment and devices, which provide support for major
functions such as input, processing (internal storage,
computation and control), output, secondary storage (for
data and programs), and communication.

HARDWARE CATEGORIES (Functional Parts)


A computer system is a set of integrated devices that input,
output, process, and store data and information. Computer
systems are currently built around at least one digital
processing device. There are five main hardware
components in a computer system: Input, Processing,
Storage, Output and Communication devices.
INPUT DEVICES
Are devices used for entering data or instructions to the central processing unit. Are classified according to the
method they use to enter data.
a) KEYING DEVICES
Are devices used to enter data into the computer using a set of Keys eg Keyboard, key-to- storage and keypad.

i) The keyboard

Keyboard (similar to a typewriter) is the main input device of a computer . It contains three types of keys--
alphanumeric keys, special keys and function keys. Alphanumeric keys are used to type all alphabets, numbers and
special symbols like $, %, @, A etc. Special keys such as <Shift>, <Ctrl>, <Alt>, <Home>, <Scroll Lock> etc. are used for
special functions. Function keys such as <Fl>, <F2>, <F3> etc. are used to give special commands depending upon
the software used e.g.F5 reloads a page of an internet browser. The function of each and every key can be well
understood only after working on a PC. When any key is pressed, an electronic signal is produced. This signal is
detected by a keyboard encoder that sends a binary code corresponding to the key pressed to the CPU. There are
many types of keyboards but 101 keys keyboard is the most popular one.
How the keys are organized
The keys on your keyboard can be divided into several groups based on function:
Typing (alphanumeric) keys. These keys include the same letter, number, punctuation, and symbol keys found on a
traditional typewriter.
Special (Control) keys. These keys are used alone or in combination with other keys to perform certain actions. The
most frequently used control keys are CTRL, ALT, the Windows key, and ESC.
Function keys. The function keys are used to perform specific tasks. They are labelled as F1, F2, F3, and so on, up to
F12. The functionality of these keys differs from program to program.
Cursor Movement (Navigation) keys. These keys are used for moving around in documents or WebPages and editing
text. They include the arrow keys, HOME, END, PAGE UP, PAGE DOWN, DELETE, and INSERT and ARROW KEYS.
Numeric keypad. The numeric keypad is handy for entering numbers quickly. The keys are grouped together in a
block like a conventional calculator or adding machine.
B. POINTING DEVICES
Are devices that enter data and instructions into the computer using a pointer that appears on
the screen. The items to be entered are selected by either pointing to or clicking on them. e.g
mice, joystick, touch sensitive screen, trackballs

i) THE MOUSE
A mouse is a small device used to point to and select items on your computer screen. Although
mice come in many shapes, the typical mouse does look a bit like an actual mouse. It's small,
oblong, and connected to the system unit by a long wire that resembles a tail and the connector
which can either be PS/2 or USB. Some newer mice are wireless.
A mouse usually has two buttons: a primary button (usually the left button) and a secondary
button. Many mice also have a wheel between the two buttons, which allows you to scroll
smoothly through screens of information.
When you move the mouse with your hand, a pointer on your screen moves in the same
direction. (The pointer's appearance might change depending on where it's positioned on your
screen.) When you want to select an item, you point to the item and then click (press and release)
the primary button. Pointing and clicking with your mouse is the main way to interact with your
computer. There are several types of mice: Mechanical mouse, optical mouse, optical-mechanical
mouse and laser mouse.
Basic parts
A mouse typically has two buttons: a primary button (usually the left button) and a secondary
button (usually the right button). The primary button is the one you will use most often. Most
mice also include a scroll wheel between the buttons to help you scroll through documents and
WebPages more easily. On some mice, the scroll wheel can be pressed to act as a third button.
Pointing to an object often reveals a descriptive message about it.The pointer can change depending
on what you're pointing at. For example, when you point to a link in your web browser, the pointer
changes from an arrow to a hand with a pointing finger .
Most mouse actions combine pointing with pressing one of the mouse buttons. There are four basic
ways to use your mouse buttons: clicking, double-clicking, right-clicking, and dragging.
Clicking (single-clicking)
To click an item, point to the item on the screen, and then press and release the primary button
(usually the left button).
Clicking is most often used to select (mark) an item or open a menu. This is sometimes called single-
clicking or left-clicking.
Double-clicking
To double-click an item, point to the item on the screen, and then click twice quickly. If the two clicks
are spaced too far apart, they might be interpreted as two individual clicks rather than as one
double-click.
Double-clicking is most often used to open items on your desktop. For example, you can start a
program or open a folder by double-clicking its icon on the desktop.
Right-clicking
To right-click an item, point to the item on the screen, and then press and release the secondary
button (usually the right button).
Right-clicking an item usually displays a list of things you can do with the item. For example, when
you right-click the Recycle Bin on your desktop, Windows displays a menu allowing you to open it,
empty it, delete it, or see its properties. If you are unsure of what to do with something, right-click it.
• C) SCANNING DEVICES
Are devices that capture an object or a document directly from the
source. They are classified according to the technology used to capture
data e.g. Scanners and Document readers.
i) Scanners
Used to capture a source document and converts it into an
electronic form.
Example are - Flatbed and Handheld scanners.

ii) Document readers


Are devicess that reads data directly from source document and convey
them as input in the form of electronic signal.
Types of Document Readers
i) Optical Mark Reader (OMR)
ii) Barcode readers
iii) Optical Character Readers
Magnetic Readers
Reads data using magnetic ink.t uses principle of magnetism to sense data
which have been written using magnetised ink.
THE CENTRAL PROCESSING UNIT ( C P U)

Is the brain or the heart of a computer. Is also known as


processor and consist of three units namely -
i) Control Unit ( C U)
ii) Arithmetic logic Unit ( A L U)
iii) Main Memory unit ( M M U)
The system unit is the core of a computer system. Usually it's a
rectangular box placed on or underneath your desk. Inside this
box are many electronic components that process data. The
most important of these components is the central processing
unit (CPU), or microprocessor, which acts as the "brain" of your
computer. Another component is random access memory
(RAM), which temporarily stores information that the CPU uses
while the computer is on. The information stored in RAM is
erased when the computer is turned off.
• Software
You do not normally talk directly to the computer, but communicate with it through
an operating system. The operating system allocates the computer’s resources to
the different tasks that the computer must accomplish. The operating system is
actually a program, but it is perhaps better to think of it as your chief servant. It is in
charge of all your other servant programs, and it delivers your requests to them. If
you want to run a program, you tell the operating system the name of the file that
contains it, and the operating system runs the program. If you want to edit a file,
you
tell the operating system the name of the file and it starts up the editor to work on
that file. To most users the operating system is the computer. Most users never see
the computer without its operating system. The names of some common operating
systems are UNIX, DOS, Linux, Windows, Macintosh, and VMS.
A program is a set of instructions for a computer to follow. The input to a computer
can be thought of as consisting of two parts, a program and some data. The
computer follows the instructions in the program, and in that way, performs some
process. The data is what we conceptualize as the input to
the program. For example, if the program adds two numbers, then the two numbers
RAM processor, chip operating system program data are the data.
Types of computer software
Three types of computer programs are: application
Software, system software and utility.
• Application software consists of those programs
written to perform particular tasks required by the
users.
• System software is the collection of programs
that must be available to any computer system for it
to operate.
Operating systems like Windows, macOS, Android
and iOS are examples of system software. Operating
systems are loaded into RAM when the device starts
• Utility software
- Utility software is part of the system software and
performs specific tasks to keep the computer running.
Utility software is always running in the background.
Examples of utility software are security and optimisation
programs.
- Security programs include anti-virus software that scans
and removes viruses. Most computers will include some
sort of anti-virus software, but you can add your own.
- Optimisation programs can include tools for system
clean-up, disk defragmentation, and file compression.
These tools are typically installed as part of the operating
system. They have access to the hard drive to keep it tidy.
The operating system
• Application software also uses the operating system
to talk to the hardware on the computer and to other
software. When a web browser wants to load a web
page, it is the operating system that controls access to
the internet and fetches the information from the
web.
• Similarly, the operating system also provides the
application software information about what key is
being pressed, and about the mouse: where it is,
what it clicked, and where it’s moving on screen.
• Application software relies heavily on the operating
system to do these tasks and send it all this
information.
In other words, the data is the input to the program,
and both the program
and the data are input to the computer (usually via
the operating system).
Whenever we give a computer both a program to
follow and some data for the program,
we are said to be running the program on the data,
and the computer is said to execute the program on
the data. The word data also has a much more general
meaning than the one we have just given it. In its
most general sense it means any information available
to the computer. The word is commonly used in both
the narrow sense and the more general sense.
• SYSTEM UNIT/COMPUTER CASING

• This is the part that holds all of the parts of a computer to make up the computer system.
• It is usually designed in such a manner to make fitting a motherboard, wiring, and drives as easy
as possible. Some are designed so well that it is easy to make everything look tidy and
presentable too.
• Cases come in all different sizes and shapes to accommodate various types of computer
components and satisfy the consumer’s needs.
• Design elements can vary from being plain to highly elaborate. You can get a plain grey desktop
case or one with colored lighting everywhere to make it look spectacular.
• Computer cases rely on computer fans inside them to create proper airflow to keep all the
internal parts cool and working reliably.
• A computer case, like most things, varies in quality. You can get them made from cheap metals or
• Motherboard
The motherboard is the main board that is screwed directly inside the computer case. All
other cards and everything else plugs directly into the motherboard, hence its name.
The CPU, RAM, drives, power supply, and more are connected to it.
Its function involves integrating all the physical components to communicate and operate
together.
A good motherboard offers a wide amount of connectivity options. It also has the least
amount of bottlenecks possible.
This allows all the components to operate efficiently and to fulfill their maximum potential
as they were designed to do.
Obviously, as the physical size is reduced, it begins to limit connectivity options and
functionality.
• Central Processing Unit (CPU)
This little chip is known as the central processing unit (CPU), and it is the brain of
the computer where all data crunching and processing is done. In the old days, a
CPU used to have “only one single brain” or what we call a “single-core CPU”.
But as the wise saying goes “two heads are better than one”, so smart monkeys
eventually improved the design of CPUs. Even though it is one physical chip, there
could multiple “brains” (or cores) within that chip. This is where the terms dual-
core (2 processors in one chip), quad-core (4 processors), and multi-core (N
processors) come from.
• Storage Unit
- Storage unit is main part of our computer system.
- Our computer is incomplete without a storage unit because without a
storage unit, we will not be able to store any type of data like documents
files, audio files, video files etc. in our computer.

Because of the storage unit, we are able to store any type of data so that we
can use that data when we need it in the future.

Because the storage unit we have stored our data, it is saved until we delete
that data, then that data is saved in the storage unit.
- In simple words, your operating system is also installed in the storage
unit itself.
Earlier storage units were not capable of storing much data but today's
storage units are capable of storing a very large amount of data.

- There are also two types of storage units.


• HDD

• HDD
- HDD stands for Hard Disk Drive. This storage in
the form of storage disk in our computer, which
we use to store any digital data.
These hard disk drives are available with very
large storage. Like - 500 GB HDD, 1 TB HDD in
which you can store thousands of photos, videos,
audios.
• SSD
- SSD stands for Solid State Drive. This storage unit
that comes with the new generation of computer,
which is much better than the HARD DISK DRIVE
( HDD ).
HDD is very slow as compared to the speed of data
transfer of SSD. SSD is better than HDD in every
respect.
But SSD is much more expensive than HDD.
• Memory Unit
• Memory unit is also a main part of our computer without which
our computer system is incomplete.
These memory units play a very important role in running our
computer because without the memory unit our computer
system cannot be open.
This memory is not for the use of the user, but this memory is for
the use of the computer.
This memory is used by the computer system according to itself
and this memory is very close to the central processing unit.
• There are mainly two types of memory units.
-RAM

-ROM
• RAM
RAM stands for Random Access Memory. It is temporary and volatile memory.
Temporary means - RAM memory does not store any data permanently as it stores any data
as long as that data is being worked on at the present time, as soon as the purpose of that
data is served, Then Ram considers it as useless data and deletes that data.
As soon as you turn on your computer, your operating system is loaded in the RAM memory
itself and when the operating system is fully loaded then your computer is on.
These memory are capable of transferring data much faster than HDD and SSD.
RAM memory is installed in the slot of the motherboard.
• ROM
ROM stands for Read Only Memory. It is permanent and non volatile memory.
This memory can also not be used by the user, this memory is used for the use of the
computer system.
The instruction data is already programmed in the ROM, which instruction is to be executed
when.
ROM does not have the capacity to store large amounts of data.
No user can delete the data of ROM.
• Graphics Card
-A graphics card is an output device that processes the data from the motherboard and sends the
appropriate information to the computer’s screen for display.
-You can connect monitors to it using HDMI, DisplayPort, DVI, or VGA connectors.
-It can also be referred to as a video or display card.
-A video card takes the burden of all the video processing from the main CPU. This gives a computer
a big boost in performance.
-Because of the large processing requirements for a gaming GPU, fans are almost a given.
-A video card plugs into a PCI Express (Peripheral Component Interconnect Express) slot on the
motherboard. It is a serial expansion bus slot capable of high bandwidth in two directions.
-A graphics card has a GPU (Graphics Processing Unit), the main part of a computer system that
requires cooling.
-A graphics processing unit is slower than a CPU but is designed to deal with mathematical operations
required for video rendering.
- The card’s memory amount varies depending on the manufacturer’s design.
-Video cards use GDDR (Graphics Double Data Rate) SDRAM, which is specially designed to optimize
graphics performance.
- GDDR is built to handle a higher bandwidth compared to plain DDR ram.
• Sound Card
-Most of the time, the sound chip built into the motherboard is used for audio
output.
-But, if you are a sound enthusiast or prefer high-quality audio output while
playing a game, you might be inclined to use a sound card.
-External DACs have gained much more popularity and help deliver clearer and
more defined audio or high-definition sound output.
-They connect up using an IO cable like a USB cable to your computer or laptop
and provide a line out for your speakers or headphones.
-A sound processing chip on the card does all of the audio processing and is
usually not a very powerful processor.
• UPS
-UPS stands for uninterruptible power supply. UPS just like a battery.
-This is also a main part of the computer, without which our computer is incomplete.

After the power cut, the uninterruptible power supply provides electricity to our computer so that our computer
continues to run even after the power cut.

With UPS, you cannot run the computer for a long time, UPS can capable for run the computer for a few hours.

UPS keeps the computer safe and also keeps the user's work safe.

For example, if you are working continuously for a few hours on a MS Word document file and suddenly the electricity is
cut off, then your computer will be turned off and all that you were working on the document file will also be deleted.

If you use UPS, your computer system will not shut down even after the line is cut and the document file you were
working on will not be deleted.

If the line is cut frequently and you do not use the UPS, then your computer system may also crash.

That's why UPS is the main part of a desktop computer.


-Some computers have UPS inbuilt such as laptop computers, notebook computers.

Laptops and notebooks have batteries, in these computers, the battery acts as a UPS.

The battery of laptop and notebook is very powerful, even after the line is cut, you can use laptop and notebook for
about 6 to 8 hours.
• Power Supply Unit
- A power supply is the main part of a computer because without a power supply
our computer is not open.
- Power Supply Unit means - Power supply An electronic component that provides
electrical energy to a computer system that runs the computer.
- This power supply to the computer system as much power as the computer
needs.
- It controls the electrical voltage of your computer and helps your computer
system to run properly without overheating.
- This power supply unit is in every computer.
- The power supply looks like a metal box with a small fan inside.
• Power Cord
- The power cord is also the part of a computer system
that supplies electricity to run the computer system.
Power cord This is a type of cable.
- This cable is connected to the UPS on one side and to
the computer case from the other side. There are many
other types of cables in computer systems that work to
connect monitors, printers, scanners, webcams, etc. to
the CPU.
• CD/DVD Drive
- CD and DVD drives are also optional parts of computer systems.
CD stands for (Compact Disc) and DVD stands for (Digital Versatile
Disc).
- CD and DVD drives are used to read and write images, videos,
software, and other types of data. - CD and DVD discs are a type
of optical disc.
- CD and DVD drives read and write data from optical discs
through laser technology.
- This drive is still used to install operating systems, watch movies,
or do other things. CD and DVD drives are found in almost all
types of computer systems.
• FANS & HEATSINKS
- A fan is an important and internal part of a computer system whose main
function is to cool the components of a computer system by circulating air.
- If your computer system does not have a fan, then your computer system can
fail quickly.
- Because if you use the computer system for a long time, then the components
of your computer become hot, due to which those components get spoiled.
- That's why every computer system has a fan so that when the computer's
components get hot when the computer is used for a long time, the fan works
to cool those hot components.
- So that your computer system lasts for a long time and does not get damaged.
- Through the computer bios, the speed of the computer fan is controlled based
on the temperature of the component concerned.
- Fans are used to cool the components, to prevent a meltdown from occurring.
• There are different types of fans, which names are given below.
- Case Fan
- CPU Fan
- GPU Fan
- Power supply Fan.
A network consists of a number of computers connected, so they may share
resources, such as printers, and may share information. A network might contain a
number of workstations and one or more mainframes, as well as shared devices such
as printers.
For our purposes in learning programming, it will not matter whether you are
working on a PC, a mainframe, or a workstation. The basic configuration of the computer,
as we will view it, is the same for all three types of computers.
The computer can be thought of as having five main components: the input
device(s), the output device(s), the processor (also called the CPU), the main memory,
and the secondary memory. The processor, main memory, and sometimes even
secondary memory are normally housed in a single cabinet. The processor and main
memory form the heart of a computer and can be thought of as an integrated unit.
Other components connect to the main memory and operate under the direction of
the processor.
An input device is any device that allows a person to communicate information
to the computer. Your primary input devices are likely to be a keyboard and a mouse.
An output device is anything that allows the computer to communicate information
to you. The most common output device is a display screen, referred to as a monitor.
Quite often, there is more than one output device. For example, in addition to the
monitor, your computer probably has a printer for producing output on paper. The
keyboard and monitor are sometimes thought of as a single unit called a terminal.
In order to store input and to have the equivalent of scratch paper for performing
calculations, computers are provided with memory. The program that the computer
executes is also stored in this memory. A computer has two forms of memory, called
main memory and secondary memory. The program that is being executed is kept in
main memory, and main memory is, as the name implies, the most important memory.
Main memory consists of a long list of numbered locations called memory
locations; the number of memory locations varies from one computer to another,
ranging from a few thousand to many millions, and sometimes even into the billions.
Each memory location contains a string of zeros and ones. The contents of these
locations can change. Hence, you can think of each memory location as a tiny blackboard
on which the computer may write and erase. In most computers, all memory
locations contain the same number of zero/one digits.
A digit that can assume only the values zero or one is called a binary digit or a bit. The
memory locations in most computers contain eight bits (or some multiple of eight bits).
An eight-bit portion of memory is called a byte, so we may refer to these numbered
memory locations
as bytes. To rephrase the situation, you can think of the computer’s main
memory as a long list of numbered memory locations called bytes. The number that
identifies a byte is called its address. A data item, such as a number or a letter, can
be stored in one of these bytes, and the address of the byte is then used to find the
data item when it is needed.
If the computer needs to deal with a data item (such as a large number) that is
too large to fit in a single byte, it will use several adjacent bytes to hold the data item.
In this case the entire chunk of memory that holds the data item is still called a
memory location. The address of the first of the bytes that make up this memory
location is used as the address for this larger memory location. Thus, as a practical
matter, you can think of the computer’s main memory as a long list of memory locations
of varying sizes. The size of each of these locations is expressed in bytes and
the address of the first byte is used as the address (name) of that memory location.
The sizes of
the memory locations are not fixed, but can change when a new program is run on
the computer.
The fact that the information in a computer's memory is
represented as zeros and ones need not be of great
concern to you when programming in C++ (or in most any
other programming language). There is, however, one
point about this use of zeros and ones that will concern us
as soon as we start to write programs. The computer
needs to interpret these strings of zeros and ones as
numbers, letters, instructions, or other types of
information. The computer performs these interpretations
automatically according to certain coding schemes. A
different code is used for each different
type of item that is stored in the computer’s memory: one
code for letters, another for whole numbers, another for
fractions, another for instructions, and so on.
For example, in one commonly used set of codes, 01000001 is the
code for the letter A and also for the number 65. In order to know
what the string 01000001 in a particular location stands for, the
computer must keep track of which code is currently being used for
that location. Fortunately, the programmer seldom needs to be
concerned with such codes and can safely reason as though the
locations actually contained letters, numbers, or whatever is desired.
The memory we have been discussing up until now is the main
memory. Without its main memory, a computer can do nothing.
However, main memory is only used while the computer is actually
following the instructions in a program. The computer also has
another form of memory called secondary memory or secondary
storage. (The words memory and storage are exact synonyms in this
context.)
Secondary memory is the memory that is used for keeping a
permanent record of information after (and before) the computer is
used. Some alternative terms that are commonly used to refer to
secondary memory are auxiliary memory, auxiliary storage,
external memory, and external storage.
Information in secondary storage is kept in units called files, which can be as
large or as small as you like. A program, for example, is stored in a file in secondary
storage and copied into main memory when the program is run. You can store a program,
a letter, an inventory list, or any other unit of information in a file.
Several different kinds of secondary memory may be attached to a single computer.
The most common forms of secondary memory are hard disks, diskettes, and
CDs. (Diskettes are also sometimes referred to as floppy disks.) CDs (compact disks)
used on computers are basically the same as those used to record and play music.
CDs for computers may be read-only so that your computer can read, but cannot
change, the data on the CD; CDs for computers can also be read/write CDs, which
can have their data changed by the computer. Information is stored on hard disks and
diskettes in basically the same way as it is stored on CDs. Hard disks are fixed in
place and are normally not removed from the disk drive. Diskettes and CDs can be
easily removed from the disk drive and carried to another computer. Diskettes and
CDs have the advantages of being inexpensive and portable, but hard disks hold
more data and operate faster. Other forms of secondary memory are also available,
but this list covers most forms that you are likely to encounter.
Main memory is often referred to as RAM or random access memory. It is
called random access because the computer can immediately access the data in any
memory location. Secondary memory often requires sequential access, which
means that the computer must look through all (or at least very many) memory
locations until it finds the item it needs.
The processor (also know as the central processing unit, or CPU) is the
“brain” of the computer. When a computer is advertised, the computer company will
tell you what chip it contains. The chip is the processor. The processor follows the
instructions in a program and performs the calculations specified by the program. The
processor is, however, a very simple brain. All it can do is follow a set of simple
instructions provided by the programmer. Typical processor instructions say things
like “Interpret the zeros and ones as numbers, and then add the number in memory
location 37 to the number in memory location 59, and put the answer in location 43,”
or “Read a letter of input, convert it to its code as a string of zeros and ones, and place
it in memory location 1298.” The processor can add, subtract, multiply, and divide
and can move things from one memory location to another. It can interpret strings of
zeros and ones as letters and send the letters to an output device. The processor also
has some primitive ability to rearrange the order of instructions. processor instructions
vary somewhat from one computer to another. The processor of a modern computer
can have as many as several hundred available instructions. However, these instructions
are typically all about as simple as those we have just described.
Software
You do not normally talk directly to the computer, but communicate with it through
an operating system. The operating system allocates the computer’s resources to
the different tasks that the computer must accomplish. The operating system is
actually a program, but it is perhaps better to think of it as your chief servant. It is in
charge of all your other servant programs, and it delivers your requests to them. If
you want to run a program, you tell the operating system the name of the file that
contains it, and the operating system runs the program. If you want to edit a file, you
tell the operating system the name of the file and it starts up the editor to work on
that file. To most users the operating system is the computer. Most users never see
the computer without its operating system. The names of some common operating
systems are UNIX, DOS, Linux, Windows, Macintosh, and VMS.
A program is a set of instructions for a computer to follow. The input to a computer can be
thought of as consisting of two parts, a program and some data. The computer follows the
instructions in the program, and in that way, performs some process. The data is what we
conceptualize as the input to
the program. For example, if the program adds two numbers, then the two numbers
RAM processor, chip operating system program data are the data.
Types of computer software
Three types of computer programs are: application
Software, system software and utility.
• Application software consists of those programs
written to perform particular tasks required by the users.
• System software is the collection of programs
that must be available to any computer system for it to
operate.
Operating systems like Windows, macOS, Android and iOS
are examples of system software. Operating systems are
loaded into RAM when the device starts up, and have
access to the hard drive.
• Utility software
- Utility software is part of the system software and
performs specific tasks to keep the computer running.
Utility software is always running in the background.
Examples of utility software are security and optimisation
programs.
- Security programs include anti-virus software that scans
and removes viruses. Most computers will include some
sort of anti-virus software, but you can add your own.
- Optimisation programs can include tools for system
clean-up, disk defragmentation, and file compression.
These tools are typically installed as part of the operating
system. They have access to the hard drive to keep it tidy.
The operating system
• Application software also uses the operating system
to talk to the hardware on the computer and to
other software. When a web browser wants to load a
web page, it is the operating system that controls
access to the internet and fetches the information
from the web.
• Similarly, the operating system also provides the
application software information about what key is
being pressed, and about the mouse: where it is,
what it clicked, and where it’s moving on screen.
• Application software relies heavily on the operating
system to do these tasks and send it all this
In other words, the data is the input to the program,
and both the program
and the data are input to the computer (usually via
the operating system).
Whenever we give a computer both a program to
follow and some data for the program,
we are said to be running the program on the data,
and the computer is said to execute the program on
the data. The word data also has a much more
general meaning than the one we have just given it.
In its most general sense it means any information
available to the computer. The word is commonly
used in both the narrow sense and the more general
sense.
High-Level Languages
• A computer program is just a collection of the
instructions necessary to solve a specific problem.
The basic operations of a computer system from
what is known as the computer’s instruction set.
And the approach or method that is used to solve
the problem is known as an algorithm.
• So far as programming language concern these are
of two types.
1) Low level language
2) High level language
Low level language:
• Low level languages are machine level and assembly level
language. In machine level language computer only
understand digital numbers i.e. in the form of 0 and 1. So,
instruction given to the computer is in the form binary digit,
which is difficult to implement instruction in binary code. This
type of program is not portable, difficult to maintain and also
error prone. The assembly language is on other hand modified
version of machine level language. Where instructions are
given in English like word as ADD, SUM, MOV etc. It is easy to
write and understand but not understand by the machine. So
the translator used here is assembler to translate into machine
level. Although language is bit easier, programmer has to know
low level details related to low level language. In the assembly
level language the data are stored in the computer register,
which varies for different computer. Hence it is not portable.
• Machine languages are the lowest level of
computer languages. Programs written in
machine language consist of 1s and 0s.
• Programs in machine language can control
directly to the computer’s hardware.
• Example:
00101010 000000000001 000000000010
10011001 000000000010 000000000011

opcode address parts


• A machine language instruction consists of two
parts: an instruction part and an address part.
• The instruction part (opcode) tells the computer
the operation to be performed.
• The address part specifies the memory address of
the data to be used in the instruction.
• Machine language is a collection of binary digits or
bits that the computer reads and interprets.
• Machine languages are the only languages
understood by computers.
• While easily understood by computers, machine
languages are almost impossible for humans to use
because they consist entirely of numbers.
Advantages:
1) High speed execution
2) The computer can understood instructions
immediately
3) No translation is needed.
Disadvantages:
1) Machine dependent
2) Programming is very difficult
3) Difficult to understand
4) Difficult to write bug free programs
5) Difficult to isolate an error
Example Addition of two numbers
2 0010
+ 3 0011
--- ---------------
5 0101
• Machine Language
169 1 160 0 153 0 128 153 0 129 153 130 153 0 131
200 208 241 96
• High level language
5 FOR I=1 TO 1000: PRINT "A";: NEXT I
Symbolic Languages (or) Assembly Language
• Assembly languages perform the same tasks as
machine languages, but use symbolic names for
opcodes and operands instead of 1s and 0s.
– LOAD BASEPAY
– ADD OVERPAY
– STORE GROSSPAY
• An assembly language program must be
translated into a machine language program
before it can be executed on a computer.
Assembler

Assembly Translation Machine


language program language
(assembler) program
program
• A program written in assembly language consists of a
series of instructions mnemonics that correspond to
a stream of executable instructions, when translated
by an assembler, that can be loaded into memory
and executed.
• Assembly languages use keywords and symbols,
much like English, to form a programming language
but at the same time introduce a new problem.
• The problem is that the computer doesn't
understand the assembly code, so we need a way to
convert it to machine code, which the computer does
understand.
• Assembly language programs are translated into
machine language by a program called an assembler.
Advantages:
1) Easy to understand and use
2) Easy to modify and isolate error
3) High efficiency
4) More control on hardware
Disadvantages:
5) Machine Dependent Language
6) Requires translator
7) Difficult to learn and write programs
8) Slow development time
9) Less efficient
• Assembly Language
• Example:
–Machine language :
10110000 01100001
–Assembly language :
mov a1, #061h
–Meaning:
Move the hexadecimal value 61 (97 decimal) into
the processor register named "a1".
Example:
2 PUSH 2,A 3
3 PUSH 3,B
+ ADD A,B
5 PRINT C
High level language:
• High-level languages allow programmers to write instructions
that look like every English sentences and commonly-used
mathematical notations.
• Each line in a high-level language program is called a
statement.
• Example: Result = (First + Second)*Third
• High-level languages allow us to write computer code using
instructions resembling everyday spoken language (for
example: print, if, while) which are then translated into
machine language to be executed.
• Programs written in a high-level language need to be
translated into machine language before they can be
executed.
• Some programming languages use a compiler to perform this
• The symbolic languages greatly improved programming efficiency they
still required programmers to concentrate on the hardware that they
were using working with symbolic languages was also very tedious
because each machine instruction had to be individually coded. The
desire to improve programmer efficiency and to change the focus from
the computer to the problems being solved led to the development of
high-level languages. High-level languages are portable to many
different computer allowing the programmer to concentrate on the
application problem at hand rather than the intricacies of the computer.
• These languages are machine independent, means it is portable. The
language in this category is Pascal, Cobol, Fortran etc. High level
languages are understood by the machine. So it need to translate by the
translator into machine level. A translator is software which is used to
translate high level language as well as low level language in to machine
level language.
• C ----- A systems implementation Language
• C++ ----- C with object oriented enhancements
• JAVA ----- Object oriented language for internet and general applications
using basic C syntax
Advantages:
1) Easy to write and understand
2) Easy to isolate an error
3) Machine independent language
4) Easy to maintain
5) Better readability
6) Low Development cost
7) Easier to document
8) Portable
Disadvantages:
9) Needs translator
10) Requires high execution time
11) Poor control on hardware
12) Less efficient
Example: C language
#include<stdio.h>
void main()
{
int a,b,c;
scanf("%d%d%",&a,&b);
c=a+b;
printf("%d",c);
}
• Difference between Machine, Assembly, High
Level Languages
Feature Machine Assembly High Level
Form 0‘s and 1‘s Mnemonic Normal
codes English
Machine Dependent Dependent Independent
Dependent
Translator Not Needed Needed(Asse Needed(Com
mbler) piler)
Execution Less Less High
Time
Languages Only one Different Different
Manufacturers Languages
Nature Difficult Difficult Easy
Memory Less Less More
Space
Comparison
Machine Assembly High Level
Language Language Language
Time to execute Since it is the A program called A program called
basic language of an ‘assembler’ is a compiler or
the computer, it required to interpreter is
does not require convert the required to
any translation, program into convert the
and hence machine program into
ensures better language. Thus, it machine
machine takes longer to language. Thus, it
efficiency. This execute than a takes more time
means the machine language for a computer to
programs run program. execute.
faster.
Time to execute Needs a lot of Simpler to use Easiest to use.
skill, as than machine Takes less time to
instructions are language, though develop programs
very lengthy and instruction codes and, hence,
complex. Thus, it must be ensures better
takes more time memorized. It program
to program. takes less time to efficiency.
develop programs
as compared to
machine
language.
Language Translators
• These are the programs which are used for converting the programs in one
language into machine language instructions, so that they can be executed by
the computer.
1) Compiler: It is a program which is used to convert the high level language
programs into machine language
2) Assembler: It is a program which is used to convert the assembly level language
programs into machine language
3) Interpreter: It is a program, it takes one statement of a high level language
program, translates it into machine language instruction and then immediately
executes the resulting machine language instruction and so on.
• Compiler and interpreter are used to convert the high level language into
machine level language. The program written in high level language is known as
source program and the corresponding machine level language program is
called as object program. Both compiler and interpreter perform the same task
but there working is different. Compiler read the program at-a-time and
searches the error and lists them. If the program is error free then it is
converted into object program. When program size is large then compiler is
preferred. Whereas interpreter read only one line of the source code and
convert it to object code. If it check error, statement by statement and hence of
Comparison between a Compiler and Interpreter

COMPILER INTERPRETER
A Compiler is used to compile An interpreter is used to
an entire program and an translate each line of the
executable program is program code immediately as
generated through the object it is entered
program
The executable program is The executable program is
stored in a disk for future use generated in RAM and the
or to run it in another interpreter is required for each
computer run of the program
The compiled programs run The Interpreted programs run
faster slower
Most of the Languages use A very few languages use
compiler interpreters.
• Differences Between Compiler and Assembler

Compiler Assembler
Compiler converts the high-level An assembler converts the assembly
language source code into machine level language code into the
level language code. machine level language code.
The input of a compiler is high-level Where as, its input is low level
language source code. assembly code.
Compiler converts the whole source Assembler does not convert the
code to machine code at once. code in one go.
It has the following phases: lexical An assembler completes the task in
analysis, syntax analysis, semantic two passes.
analysis, intermediate code
generation, code optimization, code
generation and error handling.
It produces a machine code in form It produces binary code in form of 0s
of mnemonics. and 1s.
Examples are Java, C, C++ etc. Examples of assemblers are GAS,
compilers. GNU etc.
• Integrated Development Environments (IDE) The
process of editing, compiling, running, and debugging
programs is often managed by a single integrated
application known as an Integrated Development
Environment, or IDE for short. An IDE is a windows-
based program that allows us to easily manage large
software programs, edit files in windows, and compile,
link, run, and debug programs. On Mac OS X,
CodeWarrior and Xcode are two IDEs that are used by
many programmers. Under Windows, Microsoft Visual
Studio is a good example of a popular IDE. Kylix is a
popular IDE for developing applications under Linux.
Most IDEs also support program development in
several different programming languages in addition to
Compilers
• A program that translates a high-level language like C++ to a machine language is
called a compiler. A compiler is thus a somewhat peculiar sort of program, in that its
input or data is some other program, and its output is yet another program. To avoid
confusion, the input program is usually called the source program or source code,
and the translated version produced by the compiler is called the object program or
object code. The word code is frequently used to mean a program or a part of a
program, and this usage is particularly common when referring to object programs.
Now, suppose you want to run a C++ program that you have written. In order to get the
computer to follow your C++ instructions, proceed as follows. First, run the compiler
using your C++ program as data. Notice that in this case, your C++ program is not
being treated as a set of instructions. To the compiler, your C++ program is just a long
string of characters. The output will be another long string of characters, which is the
machine-language equivalent of your C++ program. Next, run this machine-language
program on what we normally think of as the data for the C++ program. The output
will be what we normally conceptualize as the output of the C++ program.
• Linking
• The object code for your C++ program must be
combined with the object code for routines (such
as input and output routines) that your program
uses. This process of combining object code is
called linking and is done by a program called a
linker. For simple programs, linking may be done
for you automatically.
• Compiler
• The compiler is a system program that converts the source code into the machine
language. The machine language is also called as an object code, which is generated as
an output of the compilation process. The compiler generates an ‘.obj’ file on the disk
after the successful compilation of the source code as shown in Figure 1.13. There are
three major tasks, which are performed on the source code as a part of compilation
process. These are the key phases of the compilation process and they are as explained
below:
1) Syntax analysis: Program can be translated into the machine code only if the
source code written by the programmer does not violate any of the syntactical rules
defined by the language. The syntax phase is used to check if the syntax of the source
code is correct. The component inside compiler that validates the syntax of the program
is called as a parser. The parser will throw an ‘error’ message to the programmer if any
of the syntax rules are violated. The translation process is immediately terminated if
at least one error is located in the input program. Every programming language has a
grammar, which defines the syntactical rules of that language. A parser is a
program that checks if the input sentence preservers the syntactical rules, which are
defined by the grammar of the language, thereby detecting syntax errors (if any) in the
source code. So as to examine the sentence for syntax errors, the compiler partitions the
sentence into discrete tokens. The process of partitioning a single sentence into
separate tokens is called as ‘lexical analysis’, which happens before the ‘syntax analysis’
phase of the compilation process.
2) Semantic analysis: The phase is used to check
the input program for the semantic errors. The
semantic rules define the ‘data types’ over which a
specific operation can be performed. The semantic
phase will throw an error and stop the translation
process if there is a ‘data type’ mismatch while
performing an operation.
3. Code generation: Once the syntax and semantic
analyses are completed successfully, the code
generation phase generates the optimized object
code (which is the machine language) on the disk.
The object code for the program is created and
stored as an ‘.obj’ file on the disk.
SOFTWARE DEVELOPMENT METHOD

• Software development consists of three


overlapping phases
- Development and Design
- Documentation
- Maintenance
• Software engineering is concerned with
creating readable, efficient, reliable, and
maintainable programs and systems.
• Phase I: Development and Design
The first phase consists of four steps:
1. Analyse the problem
Analyze the problem requirements to understand what the
program must do, what outputs are required and what inputs
are needed.
2. Develop a Solution
We develop an algorithm to solve the problem.
Algorithm is a sequence of steps that describes how the data
are to be processed to produce the desired outputs.
3. Code the solution
This step consists of translating the algorithm into a computer
program using a programming language.
4. Test and correct the program
• Phase II: Documentation
Documentation requires collecting critical
documents during the analysis, design, coding, and
testing.
There are five documents for every program solution:
- Program description
- Algorithm development and changes
- Well-commented program listing
- Sample test runs
- User’s manual
• Phase III: Maintenance
This phase is concerned with
- the ongoing correction of problems,
- revisions to meet changing needs and
- the addition of new features.

You might also like