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

Class XI Ch1 Ch2 1 Basics of Computer Organization Types of Software

Uploaded by

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

Class XI Ch1 Ch2 1 Basics of Computer Organization Types of Software

Uploaded by

Bhavy Tamboli
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Page |1

Chapter 1: Basic of Computer Organisation


Introduction to computer system
A computer is an electronic device, under the control of instructions stored in its memory that can accept
data (input), process the data according to specified rules(Program) on processor & produces information
(output), and store the information for future use.

Data vs Information

Data are raw numbers or other findings which, by themselves, are of limited value.

Information is data that has been converted into a meaningful and useful context.

Computers are being used extensively nowadays in everyday life/every field In the form of laptop, desktop,
smartphone, gadgets etc.

Introduction to computer system


Advantages of computer
• Speed • Accuracy • Huge storage • Versatility • Tirelessness
Disadvantages of computer
• Data security issue • Computer crimes • Health risk • Bad impact on environment if not properly
disposed.
Any digital computer performs five functions in gross term.
1. Take data as input 2. Stores data/instructions 3. Process those stored data
4. Generate the output 5. Control all above steps

Computer Components Any kind of computers consists of HARDWARE AND SOFTWARE.


Hardware: Computer hardware is the collection of physical elements/parts that constitutes a computer
system, such as the monitor, mouse, keyboard, computer data storage, hard drive disk (HDD), system unit
(graphic cards, sound cards, memory, motherboard and chips), etc. all of which are physical objects & can
be touched.
Software :Software is a generic term for organized collections of computer data and instructions, often
broken into two major categories: system software that provides the basic non taskspecific functions of the
computer, and application software which is used by users to accomplish specific tasks.

Functional
components
of a computer
Page |2
Hardware
Input/Output Units
Input Unit A device through which data and programs from the outside world enter the computer system.
Output unit A device through which results stored in the computer memory are made available outside
the computer system.

Hardware
Central processing unit – Comprises three parts
1. Arithmetic/Logic Unit Performs basic arithmetic operations such as addition and subtraction Performs
logical operations such as AND, OR, and NOT. Most modern ALUs have a small amount of special storage
units called registers that can be accessed faster than main memory.
2. Control unit It organizes the computer to work computer as single unit & generates control signals for
various devices regarding read/write or execute operation
3. Memory A collection of cells, each with a
unique physical address Most computers are
byte-addressable Cell at address 11111110
contains 10101010
Memory Units – How much
memory is required for a
file/data/progam etc. is
measured by memory units.
Following are the memory
units.----------------

Memory Types

*Primary Memory
Random Access Memory (RAM) - is a type of volatile memory that is stores information on an integrated
circuit which hold the data mainly when the program is being executed by the CPU. As it is volatile in
nature so it can't store data permanently.
Page |3
Read Only Memory (ROM) - a non-volatile memory chip in which data are stored permanently, and can
not be altered by the programmer.

*Secondary Memory:
A storage, which suppliments the main memory of a computer. Often refferred to as secondary storage,
this section of computer's memory is nonvolatile and has low cost per bit stored, but it generally has an
operating speed far slower than that of the primary storage.
*Cache Memory: A small high speed memory, which is used to increase the speed of processing by making
current programs and data available to the CPU at a rapid rate.
Cache Memory - is the volatile computer memory which is very nearest to the CPU, so also called CPU
memory, and is between CPU and RAM all the Recent Instructions are Stored into the Cache Memory. It is
the fastest memory that provides high-speed data access to a computer microprocessor.
Difference between RAM and ROM

Secondary Storage Devices


Magnetic Tape mass auxiliary storage device
Secondary Storage Devices
Hard disk
Fixed Head HDD / Movable head HDD
Page |4
A hard disk is a set of stacked disks. Each disk has data recorded electromagnetically in concentric circles,
or tracks, on the disk.
Hard Drive Types
1. Parallel Advanced Technology Attachment (PATA)
2. Serial ATA (SATA)
3. Small Computer System Interface (SCSI)
4. Solid State Drives (SSD)
Upto 12 TB sized HDD is available in the market

Input Devices
Input devices can send data or information to a computer or another device.
Keyboard: It is an input device which sends data in to the computer. The data send depends on the key
pressed by the user.
Mouse: A mouse is a small handheld input device which controls a cursor in a graphical user interface. It
can move and select text, files, folders etc. on our computer according to the user input.
Scanner: Scanner optically reads and document, file or image and then changes it into digital signal and
sends to the computer.
OMR: optical mark recognition/ reader, is used to read marks on a document and send them to computer.
OCR: OCR stands for optical character Recognition, is an input device which reads printed text and sends
that to computer.
MICR: Magnetic Ink Character Reader is an input device which generally finds application is banks to
process cheques.
Microphone: it receives audio generated by some input source and sends it to a computer.
Webcam: it sends the captured images to a computer.
Graphics Tablets: This input device is used to draw using hand.
Trackballs: an upside down mouse ,encased within a socket. Is a cursor control device.
Barcode reader: It is used to read the barcode of various items and feed the same to computer.
Gamepad: Also known as joy pad is the input controller for video games.
Joystick: these input devices are used to control video games.

Output Devices
A device that can receive data from computer or another device and create output with that data is called
output device. Examples of various output devices are as :
Monitor: A monitor is an output device that is responsible for receiving data from a computer and
displaying that information as text or images for users to see.
Page |5
Speakers: Receives sound signal from a computer and then plays that sound signal and thus we hear songs
or music or any other audio.
Projector: Gets data from a computer and displays or projects the same information onto a screen or a
wall.
Projector cannot directly accept data from a user and send that data to another device.

Both Input / Output Devices


An input/output device is capable of receiving data from users or another devices and also sending data to
another devices or computers. That means a devices which can be used as both input device and output
device are called Input / Output (I/O) devices. Some examples of input/output devices are as:
USB drive: Also known as pen drive or flash stick works as both input device to computer and as an output
device. USB drives receive or save data from a computer as an input and it can also send data to a
computer or another device. Facsimile:
Facsimile or FAX machine has a scanner which is an input device and a small printer to provide output.
Modems: It is used to transmit and receive data from one computer to another computer or other devices
using telephone lines
CD-RW drives and DVD-RW drives: Receives data from a computer as input to copy onto and save into
writable CD or DVD. We also use CDs or DVDs to transfer data to a computer.
Touch Screen: Touch screen is both input and output device. By touching the screen input is provided and
being a screen, it is used as an output device.
Headsets: Headset consists of speaker as an output device and microphone functions as an input device.

Mobile System: A Mobile Phone is essentially a two-way radio, consisting of a radio transmitter and a radio
receiver.

Mobile Phone Components


1. A circuit board as brains of the phone 2. An antenna 3. A liquid crystal display (LCD)
4. A keyboard / A touch screen 5. A microphone 6. A speaker 7. A battery
Page |6
Different types of touchscreen
1.TFT (Thin Film Transistor) LCD display is used for better image quality and high resolution. Since they are
cheap to manufacture, they are found in budget phones usually.
2. IPS (In-Place Switching) LCDs are somewhat the advanced version of TFT LCDs in a way that they offer
improved displays and are more battery friendly. Hence, they are found in high end phones.
3. RESISTIVE AND CAPACITIVE There are generally two types of touchscreen LCD displays; Resistive and
Capacitive. Resistive touchscreen has two layers of conductive material with a small gap between them
while capacitive touchscreen consists of a layer of glass coated with transparent conductor. Capacitive
screens tend to be more responsive than resistive screens and are therefore found in high end phones
mostly.
4.OLED (Organic Light Emitting Diode) is a newer technology used in mobiles and monitors for display.
They are better than LCDs because they offer fast response times, wider viewing angles and higher
brightness. AMOLED (Active-Matrix Organic Light-Emitting Diode) and SUPER AMOLED displays are types of
OLED display.
OLED types include passive-matrix OLEDs, active-matrix LEDs and transparent OLEDs.

Smartphone Batteries and Their Types


Battery plays a huge role in any smartphone
Lithium Polymer batteries are the most advanced batteries available in the market right now. They are
made up of plastic instead of metal, which makes them usable on a smartphone of any type. The Lithium
Polymer batteries do not suffer from memory effect and offer 40 percent more battery life than others.
Lithium ion batteries are advanced and allow for a high charge capacity based on the size and weight of
the battery. However, these these are slightly expensive. these lithium ion batteries will not remember the
charge cycle, and as a result, the battery capacity will not be reduced.
Nickel Cadmium These are the cells that suffer from memory effect. And, the memory effect will result in
reducing the capacity of the battery and its lifespan as well.
Nickel Metal Hydride batteries are kind of an upgrade to the Nickel Cadmium batteries, and they boast of
the same size as the latter. Nickel Metal Hydride batteries offer 30 to 40 percent more battery juice than
the others
Battery Size : Measured in mAh. like 2000 mAh,4000 mAh etc.
Page |7
Chapter 2: Types of software
Software is an organized instructions/code written by programmers using any of various special computer
languages for specific purpose.
Types of software:
(1)System software: controls the basic functions of a computer & hides complexity of computer system
from user and application software. E.g. Operating System, Compiler, Interpret etc.
(2)Application software: It handles specialized/ common tasks a user wants to perform, such as banking,
hotel management, any data processing, word processing etc.
(3)Utility software: Which helps to manage, maintain and control computer resources. E.g. are antivirus
software, backup software and disk tools.
(1) System software OPERATING SYSTEM
An Operating System (OS) is a system program that controls and manages the computer
resources(resource manager) so that application software can run on it.
Example: Microsoft Windows, Solaris, Linux, MAC OS, Ubuntu, Apple’s iPhone OS etc.

HOW OPERATING SYSTEM WORKS


In any computer or mobile device, the operating system can be termed as the
back bone when it comes to software. This is because it has to be there before
other programs can be run. It works as a middleman (interface) between
machine and user. At the simplest level, an operating system does two things:
• It manages the hardware resources of the computer system. These resources
include such things as the processor, memory, disk space, etc.
• It provides a stable, consistent way for applications to deal with the hardware
without having to know all the details of the hardware.

FUNCTIONS OF OPERATING SYSTEM


• Processor management Loads, schedules and execute process/programs.
• Memory management Allocates /De-allocation of memory for program
execution.
• Device management Communicate and controls various I/O devices.
• Storage Management Manages and controls the storage device to provide space to program for
execution & data save.
• Application interface API/drivers provide a way for applications to make use of hardware
• User interface structure for interaction between a user and the computer

Process management
 Process a program in execution is known as process
 Handling of multiple processes at a time is known as process management.
Page |8
 Process States A process is typically in one of the three states
Running: has the CPU
Blocked: waiting for I/O or another thread
Ready to run: on the ready list, waiting for the CPU

TYPE OF OPERATING SYSTEM


* Single-User, Single Task Operating System: These operating systems work on single task & single
user at a time.E.g. DOS
* Single-User, Multi-Task Operating System: These operating systems works on more than one task
and process them concurrently at a time.E.g. windows 95 or later version of windows
* Multiuser Operating System: In these OS, multiple users are allowed to access the same data or
information at a time via a network. E.g. Unix,Linux,Windows7.
* Multiprocessing Operating System: Here, a single process runs on two or more processors. All
the processing and their management takes place in a parallel way, hence this OS are also called as
Parallel Processing. E.g. Linux, UNIX and Windows 7.
* Embedded Operating System: These are embedded in a device, which is located in ROM. E.g. OS
of microwaves, washing machine.
* Distributed Operating System: In these OS, the computers work in co-operation with each other.
SYSTEM SOFTWARE/PROGRAMMING SOFTWARES
Language processor/Programming tool
As the computer understand machine language(0/1) where as Humans understand High
level/Human Lang. Language Processors does the conversion task(high level to machine lang.)

These are of 3 types Language processors


Page |9
1.Compilers-It convert high-level language code to machine code in one session. It takes time
because it have to translate high-level code to lower-level machine language all at once and then
save the executable object code to memory.
2. Interpreters-It translates code like a compiler but reads the code and immediately executes that
code, and therefore it is faster than a compiler.
3. Assemblers-It translates an assembly language program into machine language.
One-pass assemblers go through the source code once. Any symbol used before it is defined will
require "errata" at the end of the object telling the linker or the loader to "go back" and overwrite a
placeholder which had been left where the as yet undefined symbol was used. Multi-pass
assemblers create a table with all symbols and their values in the first passes, then use the table in
later passes to generate code.

Difference between Compiler and Interpreter:


Sn. COMPILER INTERPRETER
1 Scans the whole program in one Translates program one statement at a time.
go.
2 the errors (if any) are shown at errors are shown line by line.
the end together
3 Main advantage of compilers is Due to interpreters being slow in executing the
it’s execution time object code, it is preferred less.
4 It converts the instructions into It doesn’t convert the instructions instead it directly
systematic code. works on source language.
5 E.g. C, C++, C# etc. E.g. Python, Ruby, Perl, MATLAB etc.

(2) Application software


* General Purpose application software These are ready to use software for daily use purpose e.g. word
processor, spread sheet, presention,DBMS etc.
* Specific Purpose application software Softwares which are designed for specific task e.g. Payroll, Hotel
Mgmt, Hospital Mgmt, Stock Mgmt etc.
(3) Utility software/System Utilities that assist OS in carrying out certain specialized tasks are called
utility software.
▪ Antivirus - An anti-virus scans the system for any virus and if detected, gets rid of it by deleting or
isolating it.
▪ Compression tools - Compression tools are utilities that assist operating systems in shortening files so
that they take less space.

(3) Utility software/System Utilities


▪ Disk Cleanup - Disk cleanup tools assist users in freeing up disk space.
P a g e | 10
▪ Disk Defragmenter - Disk defragmenter is a disk management utility that increases file access speeds by
rearranging fragmented files on contiguous locations.
▪ Backup - Backup utility enables backing up of files, folders, databases or complete disks.
▪ File management tools - Utility software providing regular file management tasks like browse, search,
update, preview, etc. are called file management tools.
▪ Restore – This utility restores the backup earlier taken.
▪ Device driver or hardware driver is a group of files that enable one or more hardware devices to
communicate with the computer's operating syCstem. Without drivers, the computer would not be able to
send and receive data correctly to hardware devices, such as a printer.
P a g e | 11
Chapter 7: Basics of Python Programming

Python 3.0 was released in 2008. Although this version is supposed to be backward
incompatibles, later on many of its important features have been back ported to be
compatible with version 2.7
Python Character Set
A set of valid characters recognized by python. Python uses the traditional ASCII character
set. The latest version recognizes the Unicode character set. The ASCII character set is a
subset of the Unicode character set.
Letters :– A-Z,a-z Digits :– 0-9 Special symbols :– Special symbol available over keyboard
White spaces:– blank space, tab, carriage return, new line, form feed Other characters:-
Unicode.
var1=‘Computer Science'
var2=‘Informatics Practices'
print(var1,' and ',var2,' )
Output :- Computer Science and Informatics Practices
raw_input() Function In Python allows a user to give input to a program from a keyboard
but in the form of string.
NOTE : raw_input() function is deprecated in python 3
e.g. age = int(raw_input(‘enter your age’))
percentage = float(raw_input(‘enter percentage’))
P a g e | 12
input() Function In Python allows a user to give input to a program from a keyboard but
returns the value accordingly.
e.g. age = int(input(‘enter your age’))
C = age+2 #will not produce any error
NOTE : input() function always enter string value in python 3.so on need int(),float()
function can be used for data conversion.
Indentation
Indentation refers to the spaces applied at the beginning of a code line. In other
programming languages the indentation in code is for readability only, where as the
indentation in Python is very important.
Python uses indentation to indicate a block of code or used in block of codes.
E.g.1
if 3 > 2:
print(“Three is greater than two!") # syntax error due to not indented
E.g.2
if 3 > 2:
print(“Three is greater than two!") # indented so no error

Token
Smallest individual unit in a program is known as token.
1. Keywords 2. Identifiers 3. Literals 4. Operators 5. Punctuators/Delimiters

1. Keywords: Reserve word of the


compiler/interpreter which can’t be used as
identifier.
Some Keywords --------------------

2. Identifiers: A Python identifier is a name


used to identify a variable, function, class,
module or other object.
Rules for naming identifiers:
* An identifier starts with a letter A to Z or a to z
or an underscore (_) followed by zero or more letters, underscores and digits (0 to 9).
P a g e | 13
* Python does not allow special characters
* Identifier must not be a keyword of Python.
* Python is a case sensitive programming language.
Thus, Rollnumber and rollnumber are two different identifiers in Python.
Some valid identifiers : Mybook, file123, z2td, date_2, _no
Some invalid identifier : 2rno,break,my.book,data-cs

Some additional naming conventions


1. Class names start with an uppercase letter. All other identifiers start with a lowercase letter.
2. Starting an identifier with a single leading underscore indicates that the identifier is private.
3. Starting an identifier with two leading underscores indicates a strong private identifier.
4. If the identifier also ends with two trailing underscores, the identifier is a language-defined special
name.

3.Literals: Literals in Python can be defined as number, text, or other data that represent
values to be stored in variables.
Example of String Literals in Python
name = ‘Johni’ , fname =“johny”
Example of Integer Literals in Python(numeric literal)
age = 22
Example of Float Literals in Python(numeric literal)
height = 6.2
Example of Special Literals in Python
Python literals have one special literal known as None. This literal in Python is used to signify that a
particular field is not created. Python will print None as output when we print the variable with no value
assigned to it. None is also used for end of lists in Python

Escape sequence/Back slash


character constants
P a g e | 14
4.Operators: Operators can be defined as symbols that are used to perform operations on
operands.
Types of Operators
1. Arithmetic Operators. 2. Relational Operators. 3. Assignment Operators.
4. Logical Operators. 5. Bitwise Operators 6. Membership Operators
7. Identity Operators

1. Arithmetic Operators Arithmetic


Operators are used to perform
arithmetic operations like addition,
multiplication, division etc.
e.g.
x=5
y=4
print('x + y =',x+y)
print('x - y =',x-y)

OUTPUT
('x + y =', 9)
('x - y =', 1)

Q1. Write a Python program to calculate GST amount on original amount.

2. Relational Operators/Comparison Operator Relational Operators are used to compare


the values.

e.g.
x = 101
y = 121
print('x > y is',x>y)
print('x < y is',x<y)

Output
('x > y is', False)
('x < y is', True)

3. Augmented Assignment Operators Used to assign values to the variables.


P a g e | 15

4. Logical Operators Logical Operators are used to perform logical operations on the given
two variables or values.
Operators Description Example
e.g.
And return true if both condition are true x and y
a=30
Or return true if either or both condition x or y
b=20
are true
if(a==30 and b==20):
not reverse the condition not(x> y)
print('hello')

Output :- hello

5.Bitwise operators
In Python, bitwise operators are used to performing bitwise calculations on integers. The
integers are first converted into binary and then operations are performed on bit by bit,
hence the name bitwise operators. Then the result is returned in decimal format.
Bitwise operators are used to change individual bits in an operand.
& Bitwise AND operator: Returns 1 if both the bits are 1 else 0
| Bitwise or operator: Returns 1 if either of the bit is 1 else 0.
~Bitwise not operator: Returns one’s complement of the number.
^Bitwise xor operator: Returns 1 if one of the bits is 1 and the other is 0 else returns
false.

Operators Description Example


6. Membership Operators return true if value exists in the sequence, else
in x and y
The membership false.
operators in Python are not in return true if value does not exists in the x or y
used to validate whether sequence, else false.
a value is found within a sequence such as such as strings, lists, or tuples.
P a g e | 16
E.g.
a = 22
list = [22,99,27,31]
In_Ans = a in list
NotIn_Ans = a not in list
print(In_Ans)
print(NotIn_Ans)

Output :-
True
False

7. Identity Operators Identity operators in Python compare the memory locations of two
objects.
Operators Description Example
e.g. Is returns true if two variables point the same a is b
object, else false
a = 34 returns true if two variables point the different
Is not a is not b
b=34 object, else false
if (a is b):
print('both a and b has same identity')
else:
print('a and b has different identity')
b=99
if (a is b):
print('both a and b has same identity')
else:
print('a and b has different identity')

Output :-
both a and b has same identity
a and b has different identity

Operators
Precedence :
Highest precedence
to lowest
precedence table.
Precedence is used
to decide ,which
operator to be taken
first for evaluation
when two or more
operators comes in
an expression.
P a g e | 17
Punctuators/Delimiters:
Used to implement the grammatical and
structure of a Syntax. Following are the
python punctuators. ------------

Barebone of a python program

a. Expression : - which is evaluated and produce result. E.g. (20 + 4) / 4


b. Statement :- instruction that does something. e.g a = 20 print("Calling in proper
sequence")
c. Comments : which is readable for programmer but ignored by python interpreter
i. Single line comment: Which begins with # sign.
ii. Multi line comment (docstring): either write multiple line beginning with
# sign or use triple quoted multiple line.
E.g. ‘’’this is my
first
python multiline comment
‘’’
d. Function a code that has some name and it can be reused.e.g. keyArgFunc in above
program
e. Block & indentation : group of statements is block. indentation at same level create a
block. e.g. all 3 statement of keyArgFunc function.
P a g e | 18
Variables: Variable is a name given to a memory location. A variable can consider as a
container which holds value. Python is a type infer language that means you don't need to
specify the datatype of variable.Python automatically get variable datatype depending
upon the value assigned to the variable.
Assigning Values To Variable
name = ‘python' # String Data Type
sum = None # a variable without value
a = 23 # Integer
b = 6.2 # Float
sum = a + b
print (sum)
Multiple Assignment: assign a single value to many variables
a = b = c = 1 # single value to multiple variable
a,b = 1,2 # multiple value to multiple variable
a,b = b,a # value of a and b is swapped

Variable Scope And Lifetime in Python Program


1. Local Variable
def fun():
x=8
print(x)
fun()
print(x) #error will be shown

2. Global Variable
x=8
def fun():
print(x) # Calling variable ‘x’ inside fun()
fun()
print(x) # Calling variable ‘x’ outside fun()

Concept of L Value and R Value in variable


Lvalue and Rvalue refer to the left and right side of the assignment operator. The Lvalue
(pronounced: L value) concept refers to the requirement that the operand on the left side
of the assignment operator is modifiable, usually a variable. Rvalue concept fetches the
value of the expression or operand on the right side of the assignment operator.
example:
amount = 390
The value 390 is pulled or fetched (Rvalue) and stored into the variable named amount
(Lvalue); destroying the value previously stored in that variable.
P a g e | 19
Dynamic typing
Data type of a variable depend/change upon the value assigned to a variable on each next
statement.
X = 25 # integer type
X = “python” # x variable data type change to string on just next line
Now programmer should be aware that not to write like this:
Y = X / 5 # error !! String cannot be divided

Constants
A constant is a type of variable whose value cannot be changed. It is helpful to think of
constants as containers that hold information which cannot be changed later.
In Python, constants are usually declared and assigned in a module.
Here, the module is a new file containing variables, functions, etc. which is imported to the
main file. Inside the module, constants are written in all capital letters and underscores
separating the words.
Create a constant.py:
PI = 3.14
Create a main.py:
import constant
print(constant.PI)
Note: In reality, we can not create constants in Python. Naming them in all capital letters is
a convention to separate them from variables, however, it does not actually prevent
reassignment, so we can change it’s value.

Input and Output:


print() Function In Python is used to print output on the screen.
Syntax of Print Function - print(expression/variable)
e.g.
print(122)
Output :- 122
print('hello India')
Output :- hello India
P a g e | 20

You might also like