1PU CS Chapter 1 Shruthi M J
1PU CS Chapter 1 Shruthi M J
Q) What is hardware?
The physical components of computer are called as hardware.
Q) What is software/program?
A software is a set of instructions that tells the computer what to do.
Example of computers
Desktop pc, laptop, tablet, smartphone, smart tv,server.
Q) Draw the block diagram of a computer system. Briefly write about the
functionality of each component.
A computer system primarily comprises of
1. Input devices
2. Central Processing Unit (CPU)
3. primary memory (memory)
4. secondary memory (storage devices)
5. Output devices
All these components function together as a single unit to deliver the desired output.
Block diagram of a computer system.
Secondary memory
Registers
1. Input Devices
The input devices are used to accept the data from the user.
Computer understand only two digit (0 and 1)
So, the input devices convert the input data into a digital form that is acceptable by the
computer system.
Some examples of input devices include keyboard, mouse, scanner, touch screen, etc.
2. Primary memory:
Data entered through input device is temporarily stored in the RAM of the computer system.
Example of primary memory: RAM, ROM,Cache memory
3. Secondary memory
Secondary memory are used to store the data and instructions permanently for future use.
Example of secondary memory: Harddisk,Floppy disk,Pen drive,CD,DVD
4. Central Processing Unit (CPU)
CPU is the electronic circuitry of a computer that carries out the actual processing and usually
referred as the heart of the computer.
It is commonly called processor or microprocessor .
The instructions and data are sent to CPU through software program.
The CPU consist of three components —
1) Arithmetic Logic Unit (ALU) 2) Control Unit (CU) 3) Registers
ALU performs all the arithmetic and logic operations as per the instruction in a program.
CU controls sequential instruction execution, interprets instructions, guides data flow by
sending signal to memory, ALU and input or output devices.
Registers: While processing, the CPU stores the data as well as instructions in a high –speed
memory called registers.
5. Output Devices
Output devices are used to display the information or result stored in memory(RAM).
Output devices converts digital information stored in RAM into human understandable form.
Examples of output devices
monitor, printer, plotter, projector, headphone, speaker,
How CPU works
1. The data and instruction are stored in memory(RAM).
2. The CPU then fetches the data and instruction from the memory and performs arithmetic
and logic operations as per the given instruction and stores the result back to memory.
Note 1:Specially designed braille keyboards are also available to help the visually impaired for
entering data into a computer.
Note 2: Data could be text ,picture ,image,audio,video.
8. Integrated Circuit(1970)
An Integrated Circuit (IC) is a silicon chip which contains entire electronic circuit on a very
small area.
The size of computer drastically reduced because of ICs.
Note: A punched card is a piece of stiff paper that stores digital data in the form of holes at
predefined positions.
The Von Neumann architecture:
It consists of a Central Processing Unit (CPU) for processing arithmetic and logical instructions,
a memory to store data and programs, input and output devices and communication
channels to send or receive the output data.
Electronic Numerical Integrator and Computer (ENIAC) is the first binary programmable
computer based on Von Neumann architecture.
Note: In 1965, Intel co founder Gordon Moore introduced Moore’s Law which predicted that the
number of transistors on a chip would double every two years while the costs would be halved.
3. Computer memory
A computer system needs memory to store the data and instructions for processing.
Whenever we talk about the ‘memory’ of a computer system, we usually talk about the main
or primary memory.
The secondary memory (also called storage device) is used to store data, instructions and
results permanently for future use.
Units of Memory
C) Cache Memory
Q) What is cache memory?
Ans: To speed up the operations of the CPU, a very small high speed memory called cache
is placed between the CPU and the RAM.
It keeps frequently accessed data from primary memory(RAM). RAM
RAM is faster than secondary storage, but not as fast as
a CPU( processor). Cache
. So, because of RAM, a CPU may have to slow down.
CPU
Q)Write the difference between primary memory and secondary memory.
(ii) Address bus to transfer addresses between CPU and main memory.
(iii) Control bus to communicate control signals between different components of a
computer.
Note:
1. Data bus,control bus ,address bus collectively make the system bus.
2. A data bus is bidirectional.
3. The control bus and address bus are unidirectional.
4. The address of the memory location of RAM that the CPU wants to read or write
from is specified in the address bus.
5. bus is also used for data transfer between a USB port and hard disk or between a
hard disk and main memory.
5. Microprocessors
Features of microprocessor
Microprocessors are classified on the basis of different features which include
1.) chip type 2) word size 3) memory size 4)clock speed 5)core
(1) Chip type could be LSI , VLSI, SLSI
(2) Word size is the maximum number of bits that a microprocessor can process at a time.
4 bit word, 8-bit word,16 bit word,64 bit word
(3) Memory Size: Depending upon the word size, the size of RAM varies. 1kB , 1MB , 16MB ,
4GB , 64GB.
(4) Clock Speed
Clock speed simply means the number of pulses generated per second by the clock inside
a computer.
The clock speed indicates the speed at which the computer can execute instructions.
Earlier, clock speed was measured in Hertz (Hz) and Kilohertz (kHz).
But with advancement in technology and chip density, it is now measured in Gigahertz
(GHz), i.e., billions of pulses per second.
(5) Cores
Core is a basic computation unit of the CPU.
Single core processor- performing only one task at a time.
multicore processor- performing multiple tasks
CPU with two core is called dual-core
CPU with four core is called quad-core
CPU with eight core is called octa-core
Note:
Table 1.2 lists different types of microprocessors along with their generation, time
period, and underlying technology since their inception in early 1970s.
Microcontrollers
Q) What is the difference between microcontroller and microprocessor?
Microcontroller Microprocessor
The microcontroller is a small computing device which But microprocessor that has
has a CPU, a fixed amount of RAM, ROM and other peripherals only a CPU on the chip
embedded on a single chip .
Example: washing machine, digital camera, remote
controller, microwave are few examples of microcontroller.
Because of the very small size of the microcontroller, it is embedded in another device
to perform a specific functionality.
For example, the microcontroller embedded in a fully automatic washing machine is
used to control the washing cycle (wash,rinse,spin) without any human intervention.
Q) What is information?
The processed data is called information.
(B) Data Storage: It is the process of storing the captured data for processing later.
(C) Data Retrieval: It involves fetching data from the storage devices, for its processing
Hardware
7) Software
Q) What is software?
Ans: The hardware is of no use on its own. Hardware needs to be operated by a set of
instructions. These sets of instructions are referred to as software.
Ans: A document or image stored on the hard disk or pen drive is referred to as a soft-copy.
Monitor displays soft copy.
1. System software
2. Programming tools
3. Application software.
1. Operating Systems(OS)
2. System utilities
3. Device drivers, etc.
System Software
Q) What is system software?
The software that provides the basic functionality to operate a computer by interacting directly
with its hardware is termed as system software.
Or
The software which makes the hardware functional is termed as system software.
A system software knows how to operate and use different hardware components of a
computer.
It provides services directly to the end user, or to some other software.
Examples of system software include
1) Operating systems 2) System utilities 3) Device drivers, etc.
(1) Operating System
The operating system is a system software that operates the computer.
An operating system is the most basic system software, without which other software
cannot work.
The operating system manages other application programs and provides access and security
to the users of the system.
Some of the popular operating systems are
1. Windows
2. Linux
3. Macintosh
4. Ubuntu
5. Fedora
6. Android
7. iOS.
(2) System Utilities Software used for maintenance and configuration of the computer
system is called system utility.
Some system utilities are shipped with the operating system for example
1. disk defragmentation tool
2. formatting utility
3. system restore utility
Another set of utilities are those which are not shipped with the operating system but
are required to improve the performance of the system, for example,
1. anti-virus software
2. disk cleaner tool
3. disk compression software, etc.
Note:
When it comes to the overall working of a computer system, the operating system does
the work.
But everyday new devices and components are being added to a computer system.
It is not possible for the operating system alone to operate all of the existing and new
devices, where each device has diverse characteristics.
The responsibility for overall control, operation and management of a particular device
at the hardware level is delegated to its device driver.
Programming Tools
In order to get some work done by the computer, we need to give instructions.
Computer languages are developed for writing these instructions.
It is important to understand here that computers and humans understand completely
different languages.
While humans are able to write programs in high-level language,
Computers understand machine language.
There is a continuous need for conversion from high level to machine level language, for
which translators are needed.
Also, to write the instruction, code editors (IDLE in Python) are needed.
We will briefly describe is here
1. The programming languages
2. language translators
3. Program development tools.
1. Machine language:
4) Machine dependent
5) Writing a code and finding error in machine language is difficult.
6) Example of machine language
1000100100101
1110101010111
2. Assembly language
To simplify the writing of code, assembly language was developed that allowed usage of
English-like words and symbols instead of 1s and 0s.
But one major drawback of writing a code in assembly language is that the code is
computer specific(machine dependent)
The code written for one type of CPU cannot be used for another type of CPU.
Not directly understood by computer
It needs assembler as a language translators.
Finding error in assembly language is easier than machine language
Example of assembly language:
MVI R1,10
MVI R2,20
ADD R1,R2
High level language uses English like sentences for instruction which follows a set of
rules.
High level languages are not directly understood by the computer.
The language translators like compiler and interpreter are needed to translate high-level
language codes into machine language code.
Examples of high level language include C, C++, Java, Python, etc.
Machine independent
Writing a code and finding error in high level language are easy.
Example
x=10
y=20
sum=x+y
print(sum)
Language Translators
Error(bug)
Language
translator
Source code Object code
As the computer can understand only machine language, a translator is needed to convert
program written in assembly or high level language to machine language.
The three types of language translators
1. Assembler
2. Compiler
3. Interpreter.
Q) What is assembler?
Ans: The translator used to convert the code written in assembly language to machine language
is called assembler.
Compiler Interpreter
Q) What is IDLE?
Ans: In order to simplify the program development, there are software called Integrated
Development Environment (IDLE) consisting of text editor, building tools and debugger.
An editor is a software that allows us to create a text file where we type instructions and
store the file as the source code.
Then an appropriate translator is used to get the object code for execution.
Q) What is Debugger?
Ans: Debugger, as the name implies, is the software to detect and correct errors in the source
code.
Application software:
Definition : Application software is meant for the user to perform specific task .
The software works on top of the system software is termed as application software.
There are again two broad categories of application software —
1. General purpose software
2. Customised application software.
A software can be
1. Freeware
2. Free and Open Source Software(FOSS)
3. Proprietary software
It is depending upon the terms and conditions of the person or group who has developed
and released that software.
Definition: The developers of some software provide their source code as well as the software
freely to the [Link] software is known as Free and Open Source Software (FOSS).
1. For example, the source code of operating system Ubuntu is freely accessible for
anyone .
Examples of FOSS include Python, Libreoffice, Openoffice, Mozilla Firefox, etc.
Definition:The Software which are freely available for use but source code may not be
available. Such software are called freeware.
Definition: When the software to be used has to be purchased from the vendor who has the
copyright of the software, then it is a proprietary software.
8) Operating System(OS)
Ans: A user interface is a software component which is a part of the operating system and whose
job is to take commands or inputs from a user for the operating system to process.
The objective of an operating system is to provide an interface to the user through which
the user can interact with the computer.
1) Command-based Interface
2) Graphical User Interface (GUI)
3) Touch-based Interface
4) Voice-based Interface
5) Gesture-based Interface
1)Command-based Interface:
Graphical User Interface (GUI) lets users run programs or give instructions to the
computer in the form of icons, menus and other visual options.
Examples of operating systems with GUI interfaces include Microsoft Windows, Ubuntu,
Fedora and Macintosh, among others.
3) Touch-based Interface
Today smartphones, tablets and PCs allow users to interact with the system simply using
the touch input.
Examples of popular operating systems with touch based interfaces are Android and iOS.
(smart phone)
Windows 8.1 and 10 (computers) also support touch-based interfaces.
4) Voice-based Interface
Users today can use voice-based commands to make a computer work in the desired
way.
Some operating systems which provide voice-based control to users include iOS (Siri),
Android (Google Now or “OK Google”), Microsoft Windows 10 (Cortana) and so
5) Gesture-based Interface
Some smartphones based on Android and iOS as well as laptops let users interact with the
devices using gestures like waving, tilting, eye motion and shaking.
Q) What is Operating System? Explain the functions of Operating System .(5 marks)
Definition:Operating system is an interface between the user and the computer and supervises
the working of computer system, i.e., it monitors and controls the hardware and software of the
computer system.
1. Process Management
2. Memory Management
3. File Management
4. Device Management
1) Process Management
Summary
1. A computing device, also referred as computer, processes the input data as per given
instructions to generate desired output.
2. Computer system has four physical components viz.
(i) CPU,
(ii) Primary Memory and Secondary memory
(iii) Input Device
(iv) Output Devices.
3. Computer system has two types of primary memories viz. (i) RAM, the volatile memory
(ii) ROM, the non-volatile memory.
4. System bus is used to transfer data, addresses and control signals between components
of the computer system.
5. A microprocessor is a small-sized electronic component inside a computer that performs
basic arithmetic and logical operations on data.
6. Microcontroller is a small computing device which has a CPU, a fixed amount of RAM,
ROM and other peripherals embedded on a single chip.
7. Software is a set of instructions written to achieve the desired tasks and are mainly
categorised as
i) System software
ii) Application software.
ii) Programming tools
8. Hardware of a computer cannot function on its own. It needs software to be operational
or functional.
9. Operating system is an interface between the user and the computer and supervises the
working of computer system, i.e., it monitors and controls the hardware and software of
the computer system.