Basics of Computer Hardware & Software
Basics of Computer Hardware & Software
com/c/EDULINEFORCSE
STUDENTS
MODULE 1
BASICS OF COMPUTER
HARDWARE & SOFTWARE
Computer system has five basic units that help the computer to
perform operations, which are given below:
1. Input Unit 2. Output Unit 3. Storage Unit
4. Arithmetic Logic Unit 5. Control Unit
Input Unit
• Input unit connects the external environment with internal
computer system.
• It provides data and instructions to the computer system.
• Commonly used input devices are keyboard,mouse, magnetic tape
etc.
Storage Unit
• This unit holds the data and instructions.
• It also stores the intermediate results before these are sent to the
output devices.
• It also stores the data for later use. The storage unit of a computer
system can be divided into two categories:
a) Primary Storage:
• This memory is used to store the data which is being currently
executed.
• It is used for temporary storage of data. The data is lost, when the
computer is switched off.
• RAM is used as primary storage memory.
Prepared By Mr.EBIN PM, AP, IESCE EDULINE 5
b) Secondary Storage:
• In addition to RAM, every computer also has another storage drive
that’s used for storing information on a long-term basis, and this is
known as secondary storage.
• Any file you create or download is saved to the computer’s
secondary storage.
• There are two types of storage device used as secondary storage in
computers: HDD (Hard Disk Drive) and SSD (Solid-State Drive).
• While HDDs are the more traditional of the two, SSDs are fast
overtaking HDD as the preferred one for secondary storage.
SSD
An SSD is a storage medium that uses non-volatile memory to hold
and access data.
Unlike a hard drive, an SSD has no moving parts.
Advantages
ofaster access time
onoiseless operation
ohigher reliability
olower power consumption.
HDD
• A hard disk drive (sometimes abbreviated as a hard drive, HD,
or HDD) is a non-volatile data storage device.
• It is usually installed internally in a computer, attached directly to
the disk controller of the computer's motherboard.
(GPU)
MOTHERBOARD
TYPES OF MEMORY
• Memory is the most essential element of a computing system
because without it computer can't perform simple tasks.
• Computer memory is of two basic type - Primary memory(RAM and
ROM) and Secondary memory(hard drive, CD, etc.).
• Random Access Memory (RAM) is primary-volatile memory and
Read Only Memory (ROM) is primary-non-volatile memory.
RAM ROM
Hard Disk
• The hard disk is a device that can store data and have the data
survivor power-off and resets of the computer.
• Data stored on a hard disk can be read at a later point, no matter
how longtime the computer has been powered off - provided that
the computer and hard disk is still working at the time it is again
powered on.
• The hard disk is where you normally store your documents and
files.
• It is also on the hard disk that the computer's operating system is
stored, and where the programs you have installed on the
computer are stored.
• The hard disk is also where your own programs are stored.
• When the computer is told to execute a program, it loads the
program from the hard disk into RAM and executes it from there.
• Programs can also read from and write to the hard disk.
• For instance, the program Microsoft Word can read and write
Word documents from and to the hard disk
HDD
Input devices
• An input device can send data to another device, but it cannot
receive data from another device. Examples of input devices
include the following.
• Keyboard and Mouse - Accepts input from a user and sends that
data (input) to the computer. They cannot accept or reproduce
information (output) from the computer.
• Microphone - Receives sound generated by an input source, and
sends that sound to a computer.
• Webcam - Receives images generated by whatever it is pointed at
(input) and sends those images to a computer.
Output devices
• An output device can receive data from another device and
generate output with that data, but it cannot send data to another
device. Examples of output devices include the following.
• Monitor - Receives data from a computer (output) and displays
that information as text and images for users to view. It cannot
accept data from a user and send that data to another device.
• Projector - Receives data from a computer (output) and displays, or
projects, that information as text and images onto a surface, like a
wall or a screen. It cannot accept data from a user and send that
data to another device.
• Speakers - Receives sound data from a computer and plays the
sounds for users to hear. It cannot accept sound generated by users
and send that sound to another device.
Prepared By Mr.EBIN PM, AP, IESCE EDULINE 29
Input/output devices
• An input/output device can receive data from users, or another
device (input), and send data to another device (output).
• Examples of input/output devices include the following.
• CD-RW drive and DVD-RW drive - Receives data from a computer
(input), to copy onto a writable CD or DVD. Also, the drive sends
data contained on a CD or DVD (output) to a computer.
• USB flash drive - Receives, or saves, data from a computer (input).
• Also, the drive sends data to a computer or another device
(output).
SYSTEM SOFTWARES
Software
• Software is a collection of instructions that enable the user to
interact with a computer , its hardware or perform tasks
• Without software, most computers would be useless. For example,
without your Internet browser software, you could not surf the
Internet. Without an operating system, the browser could not run
on your computer.
SYSTEM SOFTWARES
• Systems software includes the programs that are dedicated to
managing the computer itself, such as the operating system and
disk operating system (or DOS).
• System software is a software that provides platform to other
software's.
• Some examples can be operating systems, antivirus software, disk
formatting software, Computer language translators etc.
Operating System
• An operating system (OS) is a type of system software that
manages computer's hardware and software resources.
• It provides common services for computer programs.
• An OS acts a link between the software and the hardware.
• It controls and keeps a record of the execution of all other
programs that are present in the computer, including application
programs and other system software.
Compiler:
• A compiler is a software that translates the code written in one
language to some other language without changing the meaning of
the program.
• The compiler is also said to make the target code efficient and
optimized in terms of time and space
• A compiler performs almost all of the following operations during
compilation: preprocessing, lexical analysis, parsing, semantic
analysis (syntax-directed translation), conversion of input programs
to an intermediate representation, code optimization and code
generation.
• Examples of compiler may include gcc (C compiler) , g++ (C++
Compiler), javac (Java Compiler) etc.
Interpreter:
• An interpreter is a computer program that directly executes, i.e. it
performs instructions written in a programming or scripting language.
• Interpreter do not require the program to be previously compiled into a
machine language program.
• An interpreter translates high-level instructions into an intermediate
form, which is then executes.
• Interpreters are fast as it does not need to go through the compilation
stage during which machine instructions are generated.
• Interpreter continuously translates the program until the first error is
met.
• If an error comes it stops executing. Hence debugging is easy. Examples
may include Ruby, Python, PHP etc.
Assembler:
• An assembler is a program that converts assembly language into
machine code.
• It takes the basic commands and operations and converts them
into binary code specific to a type of processor.
• Assemblers produce executable code that similar to compilers.
However, assemblers are more simplistic since they only convert
low-level code (assembly language) to machine code.
• Since each assembly language is designed for a specific processor,
assembling a program is performed using a simple one-to-one
mapping from assembly code to machine code.
• On the other hand, compilers must convert generic high-level
source code into machine code for a specific processor.
Prepared By Mr.EBIN PM, AP, IESCE EDULINE 38
STRUCTURED PROGRAMMING
• A programming approach in which the program is made as a single
structure.
• It means that the code will execute the instruction by instruction
one after the other.
• It doesn't support the possibility of jumping from one instruction
to some other with the help of any statement like GOTO, etc.
Therefore, the instructions in this approach will be executed in a
serial and structured manner.
• The languages that support Structured programming approach are:
C, C++, JAVA, C# etc
dd
hhhhhh
Algorithm
Step-1 Start
Step-2 Input Radius of Circle say R
Step-3 Area = 22.0/7.0 *R*R
Step-4 PERIMETER = 2*22.0/7.0*R
Step-5 Display AREA, PERIMETER
Step-6 Stop
Prepared By Mr.EBIN PM, AP, IESCE EDULINE 54
ALGORITHM
begin Bubble_Sort(list)
for all elements of list
if list[i] > list[i+1]
swap(list[i], list[i+1])
end if
end for
return list
end Bubble_Sort
Working
PSEUDO CODE
• It's simply an implementation of an algorithm in the form of
annotations and informative text written in plain English.
• It has no syntax like any of the programming language and thus
can't be compiled or interpreted by the computer.
• It's the cooked up representation of an algorithm.
• Pseudo code,as the name suggests, is a false code or a
representation of code which can be understood by even a layman
with some school level programming knowledge