UNIT 1 Notes
UNIT 1 Notes
Software are the logical components of the computer system. They are intangible in
nature (i.e. one cannot touch software). Software is the set of programs or instructions.
it helps in maintaining the computer system and performing the various tasks with the
computer system
Both hardware and software together make the computer system function.
Input Devices:
Devices that help user to give input to a computer are called Input Devices.
Name of input Image of Input Device Purpose of use
device
Keyboard Basic input device for key entry
Output Devices : Devices, which display the result of processing are known as Output
Devices.
Examples:
RAM (Random Access Memory): It is used to store data and instructions temporarily. It
retains data in it as long as the power is on. All the contents of RAM get cleared if power
supply is turned off.
Types of RAM:
• DYNAMIC RAM: It consists of capacitors and transistors. It uses electric charge
to store the data.
• STATIC RAM: It consists of flip-flops. It stores data in binary form. It has faster
access time compared to dynamic RAM.
ROM (Read Only Memory) : ROM stands for Read Only Memory. Data is permanently
stored in ROM. it contains instructions needed to start up the computer and load
operating system into RAM.
Types of ROM:
• PROM (Programmable Read Only Memory) : It can be programmed once.
• EPROM (Erasable Programmable Read Only Memory): It can be erased by
keeping ROM chip using Ultraviolet light. It can be reprogrammed..
• EEPROM (Electrically Erasable Read Only Memory): It can be erased by
electrical signal. It can also be reprogrammed.
CACHE MEMORY:
It is special memory used to compensate the speed difference between CPU (very fast)
and RAM (very slow). It stores the copies of frequently used data from RAM. Hence it
reduces the time required to access data from primary memory.
1) Hard Disk: It is the most commonly used storage device to store data on a
computer. It consists of multiple magnetic plates and heads to read and write data.
Magnetic plates are further divided into tracks and sectors to store data. Maximum
capacity of hard disk is 15TB.
2) Compact Disk (CD): it is an optical disk to store data. it have a storage capacity
of 700 MB. There are three types of CDs:
➢ CD-ROM (Compact Disk Read Only Memory): These are pre-recorded CDs
provided by manufacturers. Example: CDs containing softwares, games,
ebooks etc.
➢ CD-R (Compact Disk Recordable): Data can be recorded on these CDs only
once.
➢ CD-RW (Compact Disk Rewritable): These types of CDs can be erased and
recorded multiple times.
3) Digital Versatile Disk (DVD): it is an optical disk to store data and have astorage
capacity of upto 17 GB. There are three types of DVDs:
➢ DVD-ROM (Digital Versatile Disk – Read Only Memory): These are prerecorded
DVDs provided by manufacturers. Example: DVDs containingmovies etc.
➢ DVD-R (Digital Versatile Disk – Recordable): Data can be recorded on these
DVDs only once.
➢ DVD-RW (Digital Versatile Disk – Rewritable):These types of DVDs can be
erased and recorded multiple times.
4) Blu Ray Disk: it is optical disk that can store HD (High Definition) videos and data.
They can store up-to 128 GB of data.
5) Pen Drive : It is also called Flash memory. It is a solid state memory that can store
more than 128GB of data.
TYPES OF SOFTWARE:
Software is defined as a collection of programs which are used for different purposes.
Utility Software :
These softwares are used to take backup, remove outdated file, recover data and other
tasks that assist in smooth operation of computer.
Examples : Anti-Virus , Disk Defragmentation, Disk Clean, Backup, etc.
Device Driver: A device driver is a particular form of software application that allows
one hardware device to interact with another hardware device .A device driver may also
be called a software driver. Example connecting a PC to a printer.
➢ Process Management:- The operating system takes care of the allotment of CPU
time to different processes. it can create and delete processes. It also provides
mechanism for communication among processes. This deals with management of
the Central Processing Unit (CPU). This is known as scheduling.
➢ Memory Management:- The CPU and the I/O devices interact with the memory.
When a program needs to be executed it is loaded onto the main memory till the
execution is complete. Thereafter that memory space is freed and is available for
other programs. The common memory management techniques used by the
operating system are Partitioning and Virtual Memory. Operating System allocates
and de-allocates memory to different softwares.
➢ File Management:- It manages storage, retrieval, naming, sharing, and protection
of files. It also manages the files, folders and directory systems on a computer. The
file manager of the operating system helps to create, edit, copy, allocate memory
to the file.
➢ Device Management: The Operating System communicates with hardware and
the attached devices and maintains a balance between them and the CPU. This is
all the more important because the CPU processing speed is much higher than that
of I/O devices. It is responsible allocation and de-allocation of the hardware
devices to different programs. In order to optimize the CPU time, the operating
system employs two techniques - Buffering and Spooling.
➢ I/O System Management: It takes care of allocation and de-allocation of
Input/Output devices to different programs.
➢ Single User OS: It is used on a standalone single computer for performing a single
task. Operating systems for Personal Computers (PC) are single-user OS. Single
user OS are simple operating system designed to manage one task at a time. MS-
DOS is an example of single user OS.
➢ Multiuser OS is used in mini computers or mainframes that allow same data and
applications to be accessed by multiple users at the same time. The users can
also communicate with each other. Example: -Linux and UNIX OS
➢ Multiprocessing OS have two or more processors for a single running process.
Processing takes place in parallel and is also called parallel processing. Linux,
Example: UNIX and Windows 7 OS.
➢ Time sharing Operating System: It allows execution of more than one tasks or
processes concurrently. For this, the processor time is divided amongst different
tasks. This division of time is also called time sharing. Example : Windows 95
➢ Real Time Operating System: It is a multitasking operating system designed for
real time applications like robotics.
➢ Distributed Operating System: On a network data is stored and processed on
multiple locations. The Distributed Operating System is used on networks as it
allows shared data/files to be accessed from any machine on the network in a
transparent manner.
➢ Interactive Operating System: This is the operating system that provides a
Graphic User Interface (GUI) through which the user can easily navigate and
interact.
Computers are designed to work internally with numbers. In order to handle characters,
we need to choose a number for each character. The ability of a computer system to
understand signals or letters depends on its character set
The complete set of characters / symbols are called alphanumeric codes. The complete
alphanumeric code typically includes −
➢ 26 upper case letters (A-Z)
➢ 26 lower case letters (a-z)
➢ 10 digits (0-9)
➢ 7 punctuation marks
➢ 20 to 40 special characters
Following are some forms of character set or encoding schemes:
➢ ASCII
➢ ISCII
➢ UNICODE
ASCII Code: (American Standard Code for Information Interchange) most of the micro
computers, mini computers and some mainframe computers use this code.
ASCII code has two versions - ASCII – 7 and ASCII – 8.
➢ ASCII – 7 code use 7 bits for one signal or character. By this, 27 = 128 , different
characters can be used.
➢ ASCII – 8 code use 8 bits for one signal or character. By this, 28 = 256 , different
characters can be used.
ISCII: it stands for Indian Script Code for Information Interchange for Indian languages.
In order to facilitate the use of Indian languages on Computers, a common standard for
coding Indian scripts called ISCII was developed in India.
It is an 8-bit code representation for Indian languages which means it can represent
28=256 characters. It retains all 128 ASCII codes and uses rest of the codes 128 for
additional Indian language character set. Additional codes have been assigned in the
upper region (160– 255) for the ‘aksharas’ of the language. These codes are used for ten
Indian scripts - Devnagari, Punjabi, Gujarati, Oriya, Bengali, Assamese, Telugu, Kannada,
Malayalam and Tamil.
UNICODE: (UNIVERSAL CODE)
This is Universal Character Set which represents a signal or a character in a group of 32
bit. It has the capability to include signals and characters from all scripts of all languages
of world.
The Unicode Standard is the universal character encoding standard for written
characters and text. Each character or symbol is assigned a unique numeric value, largely
within the framework of ASCII. Earlier, each script had its own encoding system, which
could conflict with each other.
The purpose of Unicode is to −
provide a unique number for every character,
no matter what the platform,
no matter what the program,
no matter what the language.
Unicode characters are represented in one of three encoding forms:
➢ an 8-bit form (UTF-8)
➢ a 16-bit form (UTF-16)
➢ a 32-bit form (UTF32)
EXERCISES
(Multiple Choice Questions)
1. The physical and tangible components of the computer are termed as:
a) Hardware b) software c) firmware d) None
4. A computer program that converts an entire program into machine language is called-
a) Interpreter b) Compiler c) Linker d) Assembler
Answers
1 2 3 4 5 6 7 8 9 10
A A C B A B C A C A
Q. 4. What is a bit ? How bit, byte and nibbles are related to each other?
Ans. : A bit is the smallest elementary unit of memory, which can store one binary signal
either 0 or 1. A group of 8 bits is called a byte. A group of 4 bits is called a nibble.
❖ Micro Computers: These are also known as Personal Computers. These type of
digital computer uses a microprocessor (a CPU on a single chip) and include both
desktops and laptops. These computers can work on small volume of data, are very
versatile and can handle variety of applications. These computers are being used
as work stations, CAD, multimedia and advertising applications. Small portable
computers such as PDAs (Personal Digital Assistants) and tablets with wireless
computing technology are increasingly becoming popular.
❖ Main Frames: These computers are large and very powerful computers with very
high memory capacity. These can process huge databases such as census at
extremely fast rate. They are suitable for big organizations, banks, industries etc.
and can support hundreds of users simultaneously on the network.
❖ Super Computers: These are fastest and very expensive computers. They can
execute billions of instructions per second. These are multiprocessor, parallel
systems suitable for specialized complex scientific applications involving huge
amounts of mathematical applications such as weather forecasting.
Example:
Convert the Decimal number 125 into its Octal equivalent.
125 / 8 = 15 5
15 / 8 =1 7
1 / 8 =0 1
Answer: (175)8
Converting Decimal fraction to Octal
Example
Convert (0.75)10 to Octal
➢ Multiply the given fraction by 8.
➢ Keep the integer in the product as it is and multiply the new fraction in the
product by 8.
➢ Continue the process and read the integers in the products from top to bottom.
Given fraction 0.75
Multiply 0.75 by 8 6.00
Reading the integers from top to bottom 0.75 in decimal number system is 0.6 in octal
number system.
Example:
Convert the Hexadecimal number AB to its Decimal equivalent.
=A x161 + B x 160
=10 x 161 + 11 x 160
=160+11 = (171)10
Hexadecimal fraction to decimal Conversion
Example:
Convert (1E.8C)16 to decimal
1 E 8 C
= (1 x 16 )+ (14 x 16 )+ (8 x 16-1)+ (12 x 16-2)
1 0
= 16 + 14 + 0.5 + 0.04688
= (30.54688)10
We take a binary number in groups of 4 and use the appropriate hexadecimal digit in it’s
place. We begin at the rightmost 4 bits. If we are not able to form a group of four, insert
0s to the left until we get all groups of 4 bits each. Write the hexadecimal equivalent of
each group. Repeat the steps until all groups have been converted.
Example:
Convert the binary number 1000101 to its Hexadecimal equivalent.
0100 0101 (Note that we needed to insert a 0 to the left of 100.)
4 5
Answer: (45)16
In case of a fractional binary number form groups of four bits on each side of decimal
point. Then replace each group by its corresponding hexadecimal number.
Example:
Convert (11100.1010)2 to hexadecimal equivalent.
0001 1100 . 1010
1 C . A
Answer : (1C.A)16
HEXADECIMAL TO BINARY CONVERSION:
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
Exercises
(Multiple Choice Questions)
1. An organized way of representing numbers is called:
a) Character System b) Number system c) Integer system d) None
2. How graphics are represented by the computer?
a) Unicode b) ASCII c) Bitmap d) Binary
Answer :
1 2 3 4 5 6 7 8 9 10
B C B C C D B A B B
(Short Anwser Type Questions):
(b)
1 1 1 0 1 0
25 24 23 0 22 0 (111010)2=(60)10
(c)
1 0 1 0 1 1 1 1 1
28 0 26 0 24 23 22 21 1 (101011111)2=(351)10
4 D D
(10011011101)2=(4DD)16
BOOLEAN ALGEBRA
INTRODUCTION:-
X X’ ( ‘ means complement of x)
0 1
1 0
Truth Table
Truth table is a table that contains all possible values of logical variables/statements in
a Boolean expression.
No. of possible combination = 2n, where n=number of variables used in a Boolean
expression. The truth table for XY + Z is as follows:
Dec X Y Z XY XY+Z
0 0 0 0 0 0
1 0 0 1 0 1
2 0 1 0 0 0
3 0 1 1 0 1
4 1 0 0 0 0
5 1 0 1 0 1
6 1 1 0 1 1
7 1 1 1 1 1
TAUTOLOGY & FALLACY:
➢ If the output of Boolean expression is always True or 1 is called
Tautology.
➢ If the output of Boolean expression is always False or 0 is called Fallacy.
0 0 0
0 1 0
1 0 0
1 1 1
0 1 1
1 0 1
1 1 1
NOT gate: The NOT gate is an electronic circuit that gives a high output (1) if its input
is low. NOT gate takes only one input signal and produce only one output signal. The
output of NOT gate is complement of its input. It is also called inverter.
Input Output
A A’
0 1
NAND, NOR XOR, XNOR GATES
NAND gate :
The NAND gate or “Not AND” gate is the combination of two basic logic gates, the AND
gate and the NOT gate connected in series. The NAND gate and NOR gate can be called the
universal gates since the combination of these gates can be used to accomplish anyof
the basic operations. Hence, NAND gate and NOR gate combination can produce an
inverter, an OR gate or an AND gate.
The output of a NAND gate is high when either of the inputs is high or if both the inputs
are low. In other words, the output is always high and goes low only when both the inputs
are high. The logic NAND function is given by the Boolean expression:
Truth Table
Logical Circuit X Y Z
0 0 1
Logical expression: 0 1 1
X
1 0 1
Z Z = ~(X & Y) 1 1 0
nand(Z,X,Y)
Y
NOR gate: The NOR gate is a digital logic gate that implements l ogical NOR. A HIGH
output (1) results if both the inputs to the gate are LOW (0); if one or both input is HIGH
(1), a LOW output (0) results. NOR is the result of the negation of the OR operator. The
NOR gate is one of the universal gates. A NOR gate combines an OR gate and a NOT gate.
XOR gate : The Exclusive-OR gate or XOR gate is achieved by combining standard logic
gates together. XOR gate is used extensively in error detection circuits, computational
logic comparators and arithmetic logic circuits. The Exclusive OR gate gives an output
only if its two inputs are dissimilar, namely if one of them is high (one) and the other is
low (zero).
Truth Table
Logical Circuit X Y Z
Logical expression 0 0 0
Z=X^Y 0 1 1
X xor(Z,X,Y) 1 0 1
Z 1 1 0
Y
De Morgan's Theorem:
‘De Morgan’ was one of the Cambridge mathematicians. He recognized that the nature of
algebra is purely symbolic. He was very much aware of the possibility that some algebras
differ from ordinary algebra.
We use De Morgan’s theorems to solve the expressions of Boolean algebra. It is a very
powerful tool used in digital design. De Morgan’s theorems can be used when we want
to prove that the NAND gate is equal to the OR gate that has inverted inputs and theNOR
gate is equal to the AND gate that has inverted inputs. To reduce the expressions that have
large bars, we must first break up these bars.
DeMorgan’s First Theorem:
DeMorgan’s First theorem proves that when two (or more) input variablesare
AND’ed and negated, they are equivalent to the OR of the complements of the individual
variables. Thus the equivalent of the NAND function will be a negative-OR function,
proving that
and again we can show this operation using the following truth table.
X+X’ X.X’
X X’ X.X’
X X’ X + X’
0 1 0
0 1 1
1 0 0
1 0 1
Unit II: Computational Thinking and Programming – 1
Introduction to problem solving:
Problem solving is the process in which we identify a problem, developing
an algorithm for the identified problem and finally implementing the
algorithm to develop a computer program.
Steps for problem solving –
Problem solving starts with the identification of the problem and ends with
a complete solution in terms of a program or software. Key steps required
for solving a problem using a computer are-
i. Analysing the problem- we need to read and analyse the problem
statement to solvethe problem and decide the core functionalities that our
solution should have.
ii. Developing an Algorithm -It is essential to device a solution before
writing a program code for a given problem. Algorithm is a set of exact
steps which when followed ,solve the problem or accomplish the required
task. For a given problem, more than one algorithm is possible and we have
to select the most suitable solution.
iii. Coding- convert the algorithm into the format which can be
understood by the computer to generate the desired solution. Different
high level programming languages can be used for writing a program.