0% found this document useful (0 votes)
2 views42 pages

XI CS VOLUME I NOTES

The document outlines the curriculum for a computer science course, covering fundamentals of computers, operating systems, algorithmic problem solving, and various computer components. It details the generations of computers, data processing, hardware and software distinctions, and the booting process. Additionally, it includes definitions and explanations of key concepts such as data, information, input/output devices, and number systems.

Uploaded by

junaidhahmed29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views42 pages

XI CS VOLUME I NOTES

The document outlines the curriculum for a computer science course, covering fundamentals of computers, operating systems, algorithmic problem solving, and various computer components. It details the generations of computers, data processing, hardware and software distinctions, and the booting process. Additionally, it includes definitions and explanations of key concepts such as data, information, input/output devices, and number systems.

Uploaded by

junaidhahmed29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Chapter Dept.of C.S.

,RMKMHSS - 601206
Title Page
No.

UNIT I –FUNDAMENTALS OF COMPUTER AND WORKING WITH A TYPICAL


OPERATING SYSTEMS (WINDOWS & LINUX)

1 Introduction to Computers 3

2 Number Systems 7

3 Computer Organization 16

4 Theoretical Concepts of Operating System 21

Working with typical Operating System

Part-I Working with Windows


5 24 & 29
Part-II Working with Linux

UNIT II-ALGORITHMIC PROBLEM SOLVING

6 Specification and Abstraction 31

7 Composition and Decomposition 33

8 Iteration and recursion 37

2
Unit I Fundamentals of Computers CHAPTER
1
Introduction to Computers
1.Explain the Generations of Computers Sixth Generation In future
 Here, computers works based on Artificial Neural
Based on various stages of development, Networks.
computers can be divided into six different  Parallel and Distributed computing
generations.  Natural Language Processing (NLP) is a component of
First Generation 1942- 1955 Artificial Intelligence (AI).
Vacuum tubes were used
 It provides the ability to develop the computer
 Big in size program to understand human language.
 Consumed more power  Development of robotics
 Malfunction due to overheat  The explosive growth of Wide Area Networking
 Machine Language was used (WAN)
 Ex. ENIAC , EDVAC , UNIVAC 2.Write short note on sixth Generation computers.
Second Generation 1955- 1964  Here, computers works based on Artificial Neural
Transistors replaced Vacuum tubes Networks.
 Smaller compared to First Generation  Parallel and Distributed computing
 Generated Less Heat  Natural Language Processing (NLP) is a component of
 Consumed less power compared to first generation Artificial Intelligence (AI).
 Punched cards were used  It provides the ability to develop the computer
 First operating system was developed - Batch program to understand human language.
Processing and Multiprogramming Operating System  Development of robotics
 Machine language as well as Assembly language was  The explosive growth of Wide Area Networking
used. (WAN)
Third Generation 1964 -1975 3.What is a computer?
Integrated Circuits (IC) replaced Transistors  A Computer is an electronic device.
 Computers were smaller, faster and more reliable  It takes data as an input from the user.
 Consumed less power  processes it under the control of a set of
 High Level Languages were used instructions (called program),
Fourth Generation 1975-1980  Produces a result (output),
Microprocessor ( Very Large Scale Integrated Circuits  Saves it for future use.
(VLSI) ) 4.Define Data.
 Smaller and Faster  Data is defined as an un- processed collection of
 Microcomputer series such as IBM and APPLE were raw facts,
developed  The data is a fact about people, places or some
 Portable Computers were Introduced objects.
Fifth Generation 1980 – till date  It is an input of the computer.
Ultra Large Scale Integration (ULSI)
 It will not giving any meaningful message.
 Parallel Processing Ex. 134, 16 ‘Kavitha’, ‘C’
 Super conductors 5.Define Information
 Computers size was drastically reduced.  Information is defined processed collection of facts.
 Can recognize Images and Graphics  Information conveys some meaning .
 Introduction of Artificial Intelligence and Expert  Information is output of the computer .
Systems Ex. Vijay is 16 years old
 Able to solve high complex problems including
decision making and logical reasoning

3
6.Draw the components of computer (or) Working 14. Define control unit
model of computer. (or) Input- Process- Output Cycle  The control unit controls the flow of data
(IPO between the CPU, memory and I/O devices.
cycle).  It also controls the entire operation of a
computer.
15. What is the function of memory?
 Memory unit used to store the data and programs
temporarily or permanently
 There are two types of memory, they are primary
memory and secondary memory
7.What is Data Processing? 16. Define Output
 Conversion of data into information is called data  An Output Unit is any hardware component that
processing. conveys information to users in an understandable
8.What are Hardware and Software? form.Example: Monitor, Printer, Speaker, plotter etc
 Hardware is the physical component of a 17. Explain about Memory unit. Or Distinguish
computer between Primary and secondary memory.
Ex.motherboard, memorydevices,monitor,keyboard  There are two types of memory, they are
etc., primary memory and secondary memory.
 Software is the set of programs or instructions. primary memory secondary memory
Ex. System software ,Application store the data store the data
9.What are the important Components of a Computer? and programs permanently.
 Input unit , Central processing unit ,Output unit and temporarily
Memory unit It is volatile, It is non volatile, that
10.Define Input Unit. that is, the is, the content is
 Input unit is used to feed any form of data to the content is lost available even after
computer, when the power the power supply is
 Which can be stored in the memory unit for supply is switched off.
further processing. switched off.
 Example: Keyboard, mouse, etc. Ex. The Random Ex.Read Only
11.Define Central Processing Unit Access Memory Memory(ROM),Hard
 CPU is the major component which interprets (RAM) Disk, CD – ROM etc..
and executes software instructions. 19.List some types of Mouse
 It also control the operation of all other components Differentiate between Optical and Laser Mouse
such as memory, input and output units.  Mechanical Mouse , Optical Mouse and Laser Mouse
 It accepts data as input, process the data according Mechanical Mouse
to the instructions and provide the result as output.  A small ball is kept inside and touches the pad
12.What are the major components present in CPU? through a hole at the bottom of the mouse.
1. Control unit,  When the mouse is moved, the ball rolls.
2. Arithmetic and logic unit (ALU)  This movement of the ball is converted into signals
3. Memory unit and sent to the computer.
13.Write short note on Arithmetic and Logic Unit(ALU) Optical Mouse
 The ALU is a part of the CPU.  Measures the motion and acceleration of pointer.
 Here, various computing functions are performed  It uses light source to judge the motion of the
on data. pointer.
 The ALU performs arithmetic operations such as  Optical mouse has three buttons.
addition, Subtraction, multiplication, division and  Optical mouse is less sensitive towards surface.
logical operations. Laser Mouse
 The result of an operation is stored in internal  Measures the motion and acceleration of pointer.
memory of CPU.  It uses Laser Light to judge the motion of the
 The logical operations of ALU promote the pointer.
decision-making ability of a computer.  Laser Mouse is highly sensitive and able to work
on any hard surface.
18.Explain Some Important Input Devices. Bar Code :
Keyboard:  A Bar code is a pattern printed in lines of different
 Keyboard is the most common input device used thickness.
today.  The Bar code reader scans the information on
 The data and instructions are given as input to the the bar codes transmits to the Computer for
computer by typing on the keyboard. further processing.
 There are different set of keys available in the QR Code Reader: QR (Quick response) Code:
keyboard such as character keys, modifier keys,  The QR code is the two dimension bar code which
system and GUI keys, enter and editing keys, can be read by a camera .
function keys, navigation keys, numeric keypad Voice Input Systems:
and lock keys etc..  Microphone serves as a voice Input device.
Mouse:  It captures the voice data and send it to the
 Mouse is a pointing device used to control the Computer.
movement of the cursor on the display screen. Digital Camera:
 It can be used to select icons, menus, command  It captures images / videos directly in the digital
buttons or activate something on a computer. form.
 Some mouse actions are i) move, ii)click, iii)double  It uses a CCD (Charge Coupled Device) electronic
click, iv)right click, v)drag and drop. chip.
 Different types of mouse available are: Mechanical  It converts light rays into digital format.
Mouse, Optical, Laser Mouse, Air Mouse, 3D Touch Screen:
Mouse, Tactile Mouse, Ergonomic Mouse and  A touch screen is a display device that allows the
Gaming Mouse. user to interact with a computer by using the
Scanner: finger.
 Scanners are used to enter the information  It is an alternative to a mouse or keyboard.
directly into the computer’s memory.  Touch screens are used in computers, laptops,
 The scanner converts any type of printed or monitors, smart phones, tablets, ATM etc..
written 20.Explain Some Output Devices.
 Information including photographs into a digital Write the significant features of monitor
format. Monitor:
Fingerprint Reader /Scanner:  Monitor is the most commonly used output device
 Finger print Scanner is a fingerprint recognition to display the information.
device used for computer security,  Pictures on a monitor are formed with picture
 It is used in biometric technology. elements called PIXELS.
 It is a very safe and convenient device for security  Monitors are two types i) Monochrome ii) color
instead of using passwords  CRT (Cathode Ray Tube), LCD (Liquid Crystal
Track Ball: Display) and LED (Light Emitting Diodes) are the
 In Track ball user spins the ball in various directions types of monitor.
to navigate the screen movements.  Monitor works with the VGA (Video Graphics
Retinal Scanner: Array) card.
 It performs a retinal scan which is a biometric  It acts as an interface between the computer and
technique . display monitor.
Light Pen: Plotter:
 A light pen is a pointing device .  Plotter is an output device used to produce
 It is connected to a monitor. graphical output on papers.
 The tip of the light pen contains a light-sensitive  It uses single color or multi color pens to draw
element pictures.
 Which detects the light from the screen enabling Printers:
the computer to identify the location of the pen on  Printers are used to print the information on
the screen. papers.
Optical Character Reader:  Printers are divided into two main categories:
 It is a device which detects characters printed or • Impact Printers • Non Impact printers
written on a paper with OCR
 The Scanned document can be edited using a word
processor.
Differentiate between Impact and No Impact printers.  If these devices are ready, then the BIOS (Basic
Impact Printers Non-Impact Printers Input Output System) gets executed.
It prints with striking of do not use striking  This process is called Booting.
hammers or pins on mechanism for  Thereafter, a program called “Bootstrap Loader”
ribbon. printing. transfers OS from hard disk into main
It can print on multi- They use electrostatic memory(RAM).
part (using carbon or laser technology.  Now the OS gets loaded (Windows/Linux, etc.,)
papers) by using and will get executed.
mechanical pressure  Booting process is of two types.
It makes noise while It is silent while printing 1)Cold Booting 2) Warm Booting
printing Cold Booting:
Poor Quality and speed Good Quality and speed  When the system starts from initial state is called
Ex. Dot Matrix printers Ex. Laser printers , cold booting or Hard Booting.
, Line matrix printers Inkjet printers  Booting process initiate by pressing Power button.
Laser Printers  All diagnostic tests could be carried out in this
 Laser printers mostly work with similar technology process.
used by photocopiers. Warm Booting:
 It makes a laser beam scan back and front across  When the system restarts or the system does not
a drum inside the printer, make up a pattern. start from initial state is called Warm Booting or Soft
 It can produce very good quality of graphic images. Booting
 The resolution range is around 1200 dpi.(Dots per  Booting process initiate by pressing Reset button.
inch).  All diagnostic tests need not be carried out in this
 Approximately it can print 100 pages per case.
minute(PPM).  There are chances of data loss and system damage
Inkjet Printers: as the data might not have been stored properly.
 Inkjet printers work by spraying ionised ink at a sheet 22.Characteristics of a computer
of paper.
 They use the technology of firing ink by heating it. The computer characteristics are
 An Inkjet printer can spread millions of dots of ink at  It gives the desired output at a very fast rate and
the paper every single second. accurate.
 Inkjet Printers use colour cartridges which combined  Computers are very versatile as they do a lot of
Magenta, Yellow and Cyan inks. different tasks.
 A black cartridge is used for monochrome output.  It can store and retrieve data
 The speed of Inkjet printers generally range from 1-  It works based on instructions.
20 PPM (Page Per Minute).
Speakers: 23. Applications of computer:
 Speakers produce voice output (audio) . The various applications of computer are,
 This has become very common in places like  Business
airlines, schools, banks, railway stations, etc..  Education
Multimedia Projectors:  Banking
 Multimedia projectors are used to produce  Communication
computer output on a big screen.  Weather forecasting,
 These are used to display presentations in meeting  Booking airlines, railway or movie tickets
halls or in classrooms. Games
21.Booting of computer
 When a computer is switched on, there is no
information in its RAM.
 In ROM, the pre-written program called POST
(Power on Self Test) will be executed first.
 This program checks if the devices like RAM,
keyboard, etc., are connected properly and ready to
operate.
Unit I Fundamentals of Computers CHAPTER
2
Number Systems
1.What is Data? 9.How speed of computer is described?
 The speed of a computer depends on the number of
 Data is defined as an un- processed collection of bits it can process at once.
raw facts,  For example, a 64- bit computer can process 64-bit
 The data is a fact about people, places or some numbers in one operation
objects.  While a 32-bit computer break 64-bit numbers down
 suitable for communication, interpretation or into smaller pieces, making it slower.
processing. 10.What is radix of a number system? Give example
 It is an input of the computer. What are the different types of Number System?
 It will not giving any meaningful message.  Radix or base is number of digits in each number
Ex. 134, 16 ‘Kavitha’, ‘C’ system.
2.Define Bit or What is the basic unit of data?  Each number system is uniquely identified by its base
 A bit is the short form of Binary digit. value or radix.
 Which can be ‘0’ or ‘1’.  Radix or base is the general idea behind positional
 It is the basic unit of data in computers. numbering system.
3.Define nibble  A numbering system is a way of representing
 A nibble is a collection of 4 bits (Binary digits). numbers. They are,
4.Define Byte. What is the basic unit of memory size?  Decimal number system( Base Value 10 )
 A collection of 8 bits is called Byte. 0,1,2,3,4,5,6,7,8,9
 A byte is considered as the basic unit of measuring  Binary number system( Base Value 2 )0,1
the memory size in the computer.  Octal number system( Base Value 8 )
5.Define Word length 0,1,2,3,4,5,6,7
 Word length refers to the number of  Hexadecimal number system( Base Value 16)
bits processed by a Computer’s CPU. 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
 Ex. 8bits, 16 bits, 32 bits and 64 bits 11. Explain 1’s Complement representation.
6.How Computer memory is represented?  Used to represent signed numbers.
 Computer memory (Main Memory and Secondary  This is for negative numbers only.
Storage)is normally represented in terms of KiloByte Step 1:Convert given Decimal number
(KB) or MegaByte (MB). into Binary
 In binary system, 1 KiloByte represents 1024 bytes Step 2: Check if the binary number
that is 210 . contains 8 bits , if less add 0 at the
7.How computers are handle the data? What is left most bit, to make it as 8 bits.
Machine language? Step 3: Invert all bits (i.e. Change 1 as 0
 Computer handles data in the form of ‘0’(Zero) and and 0 as 1)
‘1’ (One). 12.Write short note on Decimal Number system
 Any kind of data like number, alphabet, special  It consists of 0,1,2,3,4,5,6,7,8,9
character should be converted to ‘0’ or ‘1’ which can  The base is 10.
be understood by the Computer.  It is the oldest and most popular number system
 Computer understandable language is called used in our day to day life.
Machine language( 0 and 1)  The positional value as a power of 10.Ex. 28,11
8.How characters are represented in computer explain
with examples?
 Bytes are used to represent characters in a text.
 Different types of coding schemes are used to
represent the character set and numbers.
 The most commonly used coding scheme is the
American Standard Code for Information
Interchange (ASCII).
13.Write short note on Binary Number System 18.Decimal to Hexadecimal Conversion
 It consists of 0 and 1. The base is 2. Repeated Division by 16
 The positional value as a power of 2.
 The left most bit in the binary number is called as the
Most Significant Bit (MSB)
 It has the largest positional Value.
 The right most bit in the binary number is called as
the Least Significant Bit (LSB)
(31)10 = (1F )16

fractional Decimal to Binary
 It has the smallest positional Value..
19.Conversion of fractional Decimal ( 0.2 )to Binary

14.Write short note on Octal Number System


 It consists of 0,1,2,3,4,5,6,7
 The base is 8.
 Each octal digit has its own positional value as a
power of 8
15.Write short note on Hexa decimal Number System
 It consists of 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
 The base is 16.
 The positional value as a power of 16. Note:
16.Decimal to Binary Conversion  Fraction repeats, the product is the same as in the
Repeated Division by 2 first step.
 Write the integer parts from top to bottom.
 Hence (0.2) 10 =(0.00110011…) 2
19.Write procedure to convert fractional Decimal to
binary with an example.
By using repeated multiplication by 2 method .
Step 1:Multiply the decimal fraction by 2.
The integer part is either 0 or 1.
Sum of Powers of 2 method. Step 2: Multiply the fractional part of the previous
Given Number : 65 product by 2.
Step 3:Repeat Step 1until the same fraction repeats or
terminates (0).
Step 4: The final answer is to be written
from first integer part to the last integer part obtained.
Convert(98.46) to binary
98
49 0
24 1
12 0
17.Decimal to Octal Conversion
6 0
Repeated Division by 8 3 0
1 1 (98) = 1100010
0.46 x 2 = 0.92 = 0
0.92 x 2 =1.84 = 1
0.84 x 2 =1.68 =1
0.68 x 2 =1.36 = 1
0.36 x 2 = 0.72 = 0
0.72 x 2 =1.44 = 1
…. Top to Bottom 011101
(65)10 = (101)8 (98.46)10 = 1100010 . 011101……
Convert (250)10 into Binary, then convert that binary Conversion of fractional Binary to Decimal
number into octal 23.Conversion of fractional Binary to Decimal
Binary to Decimal Conversion equivalent
20.Convert (111011)2 into its equivalent decimal
number.
1 1 0 1 1
x x x x x x
25 24 23 22 21 20
= = = = = =
32 + 16 + 8 + 0 + 2 + 1 (59)
------------------------------------------------------
(111011)2 = (59)10
24.Convert the given Binary number
Conversion Table (11.011) 2 into its decimal equivalent
Hex Oct Dec Binary Integer part (11) 2 = 3
0 0 0 0 0 0 0
1 1 1 0 0 0 1
2 2 2 0 0 1 0
3 3 3 0 0 1 1
4 4 4 0 1 0 0
5 5 5 0 1 0 1
6 6 6 0 1 1 0
7 7 7 0 1 1 1
8 8 1 0 0 0
9 9 1 0 0 1 Octal to Decimal Conversion:
A 1 0 1 0 25.Convert (1265) 8 to equivalent Decimal number
B 1 0 1 1 Positional 83 82 81 80
C 1 1 0 0 Given
D 1 1 0 1 Weight 512 64 8 1
E 1 1 1 0 Number 1 2 6 5
F 1 1 1 1 (1265) 8 = 512 ×1 + 64×2 + 8×6 +1×5
Binary to Octal Conversion = 512 + 128 + 48 + 5
(1265) 8 = (693) 10
21.Convert (11010110)2 into octal equivalent number
Step 1: Group the given number into 3 bits from right to Octal to Binary Conversion
left. 26.Convert (6213) 8 to equivalent Binary number
011 010 110
Note: The left most groups have less than 3 bits, so 0 is
added to its left to make a group of 3 bits.
Step-2: Find Octal equivalent of each group
011 010 110
3 2 6
(11010110)2 = (326)8
Binary to Hexadecimal Conversion Hexadecimal to Decimal Conversion
27.Convert (25F) 16 into its equivalent Decimal
22.Convert (1111010110)2 into Hexadecimal number
number.
Step 1:Group the given number into 4bits from right
Weight 256 16 1
to left.
Positional
0011 1101 0110
Notation 16 2 16 1 16 0
Note: 0’s are added to the left most group
Given number = (2 5 F)16
To make it a group of 4 bits
(25F) 16 = 2×256 + 5×16 + 15×1
0011 1101 0110
= 512 + 80 +15
3 D 6
(25F) 16 = (607) 10
(1111010110)2 = (3D6) 16
Hexadecimal to Binary Conversion 34.We cannot find 1’s complement for (28) 10 . State
reason: Because 28 is a positive number.
28.Convert (8BC) 16 into equivalent Binary number This is for negative numbers only

Binary Arithmetic
Binary Addition Table

How to Representation for Signed Numbers in Binary


29.Define sign Bit.
 The left most bit in the binary number is called as the
Most Significant Bit (MSB)
35.Example: Add: 1011 2 + 1001 2
 It is also called sign bit or parity bit.
 If this bit is 0, it is a positive number
 if it 1, it is a negative number.
 A signed binary number has 8 bits,
 only 7 bits used for storing values (magnitude) or
data and the 1 bit is used for sign.
30.Define Signed Magnitude
 The simplest method to represent negative binary
numbers is called Signed Magnitude. 36.Perform Binary addition for the following: .
23 10 + 12 10
31.How Numbers are represented in Computers?
Step 1: Convert 23 and 12 into binary form
 Signed Magnitude representation
23 10111 in 8bits -00010111
Ex. +43 or 43 is a positive number
12 1100 -00001100
–43 is a negative number
 1’s Complement
23+12 =35 => 00100011
 2’s Complement
32.Explain 1’s and 2’s Complement representation.
Binary Subtraction
 Used to represent signed numbers.
 This is for negative numbers only.
Step 1:Convert given Decimal number
into Binary
Step 2: Check if the binary number
contains 8 bits , if less add 0 at the
left most bit, to make it as 8 bits.
Step 3: Invert all bits (i.e. Change 1 as 0
and 0 as 1)
2’s Complement representation
Step 1. Invert all the bits in the binary
sequence.
Step 2. Add 1 to (LSB).
Example
33.Ex.Find 1’s complement for (–24) 10
1’s
Binary value of 24 is 00011000
Invert all bits 11100111
2’s Complement represent of (-24) 10
Binary equivalent of +24: 11000
8bit format: 00011000
1’s complement: 11100111
Add 1 to LSB: +1
2’s complement of -24: 11101000
37.What are the encoding systems used for 42.Define Unicode
computer.?  This coding system is used in most of the
There are several encoding systems used for modern computers.
computer. They are,  This is 16 bit code and can handle 65536characters.
 BCD – Binary Coded Decimal  Unicode can handle Universal languages.
 EBCDIC – Extended Binary Coded Decimal  Unicode scheme is denoted by hexadecimal
Interchange Code numbers.
 ASCII – American Standard Code for Information
Interchange
 Unicode
 ISCII - Indian Standard Code for Information
Interchange

38.Define Binary Coded Decimal (BCD).


 This encoding system is not in the practice right now.
 This is 2 6 bit encoding system.
 This can handle 2 6 = 64 characters only.
39.Define American Standard Code for
Information Interchange (ASCII).
 This is the most popular encoding System
 This encoding system can handle English
characters only.
 This can handle 2 7 bit which means 128 characters..
 The binary representation of ASCII (7 bits) value
is 1000001
 The new edition (version) ASCII -8, has 2 8 bits and
can handle 256 characters ..
 The binary representation of ASCII (8 bits) value
is 01000001
 Each character has individual number.
The ASCII value for
 blank space is 32
 0 is 48.
 Thelower case alphabets is from 97 to 122 3.Convert the following Decimal numbers to its
 The upper case alphabets is from 65 to 90. equivalent Binary,Octal,Hexadecimal.
40.Extended Binary Coded Decimal Interchange Code 1)1920 2)255 3)126
(EBCDIC) 3)126
 It is 8 bit representation. 126 Divided by 2
 This coding system is formulated by International 127 -1
Business Machine(IBM). 63 -1
31 -1
 The coding system can handle 256 characters.
15 -1
 The input code in ASCII can be converted to
7 -1
EBCDIC system and vice - versa.
3 -1
41.Indian Standard Code for Information Interchange
1 -1
(ISCII)
(11111111)2 - Binary
 ISCII is the system of handling the character of
To Octal (By using Table) Ref.b.Pg.22
Indian local languages.
011 111 111
 It is a 8-bit coding system. 3 7 7
 Therefore it can handle 256 (2 8 ) characters. (377)8 - Octal
 It is recognized by Bureau of Indian Standards To Hexadec.
(BIS). 1111 1111
 It is integrated with Unicode. 15 15
(ff)16 - Hexadec.
4.Convert the given binary number into its equivalent
Decimal,Octal and Hexadecimal
1)101110101 2)10110 3)101011111

5.Convert the following octal numbers into Binary


numbers
1)472 2)145 3)347 4)6247 5)645
1)472 (Use table Method) Ref.b.Pg.22
4 7 2
100 111 010
(472)8 = (100111010)2
6.Convert the following Hexadecimal numbers to Binary
numbers
1)A6 2)BE 3)9BC8 D)BC9
EX.BC9 (Use table Method) Ref.b.Pg.22
B C 9
1011 1100 1001
(BC9)16 = (101111001001)2
7.Write the 1’s complement number and 2’s
compliment number for the following decimal numbers
1)22 2)-13 3)65 4)-46 5)255
2)-13
13
6 -1
3 -0
1 -1
Binary Equivalent of +13 =1101
8-bit format =00001101
1’scompliment =11110010
Add 1 to LSB = +1
2’s compliment of -13 = (11110011)2

8.Perform the following binary component


1)1010+1510 2)-1210 + 510 3)1410 – 1210
4)-210 – (-610)
-210 – (-610)
- 2 + 6 = 410 = (100)2
8- Bit = (00000100)2

a) Add 1101010 2 +101101 2


b) Subtract 1101011 2 - 111010 2
Part - II - Boolean Algebra
1.What is Boolean algebra?
 Boolean algebra is a mathematical discipline that is OR GATE
used for designing digital circuits in a digital
computer.
 It describes the relation between inputs
and outputs of a digital circuit.
2.Define Logical Operations:What are the basic logical
7.Explain about NOT operator
operators (fundamental operators)?
 The NOT Operator has one input and one output
The basic logical operations are
 The NOT operator inverts the input.
 AND, OR and NOT
Algebraic expression : Y = 𝐴̅
 Represented by dot ( . ), plus ( + ),
TRUTH TABLE
and by over bar / single apostrophe
respectively. A Y = 𝐴̅
3.Define TRUTH TABLE 0 1
 A truth table represents all the possible values of 1 0
logical variable (input) or statements along with all the NOT GATE
possible results(output) of given combination of
truth values.
4.What is Gate? What are the fundamental gates?
 Gate is a basic electronic circuit.
 It operates on one or more input signals to produce
8.Consider the following equation
an output signal.
D = A + (𝐵̅. C) Write truth table and Find the output of
 There are three fundamental gates namely AND, OR
D when inputs A=0,B=1,and C=0.
and NOT.
A B C 𝐵̅ (𝐵̅.C) D =A + (𝐵̅ .C )
5.Explain about AND operator
0 0 0 1 0 0
 The AND operator has two or more
0 0 1 1 1 1
input variables and one Output.
0 1 0 0 0 0
 The output is TRUE when all the Inputs are TRUE.
Algebraic expression : Y=A . B 0 1 1 0 0 0
TRUTH TABLE 1 0 0 1 0 1
A B Y=A.B 1 0 1 1 1 1
0 0 0 1 1 0 0 0 1
0 1 0 1 1 1 0 0 1
1 0 0 Result: D=0
1 1 1
AND GATE
9.What are derived gates
 The gates which are derived from fundamental gates
are called derived Gate.
6.Explain about OR operator  Ex. NAND ,NOR,XOR,XNOR etc…..
 The OR operator has two or more input variables and
10.Why the NAND and NOR gates are called universal
one output .
gate?
 The output is TRUE if at least one input is TRUE.
 NAND and NOR gates are called Universal gates,
Algebraic expression : Y = A + B
because the fundamental logic gates can be realized
TRUTH TABLE
through them
A B Y=A+B
0 0 0
0 1 1
1 0 1
1 1 1
11.Explain NOR Operator with an example
 The NOR is the combination of NOT and OR TRUTH TABLE
 The NOR is generated by inverting the output of an A B A.B Y = ̅̅̅̅̅
𝐴. 𝐵
OR operator. 0 0 0 1
Algebraic expression : Y= ̅̅̅̅̅̅̅̅
𝑨+𝑩 0 1 0 1
1 0 0 1
1 1 1 0
TRUTH TABLE
 The output is "false" if ALL inputs are "true",
A B A+B Y = ̅̅̅̅̅̅̅̅
𝐴+𝐵 otherwise, the output is "true"
0 0 0 1
0 1 1 0 LOGIC CIRCUIT
1 0 1 0
1 1 1 0

LOGIC CIRCUIT

LOGIC SYMBOL

LOGIC SYMBOL

14.Explain Bubbled OR Gate


̅ + 𝑩
Algebraic expression : C= 𝑨 ̅

12.Explain Bubbled AND Gate LOGIC CIRCUIT

 If we compare the truth tables of the LOGIC SYMBOL


bubbled AND gate with NOR gate, they are
identical.
 So the circuits are interchangeable
TRUTH TABLE
 TRUTH TABLE
A B ‘A ‘B Y=𝑨̅ .𝑩
̅
0 0 1 1 1 A B 𝐴̅ 𝐵̅ Y = 𝐴̅ + 𝐵̅
0 1 1 0 0 0 0 1 1 1
1 0 0 1 0 0 1 1 0 1
1 1 0 0 0 1 0 0 1 1
1 1 0 0 0
Algebraic expression : ̅̅̅̅̅̅̅̅̅
𝑨+𝑩 =𝑨 ̅ .𝑩
̅
De Morgan's First theorem – Proved NAND = BUBBLED OR
13.Explain NAND operator with Truth Table.  If we compare the truth tables of the
 The NAND is the combination of NOT and AND bubbled OR gate with NAND gate, they are
 The NAND is generated by inverting the output of identical.
an AND operator  So the circuits are interchangeable.
Algebraic expression :Y = ̅̅̅̅̅
𝐴. 𝐵
Algebraic expression : ̅̅̅̅̅̅ ̅+𝑩
𝑨. 𝑩 = 𝑨 ̅
De Morgan's Second theorem – Proved.
How AND and OR can be realized using NAND and NOR
gate. (Ref. 11,12,13,14)
Prove and explain De Morgan ‘s theorem (ref.
11,12,13,14)

15.Explain XOR Gate with Truth Table.


 It is called exclusive - OR gate
 The output is TRUE if the inputs are different,
 The output is FALSE if the inputs are the same
In boolean algebra, ⊙ or "included dot" stands for the
XNOR.
Therefore, C = A ⊙ B
Logic Symbol

̅ .B + A . 𝑩
Algebraic expression : C = 𝑨 ̅
17.Prove the following Absorption law by using Truth
TRUTH TABLE Table A + (A . B) = A
A B 𝐴̅ 𝐵̅ 𝐴̅ . B A . 𝐵̅ 𝐴̅ . B + A . 𝐵̅
0 0 1 1 0 0 0 A B A.B A+(A.B)
0 1 1 0 1 0 1 0 0 0 0
1 0 0 1 0 1 1 0 1 0 0
1 1 0 0 0 0 0 1 0 0 1
In boolean algebra. In boolean algebra ⊕ or "encircled 1 1 1 1
plus"stands for the XOR Hence, A + (A . B) = A is proved
Therefore 18.Write De Morgan’s laws
C = A ⊕B First Law : ̅̅̅̅̅̅̅̅̅
𝑨+𝑩 =𝑨 ̅ .𝑩
̅
Second Law ̅̅̅̅̅̅ ̅
: 𝑨. 𝑩 = 𝑨 + 𝑩 ̅
Logic Symbol
19. Write the associative laws?
1)A + (B + C) = (A + B) + C
2) A . (B . C) = (A . B) . C

16.Explain XNOR Gate with Truth Table


 It is also called exclusive - NOR gate
 It is a combination XOR gate followed by an
inverter.
 The output is FALSE if the inputs are different,
 The output is TRUE if the inputs are the same
TRUTH TABLE

A B 𝐴̅ 𝐵̅ 𝐴̅ .B A . 𝐵̅ 𝐴̅ .B + A .𝐵̅ ̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿̿
𝐴 . B + A . 𝐵̅ .
0 0 1 1 0 0 0 1
0 1 1 0 1 0 1 0
1 0 0 1 0 1 1 0
1 1 0 0 0 0 0 1
̅ .B + A . 𝑩
Algebraic expression : C = 𝑨 ̅
Unit I Fundamentals of Computers CHAPTER
3
Computer Organization
1.Differentiate between computer architecture and Data bus
Computer organization  A data bus is used to transfer data between the
 Computer Architecture deals with the engineering memory and the CPU.
considerations involved in designing a computer.  The Memory Data Register(MDR) is connected with
 Computer Organization deals with the hardware the data bus
components that are transparent to the Programmer.  The data bus is bidirectional
2.What is microprocessor? Define microprocessor. Control bus
 The microprocessor is a programmable  The control bus controls both read and write
multipurpose silicon chip. operations.
 It is driven by clock pulses. 5. What are the parameters which influence the
 It accepts input as a binary data and after characteristics of a microprocessor? Or
processing, it provides the output data as per the What are the Characteristics of Microprocessors.
instructions stored in the memory. Explain
There are three important Characteristics of
Microprocessors. They are,
a) Clock speed
b) Instruction set
c) Word size
3.What are the main units of Microprocessor? Explain Clock speed
Microprocessor is made up of 3 main units. They are,  Every microprocessor has an internal clock.
1. Arithmetic and Logic unit (ALU)
 It regulates the speed of executing instructions.
2. Control unit
 The speed at which the microprocessor executes
3. Registers (Internal Memory)
instructions is called the clock speed.
Arithmetic and Logic unit (ALU):
 Clock speed is measured in MHz (Mega Hertz) or in
 To perform arithmetic and logical instructions
GHz (Giga Hertz).
based on computer instructions.
Instruction set
Control unit:
 Instruction is a command which is given to a
 To control the overall operations of the
computer to perform an operation based on data.
computer through signals.
 Basic set of machine understandable instructions to
Registers (Internal Memory):
execute by microprocessor is called an instruction
 They are used to hold the instruction and data for
set.
the execution of the processor.
Types of operations
4.What is System Bus?
 Data transfer
 A bus is a collection of wires used for communication
 Arithmetic operations
between the Microprocessor and other devices.
 Logical operations
There are 3 types of buses, they are
1. Address bus  Control flow
2. Data bus  Input/output
3. Control bus Word size
Address bus  The number of bits that can be processed by a
 The Address bus is used to point a memory location. processor in a single instruction is called its word
 The Memory Address Register(MAR) is connected size.
with the address bus. 6.What is an Instruction?
 The address bus is unidirectional.  Instruction is a command which is given to a
computer to perform an operation based on data.
7.How to determine architecture of the
microprocessor?
 Total number of input and output pins determine
the architecture of the microprocessor
8.Differentiate between Memory Data Register(MDR)  The read operation transfers the data(bits) from
and Memory Address Register (MAR) word to Memory Data Register.
MDR MAR  The write operation transfers the data(bits) from
It keeps the data It keeps the address of Memory Data Register to word.
data 11.How microprocessors are classified ?
It is connected with It is connected with the  based on the Data Width
the data bus address bus  based on Instruction Set
The word in the ALU places the address of 12.How Microprocessors are classified based on the
RAM has the same the memory to be fetched Data Width or size of the data?
size as MDR into MAR  Depending on the data width, microprocessors can
8. What is the use of program counter? Or What is a process instructions.
Program counter? It can be classified as follows:
 The Program Counter (PC) is a special register in the • 8-bit microprocessor
CPU which always keeps the address of the next • 16-bit microprocessor
instruction to be executed. • 32-bit microprocessor
9.Explain how Data communication between CPU and • 64-bit microprocessor
memory. Or 14.What are the types of microprocessors based on
How the read and write operations are performed by a instruction set?
processor? Explain  Reduced Instruction Set Computers (RISC)
 Complex Instruction Set Computers (CISC)
 The Central Processing Unit(CPU)has a Memory Data Reduced Instruction Set Computers (RISC)
Register (MDR) anda Memory Address Register  They have small set of highly optimized instructions.
(MAR).  Complex instructions are implemented using
 MDR keeps the data . simple instructions.
 MAR keeps the address of data.  Ex.Pentium IV, Intel P6, AMD K6 and K7
 The Data bus is connected with MDR. Complex Instruction Set Computers (CISC)
 They support hundreds of instructions.
 The address bus is connected with MAR.
 These Computers can accomplish a wide variety of
 The word in the RAM has the same size as MDR.
tasks, making them ideal for personal computers.
 If the processor is an 8-bit processor ,The size MDR is  Ex.Intel 386 & 486, Pentium, Pentium II and III, and
eight 8 bits. Motorola 68000.
 The data bus has eight parallel wires to transfer data 15.Write short note on Memory access.
either MDR to word or word to MDR.  Computer memory is the storage space in the
 The control line is labeled asR/W , which becomes 1 computer, where dataand instructions are stored.
means READoperation and 0 means WRITE  There are two types of accessing methods to access
operation. (read or write) the memory.
 They are sequential access and random access.
16.What are the methods of accessing memory?
 There are two types of accessing methods to access
(read or write) the memory.
 They are sequential access and random access
Sequential access,
 The memory is accessed in an orderly manner
from starting to end.
Random access,
 Any byte of memory can be accessed directly
without navigating through previous bytes.

 The read operation transfers the data(bits) from


word to Memory Data Register.
 The write operation transfers the data(bits) from
Memory Data Register to word.

10.Define Read and Write operation.


17.Write the types of RAM. Programmable Read Only Memory (PROM)
There are two basic types of RAM  It is a non-volatile memory.
• Dynamic RAM (DRAM)  Data can be written only once.
• Static RAM (SRAM)  Content cannot be erased.
Dynamic RAM (DRAM)  PROM is manufactured as a blank memory,
 Dynamic RAM being a common type needs to  PROM programmer or a PROM burner is used to
berefreshed frequently. write data to a PROM chip.
 Slower than SRAM  The process of programming a PROM is called
 Less expensive. burning the PROM.
Static RAM (SRAM) Erasable Programmable Read Only Memory (EPROM)
 Static RAM needs to be refreshed less often.  It is a non-volatile memory.
 It is faster.  Data can be written many times.
 It is expensive .  The content can be erased using ultraviolet rays.
18.What is bit and byte?  EPROMs are used widely in personal computers.
 The smallestunit of information that can be stored in Electrically Erasable Programmable Read Only
the memory is called as a bit. Memory (EEPROM)
 The memory can be accessed by a collection of 8  It is a non-volatile memory.
bits which is called as a byte.  It can be erased by exposing it to an electrical
 The bytes are referred by ‘B’. charge.
19.Differentiate between RAM and ROM  It is slower in performance.
RAM ROM
It is volatile memory It is non-volatile memory Differentiate between EEPROM and PROM ref.above q
It is the place in a ROM stores critical Differentiate between EEPROM and EPROM ref.above q
computer where the programs during the Which source is used to erase the content of a EPROM.
Operating System, manufacturing process ref.above q
Application itself i.e booting 23.How PROM differ from ROM?
Programs and the  The PROM differs from ROM.
data in current use  PROM is manufactured as a blank memory,
are kept temporarily  ROM stores critical programs during the
It allows both read It cannot be modified or manufacturing process itself.
and write . removed and can only be  PROM programmer or a PROM burner is used to
read. write data to a PROM chip.
Stores temporarily Stores permanently  ROM content cannot be modified or removed
When the power is It retains its contents even 24.Define Cache Memory.
turned off, when the computer is  The cache memory is a very high speed and
whatever data turned off. expensive memory
stored in  It is closer to CPU.
RAM is lost.  The arrangement of cache memory between the
They are two types They are CPU and the main memory.
SRAM,DRAM PROM,EPROM,EEPROM 25. Define Access Time.
20.Write short note on Read Only Memory (ROM).  How quickly the memory can respond to a read /
21.Write short note on Random Access Memory write request is called as Access Time.
(RAM). 26.List some secondary storage Devices.
22.What are the types of ROM? Explain. 1.Hard Disk 2.Compact Disc (CD)
 Programmable Read Only Memory (PROM) 3.Digital Versatile Disc (DVD) 4.Flash Memory Devices.
 Erasable Programmable Read Only Memory 5. Blu-Ray Disc
(EPROM) 27.Write short note on Hard disk.
 Electrically Erasable Programmable Read Only  Hard disk is a magnetic disk used to store data.
Memory (EEPROM)  It has the stacked arrangement of disks accessed
by a pair of heads for each of the disks.
 The hard disks come with a single or double sided
disk.
28.Write short note on Compact disk(CD) 32.Explain different types of Ports and Interfaces in
 CD is made up of polycarbonate plastic material. computer.
 A thin layer of aluminum or gold is applied to the Serial Port: To connect the external devices like screen
surface. Parallel Port: To connect the printers.
 In CD, data is represented as "pits" encoded in a USB Ports:
spiral track on top.  To connect external devices like cameras,
 The areas between pits are known as "lands". scanners, mobile phones, external hard disks and
 A motor within the CD player rotates the disk. printers to the computer.
 The capacity is 700MB  It stands for Universal Serial Bus (USB)
29.Define Digital Versatile Disc (DVD)  USB 3.0, USB 3.1 ,USB 3.2 can transfer data up to
 DVD is an optical disc 5GB/Sec.
 DVDs are read with a laser. VGA Connector: To connect a monitor ,LCD projector.
 The disc can have one or two sides, and one or two Audio Plugs: To connect sound speakers, microphone
layers per side; and headphones.
 Single layer has 4.7 GB capacity, PS/2 Port: To connect mouse and keyboard to PC.
 Double layer has 8.5 GB capacity. SCSI Port: To connect the hard disk drives and
 Double-layered sides are usually gold-coloured network connectors.
 Single-layered sides are usually silver-coloured, like
33.Define High Definition Multimedia Interface
a CD
(HDMI) or What is HDMI?
Differentiate CD and DVD( ref. above answers)  High-Definition Multimedia Interface is an
audio/video interface .
30. How will you differentiate a flash memory and an  It transfers the uncompressed video and audio
EEPROM? data from a video controller, to computer
 Flash memory is a non-volatile computer storage monitor, LCD projector, digital television etc.
medium.
32.Arrange the memory devices in ascending order
 It can be electrically erased and reprogrammed.
based on the access time
 It offers fast access times
1.Cache Memory.
 The capacity is from 1GB to 2TB.
 The cache memory is a very high speed and
 They are either EEPROM or EPROM.
expensive memory
Ex. Pendrives, Memory cards etc
 It is closer to CPU.
 It can be used in personal computers, Personal
 The arrangement of cache memory is in between
Digital Assistants (PDA), digital audio players,
the CPU and the main memory.
digital cameras and mobile phones
2.Main Memory
Electrically Erasable Programmable Read Only
RAM
Memory (EEPROM)
 It is a non-volatile memory. It is volatile memory
 It can be erased by exposing it to an electrical It is the place in a computer where the
charge. Operating System,
 It is slower in performance. Application Programs and the data in
31.Define Blu-Ray Disc current use are kept temporarily
 Blu-Ray Disc is a high-density optical disc similar to It allows both read and write .
DVD. Stores temporarily
 A double-layer Blu-Ray disc can store up to 50GB of When the power is turned off,
data. whatever data stored in RAM is lost.
 The format was developed to enable recording, They are two types SRAM,DRAM
rewriting and playback of high-definition video,
 DVD uses a red laser to read and write data.
 Blu-ray uses a blue-violet laser to write.
 Hence, it is called as Blu-Ray.
ROM Erasable Programmable Read Only Memory (EPROM)
 It is a non-volatile memory.
It is non-volatile memory  Data can be written many times.
ROM stores critical programs during the  The content can be erased using ultraviolet rays.
manufacturing process itself i.e booting  EPROMs are used widely in personal computers.
It cannot be modified or removed and Electrically Erasable Programmable Read Only
can only be read. Memory (EEPROM)
Stores permanently  It is a non-volatile memory.
It retains its contents even when the  It can be erased by exposing it to an electrical
computer is turned off. charge.
They are PROM,EPROM,EEPROM  It is slower in performance.

Hard Disk
 Hard disk is a magnetic disk used to store data.
 It has the stacked arrangement of disks accessed
by a pair of heads for each of the disks.
 It comes with a single or double sided disk.
Compact disk(CD)
 CD is made up of polycarbonate plastic material.
 A thin layer of aluminum or gold is applied to the
surface.
 In CD, data is represented as "pits" encoded in a
spiral track on top.
 The areas between pits are known as "lands".
 A motor within the CD player rotates the disk.
 The capacity is 700MB
Digital Versatile Disc (DVD)
 DVD is an optical disc
 DVDs are read with a laser.
 The disc can have one or two sides, and one or two
layers per side;
 Single layer has 4.7 GB capacity,
 Double layer has 8.5 GB capacity.
 Double-layered sides are usually gold-coloured
 Single-layered sides are usually silver-coloured, like
a CD

33.Explain the types of ROM.


Types of ROM
 Programmable Read Only Memory (PROM)
 Erasable Programmable Read Only Memory
(EPROM)
 Electrically Erasable Programmable Read Only
Memory (EEPROM)
Programmable Read Only Memory (PROM)
 It is a non-volatile memory.
 Data can be written only once.
 Content cannot be erased.
 PROM is manufactured as a blank memory,
 PROM programmer or a PROM burner is used to
write data to a PROM chip.
 The process of programming a PROM is called
burning the PROM.
Unit I Fundamentals of Computer CHAPTER
4
Theoretical concepts of Operating System
1.Define Software. Theoretical
 A software is set of instructions that perform
specific task.
concepts
Single

of Operating
User Operating Systems System 4
An operating system allows only a single user to
perform a task at a time.
 It interacts with the hardware to generate the  It is called as a Single user and single task operating
output. system. Ex.MS-DOS
2.What are the types of software? Explain.
Software is classified into two types: 6.Multi-user Operating Systems
1) Application Software What is the multi-user Operating system?
2) System Software  It allows same data and applications to be
Application Software: accessed by multiple users at the same time.
 Application software is a set of programs to  The users can also communicate with each other.
perform specific task. Ex. MS-word ,VLC ,flash etc.. Ex. Windows, Linux and UNIX
System Software: 7.What is User Interface?
 System software is a type of computer program  User interface is one of the significant feature in
that is designed to run the computer’s hardware Operating System.
and application programs.  The only way that user can make interaction with a
Ex. Operating System , Language Processor Computer.
3.What is operating system? 8.What is GUI ?
 An Operating System (OS) is a system software  The GUI is a window based system with a pointing
which serves as an interface between a user and a device to direct I/O, choose from menus, make
computer. selections, pop up window message boxes, icons,
 This controls input, output and other peripheral vibrant colours are attract the user very easily.
devices. 9.What are the points to be considered when user
 Operating System manages all the Software and interface is designed?
Hardware.  The user interface should enable the user to
 Ex.Windows,Linux,Unix ,Android and ioS as Mobile retain a longer time.
OS.  The user interface should also satisfy the
4.What are the Uses of Operating Systems? customer based on their needs.
Explain the main purpose of an operating system.  Create graphical elements likeMenus,Window,Tabs,
 To ensure that a computer can be used to extract  Icons and reduce typing work will be an added
what the user wants it do. advantage of the Operating System.
 Easy interaction between the users and  The ultimate aim of any product is to satisfy the
computers. customer.
 Starting computer operation automatically when 10.What is Memory Management in OS? or
power is turned on (Booting). What are the advantages of memory management in
 Controlling Input and Output Devices Operating System?
 Manage the utilization of main memory.  Memory Management is the process of controlling
 Providing security to user programs and coordinating computer’s main memory .
5.What are the types of Operating System?Explain.  Memory management ensures the availability of
Operating System are classified into the following memory for each running program at all times.
types,  The Memory management involves the allocation
 Single User Operating Systems de-allocation of memory blocks
 Multi-user Operating Systems 11.What is Process management in OS? What are the
activities associated with the computer process?
 Process management is function that includes
creating and deleting processes.
 Providing mechanisms for processes to
communicate and synchronize with each other.
12.What are the categories of computer process? 17.Explain File Management in OS.
 Operating System processes which is executed by  File management is an important function of OS
system code  The operating System manages the files, folders
 User Processes which is execute by user code and directory systems on a computer.
 Any type of data in a computer is stored in the
13. List the algorithms used to allocate the job in form of files and directories/folders through File
computer. Explain. or Allocation Table (FAT).
Explain the algorithms used in process management.  The FAT stores general information about files like
1. FIFO 2. SJF 3. Round Robin 4. Based on Priority filename, type (text or binary), size, starting
1. FIFO (First In First Out)Scheduling: address and access mode .
 This algorithm is based on queuing technique  The file manager of the operating system helps
The process that enters the queue first is executed to create, edit, copy, allocate memory to the files
first by the CPU, followed by the next and so on. and also updates the FAT.
2. SJF (Shortest Job First)Scheduling:  The OS also takes care of the files that are
 This algorithm works based on the size of the job opened with proper access rights to read or edit
being executed by the CPU. them.
Consider two jobs A and B. 1) A = 6 KB 2) B = 9 KB  There are few other file management techniques
First the job “A” will be assigned and then job “B” available like
3.Round Robin Scheduling 1.Next Generation File System (NTFS)
 It is designed especially for time sharing systems. 2.ext2(Linux).
Ex. Take three jobs A, B, C. 18.Write short note on Multi-Processing.
First the job A is assigned to CPU then job B and job C  It has two or more processors for a single
and then again A, B and C and so on. running process (job).
4.Based On Priority  Processing takes place in parallel is known as
 The given job (process) is assigned based on a parallel processing.
Priority.  Each processor works on different parts of the same
Take two jobs A and B. Let the priority of A be 5 and task or on two or more different tasks.
priority B be 7.  which increases the power of computing.
Job B is assigned first. 19.Explain how Time-sharing works on computer with
14.Explain Security Management in OS. Or an example ? or Define Time-sharing.
What are the Security levels in OS. What are the advantages and disadvantages of Time-
What are the security management features available sharing features?
in Operating System ?  It allows execution of multiple tasks or processes
 It is used to protect data from hackers. concurrently for each task a fixed time is allocated.
 The Operating System provides three levels of  This division of time is called Time- sharing.
securities to the user end. They are  The processor switches rapidly between various
(1) File access level processes after a time is elapsed or completed.
(2) System level Disadvantages.
(3) Network level  Problem of data communication.
15.Define Fault Tolerance of computer.  Problem of reliability.
 The Operating Systems should be designed strongly. Assume three processes called P1, P2, P3 .
 When there a fault, the Operating System should Time allocated for each process 30, 40,50 min.res.
not crash.  If the process P1 completes within 20 minutes
 because it has fault tolerance capabilities and  Then processor takes the next process P2 .
retain the existing state of system.  If the process P2 could not complete within 40
16.What is File Allocation Table (FAT)? minutes,
 File Allocation Table (FAT) is a file management  then the current process P2 will be paused and
technique in operating system. switch over to the next process P3.
 Any type of data in a computer is stored in the
form of files and directories/folders through File
Allocation Table (FAT).
 The FAT stores general information about files like
filename, type (text or binary), size, starting
address and access mode.
20.What is Distributed Operating Systems? Ex. Apple iOS and Google Android.
Explain the concept of a Distributed Operating System. The iOS running on an iPad
Ref .Qno 20 ,21 27.Write short note on Android
 The Distributed Operating System is used to access  Android is a mobile operating system developed by
shared data and files that reside in any machine Google, based on Linux for touch screen mobile
around the world. devices .
 The user can handle the data from different Google has further developed
locations.  Android TV for televisions,
 The users can access as if it is available on their own  Android Auto for cars and
computer.  Android Wear for wrist watches.
21.What are the advantages of distributed Operating 28.Write short note on iOS
System?  iOS is a mobile Operating System created and
 A user at one location can make use of all the developed by Apple Inc., exclusively for its iPhone,
resources available at another location over the iPad and iPod Touch.
network.  It is the second most popular mobile Operating
 Many computer resources can be added easily in System globally after Android.
the network 29.What are the differences between Windows and
 Improves the interaction with the customers and Linux Operating system?
clients.
 Reduces the load on the host computer. Windows Linux
22.Give some list of Prominent OS. Or Commercial software Open source software.
What are the different Operating Systems used in It can be modified and It can only be modified
computer? distributed by anyone . and distributed by the
 UNIX company that owns it.
 Microsoft Windows They have their own There are different
 Linux versions distributers ex.
 iOS Ex. Windows xp, Windows ubuntu,fedora,redhat,
 Android 7, Windows8 , linux mint etc.
23.Define UNIX. Windows10
 UNIX is a multitasking, multi-user operating systems
developed from AT&T Bell Labs in the 1970s by Ken 30.Explain advantages and disadvantages of open
Thompson and Dennis Ritchie. source operating systems.
24.Define Linux
 Linux is a open-source operating systems. Advantages Disadvantages
 It can be modified and distributed by anyone Free software It supports limited
around the world. software only
 There are many versions (distributions)and their It can be modified and Hardware and Software
updates. distributed by anyone . compatibility is poor
 Ex. Ubuntu, Mint, Fedora, RedHat, Debian, More reliable , flexible Lack of user friendly
Google's Android, Chrome OS, and Chromium OS
 Most of the servers run on Linux because it is easy to
customize.
25.What are the different distributions of Linux?
Ubuntu, Mint, Fedora, RedHat, Debian, Google's
Android, Chrome OS, and Chromium OS etc..
26.List some Mobile operating system. Or
Explain and List out examples of mobile operating
system.
 Mobile devices such as phones, tablets and MP3
players are different from desktop and laptop
computers.
 Hence they need special Operating Systems.
 Operating systems for mobile are not able to run
all software.
Unit I Fundamentals of Computers CHAPTER
5
Part – I : Working with Windows
1.Define operating system? Windows 2000 -2000
 An Operating System (OS) is a system software. • Four versions of Windows 2000 were released for
 It serves as an interface between a user and a business desktop , laptop and server..
computer. Windows XP -2001
 It controls input, output and other peripheral • Introduced 64-bit Processor.
devices. • Improved Windows appearance with themes and
 Operating System manages all the Software and offered a stable version.
Hardware. Windows Vista -2006
Ex.Windows,Linux,Unix,Android and ioS. • Updated the look and feel of Windows.
2.Define Multitasking. Windows 7 -2009
 Multiple applications can execute simultaneously in • Booting time was improved, introduced new user
Windows O.S, and this is known as “Multitasking”. interfaces like Aero Peek, pinning programs to
3.What are the functions of Windows O. S? taskbar, handwriting recognition etc. and Internet
 Access applications (programs) on the computer Explorer 8.
• Load any new program on the c o m p u t e r. Windows 8 -2012
• Manage hardware such as printers, scanners, • Windows 8 is faster than previous versions of
mouse, digital cameras etc., Windows.
• File management activities . • Start button was removed.
• Change computer settings such as colour scheme, • Windows 8 takes better advantage of multi-core
screen savers of your monitor, etc. processing, solid state drives (SSD), touch screens and
4.Explain the Various versions of Windows. other alternate input methods.
Windows 1.x - 1985 • Served as common platform for mobile and computer.
• Introduction of GUI in 16 - bit. processor Windows 10 -2015
• Mouse was introduced as an input device. • Start Button was added again.
Windows 2.x -1987 • Multiple desktop.
• Supports to minimize or maximize windows. • Central Notification Center for App notification and
• Control panel feature was introduced with various quick actions.
system settings and customising options. • Cortana voice activated personal assistant.
Windows 3.x -1992 5.What are the mouse actions?
• Introduced the concept of multitasking. Point to an item ,Click, Right click ,Double-click ,Drag and
• Supported 256 colours which brought a more drop
modern, colourful look to the interface. 6.Write short note on Desktop.
Windows 95 -1995  The opening screen of Windows is called “Desktop”.
• Introduced Start button, the taskbar, Windows  Windows allows you to change the appearance of
Explorer and Start menu. the desktop.
• Introduced 32 - bit processor and focused more on  The desktop shows the Start button, Taskbar,
multitasking. Notification Area and date and time.
Windows 98 -1998 7.Define Icon
• Integration of the Web browser (Internet Explorer)  Icon is a graphic symbol representing the window
with the Operating System. elements like files, folders, shortcuts etc.,
• DOS gaming began to disappear as Windows based  Icons play a vital role in GUI based applications.
games improved. There are three types of icons, they are
• Plug and play feature was introduced. 1. Standard Icons 2. Shortcut icons 3. Disk drive icons
Windows NT Define Standard Icons.
• Designed to act as servers in network.  The icons which are available on desktop by
Windows Me -2000 default while installing Windows OS are called
• It introduced automated system diagnostics and standard icons.
recovery tools.  Ex.My Computer, Documents and Recycle Bin.
8. Define Shortcut Icons.  A horizontal bar at the bottom of the screen is called
 Shortcut icons can be created for any application the taskbar.
or file or folder.  This bar contains the Start button and shortcuts to
 By double clicking the icon, the related application or various programs.
file or folder will open.  The system tray in the extreme right corner
9. Define Disk drive icons consist of volume control,network,date and time
The disk drive icons graphically represent five disk etc.
drive options. 12.How to start an application in windows?
1. Hard disk  Click Start button -> All Programs.
2. CD-ROM/DVD Drive Point to the group and click the application name
3. Pen drive  Click Run on start menu and enter the application
4. Removable storage such as mobile, smart phone, 13.How to Quit an application?
tablet etc.,  Click the Close button
5. Network drives .  File → Exit
10.Differentiate between Application window and 14.Write the methods to create folder.
Document window Method I:
Application window  Open Computer Icon.
 An Application Window contains an open  Open any drive (For example select D:)
application i.e. current application such as Word or  Click on File → New → Folder.
Paint.  A new folder is created with the default name
 It is larger window. “New folder”.
 This Window helps the user to communicate with  Type in the folder name and press Enter key.
the Application program. Method II:
Document window  (For example in the Desktop), right click → New
 It is inside the Application Window,  → Folder.
 It is smaller window.  A new folder is created with the default name
 A document window is a section of the screen used “New folder”.
to display the contents of a document.  Type in the folder name and press Enter key.
 This Window is used for typing, editing, drawing, 15.Differentiate Files and Folders.
and formatting the text and graphics. Files
11.Explain the various elements of a Window  In computer, all informations and programs are
Title Bar stores in the form of files.
 The title bar will display the name of the application  Each file has name with extension.
and the name of the document opened. Ex. Myfile.doc
 It will also contain minimize, maximize and close Folder
button.  Folders contain files and sub-folders.
Menu Bar  Folder has name without extension.
 The menu bar is seen under the title bar. 16.What is the use of a file extension?
 Menus in the menu bar can be accessed by pressing  File extension is used to know that in which
Alt key 0r F10 and the letter underlined in the menu application the file is associated with
title. 17.What is Wordpad?
The Workspace  Wordpad is an in-built word processor application
 The workspace is the area in the document in Windows OS to create and manipulate text
window to enter or type the text of your document. documents.
Scroll bars 18.How to open Wordpad?
 The scroll bars are used to scroll the workspace  Click Start → All Programs → Accessories →
horizontally or vertically. Wordpad or
Corners and borders  Run → type Wordpad, click OK.
 The corners and borders of the window  Double click on Wordpad icon
helps to drag and resize the windows.
What is the use of start menu?
Start menu, used to start any application.
Define Task bar
19.How to create file in wordpad? How to save first
time in wordpad?
Select File → Save or Ctrl + S. 23.Explain the different methods of Moving Files and
 In Save As dialog box , Folders.
 select the location by using look in drop down list Method I-CUT and PASTE
box.  Select the file or folder
 Type the name of the file in the file name text box.  Click Edit → Cut or Ctrl + X or right click → cut
 Click save button.  Move to new location and paste it using
20.Differentiate Save and save As option.  Click Edit → Paste or Edit -> Paste or Ctrl + V Or
Save Save As Right click → Paste
Save as dialog box Save as dialog box  The file will be pasted in the new location.
appears first time only appears always Method II – Drag and Drop
Used to save the Used to save the  In the RIGHT pane of the Disk drive window,
modification without modification with select the file or folder you want to copy.
changing name and changing name and  Click and drag the selected file and/or folder to the
location of file location of file. folder list on the left,
 drop it where you want to copy the file and/or
21.Explain how to find(search) a file or folder in folder.
windows 7  Your file(s) or folder(s) will now appear in the
Method 1 (Using Start menu) new area.
 Click the Start button, select search box 24.Explain the different methods of Copying Files and
 In the search box , Type the name of the file or the Folders.
folder you want to search. Method I - COPY and PASTE
 The files or the folders with the specified names will  Select the file or folder
appear, if you click that file, it will directly open  Click Edit → Copy or Ctrl + C or right click → Copy
that file or the folder.  Move to new location and paste it using
Method 2 (using computer icon)  Click Edit → Paste or Edit -> Paste or Ctrl + V Or
 Click Computer Icon . Right click → Paste
 In Computer disk drive screen.  The file will be pasted in the new location.
 At the top right corner of that screen, there is a Method II – Drag and Drop
search box option.  In the RIGHT pane of the Disk drive window,
 Type the name of the file or the folder you want to select the file or folder you want to copy.
search.  Click and drag the selected file and/or folder to the
 It will display the list of files or folders starting with folder list on the left,
the specified name.  drop it where you want to copy the file and/or
 Just click and open that file or the folder. folder.
22.Explain the different methods of renaming files and  Your file(s) or folder(s) will now appear in the
folders. new area.
Using the FILE Menu 25.How to Copying Files and Folders to removable
 Select the File or Folder . disk?
 Click File→ Rename. Method - I
 Type in the new name.  Select the file or folder
 Press Enter  Click Edit → Copy or Ctrl + C or right click → Copy
Using the Right Mouse Button  Click Start→Computer.
 Select the file or folder .  Double-click on the Removable Disk drive .
 Right click - > Rename  In Removable Disk window, right-click -> Paste
 Type in the new name. Your file(s) or folder(s) will now appear in the new
 Press Enter. area.
Using the Left Mouse Button METHOD II - Send To
 Select the File or Folder. • Plug the USB flash drive directly into an available USB
 Press F2 . port.
 Type in the new name. • Right-click on the file you want to transfer to your
 Press Enter. removable disk.
• Click Send To -> Removable Disk
• Restart: Reboot the computer.
26.Differentiate cut and copy options. • Sleep: Puts the computer into a low-power mode that
retains all running programs and open Windows for a
super-quick restart.
copy Cut (move) • Hibernate (found only on laptop computers): Puts the
It leaves the files or text It removes the files or computer into a low-power mode after saving all
from source location and text from source location running programs and open windows for a quick restart.
place them in the and place them in the Differentiate between Hibernate and Sleep .ref. above
destination location destination location answer
To copy, ctrl + c , To cut(move), ctrl + X,
Edit - >copy Edit - >cut 33.Analyse: Why the drives are segregated?
27.How to Deleting Files and Folders in Windows 7?  To save space
 Select the file or folder you wish to delete.  To keep application files and document files
separately.
 Right- click -> Delete option from the po-pup menu
or  To increase the speed and performance.
34.If you are working on multiple files at a time,
 Click File → Delete or press Delete key from the
sometimes the system may hang.
keyboard.
What is the reason behind it. How can you reduce
 The file will be deleted and moved to the Recycle
it?
bin.
 If we have too many programs open and running at a
28.How to delete a file or folder permanently in
time as a result it slow down or hang.
windows ?
Reason: Try only one program running at a time.
 To permanently delete a file or folder (i.e. to avoid
 Due to low capacity of main memory(RAM)
hold down the SHIFT key, and press delete on the
Reason: Increase the size of memory.
keyboard.
29.What is recycle bin?  Due to overheat ,driver corruption ,software &
Hardwear errors and computer virus.
 Recycle bin is a special folder to keep the files or
folders deleted by the user,
35.Are drives such as hard drive and floppy drives
 The user cannot access the files or folders in the
represented with drive letters? If so why, if not why?
Recycle bin without restoring it.
Yes, hard drive and floppy drives are represented with
30.How To restore file or folder from the Recycle Bin?
drive letters
1)Floppy drives are represented by A and B
In recycle bin
2)Hard disk - C , D , E
 Right click on a file or folder .
3)CD-ROM/DVD Drive
 Select Restore for one .
4)Pen drive
 Restore all for multiple files or folders 5) Other removable storage such as mobile, smart
To delete phone, tablet etc.,
 select Empty the Recycle Bin. 6) Network drives
31.How to Creating Shortcuts on the Desktop 36.Write the specific use of Cortana.
• Right click on the file or folder.  Cortana is the personal assistant feature in
• Select Send to -> Desktop (create shortcut) from the Windows 10.
sub-menu.
 Used for web search and window search.
• A shortcut for the file or folder will now appear on
 It has ability to search by voice ,emails, places ,text,
your desktop.
people, places, information etc.
32.How to shutting down or logging off a computer n
37.List out the major differences between Windows
Windows.?
and Ubuntu OS.
Close your all open programs.
Windows Ubuntu
Click start → log off or Start → Shutdown .
MS DOS based OS Linux based OS
• Switch User: Switch to another user account on the
Commercial software Open source software
computer without closing your open programs and
Windows processes. Full hardware & software Partial hardware &
• Log Off: Switch to another user account on the support software support
computer after closing all your open programs and Do not protect from virus Protect from virus
Windows processes.
• Lock: Lock the computer
38.Are there any difficulties you face while using
Ubuntu? If so, mention it with reasons.
Yes, some difficulties are
 Hardware and Software compatibility is poor
 It supports limited software only
 Lack of user friendly

39.Differentiate Thunderbird and Firefox in Ubuntu OS.

Thunderbird Firefox
It is an email software It is a browser software
Used to send and receive Used to browse internet
emails web pages.

40.Differentiate Save, Save As and Save a Copy in


Ubuntu OS.

Save Save As
Save as dialog box Save as dialog box
appears first time only appears always
Used to save the Used to save the
modification without modification with
changing name and changing name and
location of file location of file.

41.Draw and compare the icon equivalence in Windows


and Ubuntu.
Icon Windows Icon Ubuntu
Computer Files

Recycle Bin Trash

Control System
panel settings

Search Search
your
computer

42.Complete the following matrix


Navigational Located Ideally suited for
method on
Start button Task bar Quick access to common
apps and settings
My computer Desktop Ref.Book
Windows Task bar Ref.book
explorer
Quick launch Task bar To open applications
quickly
Unit I Fundamentals of Computers CHAPTER
5
Part – II : Working with Linux(Ubuntu)
1.Define open Source. What are the advantages of open  The most common indicators in the Menu bar are
sources? located in the indicator or notification area
 The source code of a program or software is 6.Explain the most common indicators in ubuntu OS
available in the web to the public free of cost is menu bar. Or Explain icons in notification area of
called Open Source. ubuntu OS.
 It can be modified and distributed by anyone around Network indicator
the world.  Allows to connect a wired or wireless network.
 It is most secured. Text entry settings
 Ex.Linux,Android.  This shows the current and different keyboard
layout
2.Define Linux.  it allows to select a keyboard layout
 Linux is an operating system.  It contains the following menu items:
 Linux is one of the popular Open Source versions Character Map, Keyboard Layout Chart, and Text
of the UNIX Operating System. Entry Settings.
 Its source code is freely available. Messaging indicator
3.Mention the different server distributions in Linux OS.  This manage social applications.
List the most popular Linux server distributors .  From here, we can access instant messenger and
 Ubuntu Linux email clients.
• Linux Mint Sound indicator
• Arch Linux  Used to adjust the volume of sound in music player.
• Deepin Clock
• Fedora  This displays the current time , calendar and time
• Debian and date settings.
• CentOS Session Indicator
4.Write short note on Ubuntu  This is a link to the system settings, Ubuntu
 Ubuntu is a Linux-based operating system. Help, and session options (like locking your
 It is designed for computers, smartphones, and computer, user/guest session, logging out of a
network servers. session, restarting the computer, or shutting
 It is developed by Mark Shuttle worthat at down completely)
Canonical Ltd in UK in 2004, 7.Define Launcher in ununtu OS.
List some icons in the ubuntu OS.  The vertical bar of icons on the left side of the
 Search your Computer desktop is called the Launcher.
• Files  The Launcher provides easy access to applications,
• Firefox Webbrowser mounted devices, and the Trash.
 LibreOffice Writer  All current applications on your system will place an
• LibreOfficeCalc icon in the Launcher.
• LibreOffice Impress 8.Explain Ubuntu desktop elements. Or
• Ubuntu Software Explain the elements of Ubuntu.
• Amazon
• System Settings Search your Computer Icon
• Trash  This icon is equal to search button in Windows OS.
5Write notes on ubuntu OS menu bar.  Here, you have to give the name of the File or
 The menu bar is located at the top of the screen. Folder for searching them.
 The menu bar incorporates common functions Files
used in Ubuntu.  This icon is equivalent to My Computer icon.
 The frequently used icons in the menu bar are  From here, you can directly go to Desktop,
found on the right. Documents and so on.
Firefox Web Browser
Used to browse the internet
LibreOffice Writer
For word processing like MS Word
Libre Office Calc
For spreadsheet like MS Excel
LibreOffice Impress
For presentation like MS Pwerpont
Ubuntu Software Icon
Used to add any additional applications
Online Shopping icon
Used to shop online
System Settings Icons
This icon is similar to the Control panel in the
Windows But here, you need to authenticate the
changes by giving your password.
Trash
This icon is similar to Recycle bin of windows OS.
All the deleted Files and Folders are moved here.
How to delete files /folders in ubuntu OS.

9.How will you log off from Ubuntu OS?


 Select Log Out, Suspend or Shut down through
the Session Indicator on the far right side of the
top panel.
Unit II Algorithmic Problem Solving CHAPTER
6
Specification and Abstraction
1.Distinguish between an algorithm and a process.  A statement is executed and executing the
Algorithms. statement are repeated until the condition
 An algorithm is a step-by-step sequence of becomes false.
instruction to solve a problem. Define control flow in algorithm. or
 When an algorithm executed with input data, it What are the types of control flow ?Explain. or
generates a process and ends with output data. Differentiate between alternative control flow and
Process. iterative control flow.
 Processes are generated by executing algorithms to Ref.above answer
solve the given problem. 4.Define function or define Decomposition
2.When do you say that a problem is algorithmic in  Some algorithms can become very complex,
nature? In such situations,
 There are some principles and techniques for  we break an algorithm into Parts.
constructing algorithms.  The parts of an algorithm are known as
 A problem is algorithmic in nature when its functions.
solution involves the construction of an algorithm.  A function is like a sub algorithm.
 Some types of problems can be immediately  Construct each part (function)separately,
recognized as algorithmic.  and then integrate the parts to the complete
3. What are the building blocks of Algorithms? Explain algorithm.
 Data 5.What are the basic principles and techniques for
 Variables designing algorithms?.
 Control flow 1. Specification
 Functions 2. Abstraction
Data 3. Composition
 Algorithms take input data, process the data, and 4. Decomposition
produce output data Specification
Variables  To solve a problem, first we must state the
 Variables are named boxes for storing data. problem clearly.
Control flow  A problem is specified by the given input and the
 An algorithm is a sequence of statements. desired output.
 The order of execution of statements is known as the Abstraction
control flow.  A problem can involve a lot of details.
There are three important control flow statements.  Ignoring or hiding unnecessary details and
 Sequential control flow modeling only by its essential properties is known
 Alternative control flow as abstraction.
 Iterative control flow Composition
Sequential control flow  An algorithm is composed of assignment and
 Statements are executed one after another in the control flow statements.
same order  A control flow statement tests a condition of the
Alternative control flow state
A condition of the state is tested,  depending on the value of the condition,
 if the condition is true, one statement is executed;  decides the next statement to be execute
 if the condition is false, an alternative statement Decomposition
is executed.  Some algorithms can become very complex,
Iterative control flow In such situations,
 A condition of the state is tested,  we break an algorithm into Parts.
 if the condition is true,  The parts of an algorithm are known as
functions.
 A function is like a sub algorithm.
 Construct each part (function) separately, and then 13.Specify a function to find the minimum of two
integrate the parts to the complete algorithm. numbers.
6.What is abstraction? Ref. above ans. 1.Minimum (a,b)
7.Define State. 2.--inputs: a,b are integers or real numbers
 State is a basic and important abstraction. 3.--outputs: a is minimum if a<b
 A computational process starts with an initial B is minimum if b<a
state. 14.If √2 = 1.414, and the square_root() function returns
 As actions are performed, It ends with a final state.-1.414, does it violate the following specification?
-- square_root (x)
 State of a process is abstracted by a set of variables
in the algorithm. -- inputs: x is a real number , x ≥ 0
8.Define Assignment statement. Or -- outputs: y is a real number such that y2=x
What is the form and meaning of assignment statement? Ans .Yes.
 Assignment operator (=)is used to assign Variable on 15.Write the specification of an algorithm hypotenuse
the left side and a value on the right side. whose inputs are the lengths of the two shorter sides of
 Assignment statement is used to store a value in a right angled triangle, and the output is the length of
a variable. the third side.
 Ex. variable = value/expression; a:=2 (variable a
stores value 2) Hypotenuse (S1,S2)
9.Define Equality operator. --inputs: S1 and S2 are Integers or real numbers
 Equality operator(==) is used to compare the value --output: l 2 = S1 2 + S2 2 l is a real or integer
of both left hand and right hand side variable 16.Suppose you want to solve the quadratic equation
 Results in either true or false. ax2 + bx + c = 0 by an algorithm.
 Ex.Variable1 = = variable 2 quadratic_solve (a, b, c)
What is the difference between assignment operator -- inputs : ?
and equality operator? Ref.Q6 & 7 -- outputs: ?
10.What is command statements? How commands are You intend to use the formula and you are prepared to
indicated? handle only real number roots.
 Comments are statements which are used to add Write a suitable specification.
notes to a program for the human readers and not
executed by the computer.
 A double dash -- indicates that the rest of the line is
a comment
quadratic_solve (a, b, c)
11.Initially,
-- inputs : a,b,c are real numbers .
Farmer, goat, grass, wolf = L, L, L, L and the farmer
-- outputs: x 1 , x2 are real numbers
crosses the river with goat.
Model the action with an assignment statement. −𝑏+√𝑏2 −4𝑎𝑐
 Let us name the variables farmer, goat, grass,wolf. X1 =
2𝑎
 Their possible values L and R. −𝑏−√𝑏2 −4𝑎𝑐
X2 =
 A value of L means "at the left side". 2𝑎

 A value of R means "at the right side".


17.Exchange the contents: Given two glasses marked A
 In the initial state, all four variables
and B. Glass A is full of apple drink and glass B is full of
 farmer, goat, grass, wolf have the value L.
grape drink. For exchanging the contents of glasses A
--farmer, goat, grass, wolf = L, L, L, L
and B,represent the state by suitable variables, and
The farmer crosses the river with goat.
write the specification of the algorithm.
--input : farmer ,goat = R,R
Exchange(A,B)
--output: farmer, goat, grass, wolf = R,R, L, L
--input: A , B are integers
12.What is the format of the specification of an
--output: A,B are integers T=0
algorithm?
T:=A
 Let P be the required property of the inputs A:= B
 Q the property of the desired outputs. B:= T
Then the algorithm S is specified as
1. Algorithm_name (inputs)
2. -- inputs : P
3. -- outputs: Q
Unit II CHAPTER
7
Theoretical concepts of Operating System
1.What are the notations for representing algorithms?
Or Explain the Notations of algorithm. (QN. 2,3,4)
 Programming language, pseudo code, and
4
6.List out the disadvantage of Flowchart.
 To represent algorithms, Flowcharts are less
compact than in programming language or pseudo
flowchart are notations for expressing algorithms. code.
2.Define Programming language  They cannot display clearly about the basic
 A programming language is a notation for expressing hierarchical structure of the algorithms.
algorithms.  Flowcharts do not show disciplined control flow
 Set of Instruction in programming Language is called structures
Program. 7.Distinguish between a condition and a Statement
 An algorithm expressed in a programming language Statement.
is called a program.  A statement is a phrase that commands the
 Programs must obey the grammar of the computer to do an action.
programming language exactly. Condition.
 There is a translator which translates the program  A condition is a phrase that describes a test of
into instructions executable by the computer the state.
 Ex. C , C++ , Python etc… 8.Distinguish between an algorithm and a Program.
3.Define Pseudo code Algorithms.
 Pseudo code is a mix of programming language and  An algorithm is a step-by-step sequence of
English. instruction to solve a problem.
 It uses the same building blocks as programs, such as  When an algorithm executed with input data, it
variables and control flow. generates a process and ends with output data.
 pseudo code is not for computers but for human Program
readers.  A programming language is a notation for expressing
4.What is a Flowchart algorithms
 Flowchart is a diagrammatic notation for  Set of Instruction in programming Language is called
representing algorithms. Program.
 They show the control flow of algorithms using  An algorithm expressed in a programming language
diagrams in a visual manner. is called a program.
 A flowchart is a collection of boxes containing  Programs must obey the grammar of the
statements and conditions programming language exactly.
 which are connected by arrows showing the  There is a translator which translates the program
order of execution into instructions executable by the computer
5.List the symbols used in flowchart.  Ex. C , C++ , Python etc…
 Start / End - are used to indicate the start and the 9.What are the types of control flow?
end of an execution: There are three types, they are ,
 Parallelogram boxes represent inputs/outputs  Sequential
 Alternative
 Rectangular boxes used to indicate a  Iterative
process 10.Write about sequential control flow with flowchart.
 Diamond shapedbox represent a condition with two  Statements are executed one after another in the
outgoing arrows,labeled true and false. same order
Let S1 and S2 be statements.
A sequential statement of S1 and S2 is ..
S1
S2
 If case condition is TRUE ,the corresponding
11.Write about Alternative control flow with flowchart statement is executed.
A condition of the state is tested,  If none of case is TRUE then the default case S4 is
 if the condition is true, one statement is executed; executed.
 if the condition is false, an alternative statement The cases are exhaustive : At least one case is TRUE
is executed. The cases are disjoint : The case analysis always
Let S1 and S2 – Statements execute one case.
C - Condition 15.Write an algorithm that compares two numbers and
If C produce the result as
S1 1.Compare (a,b)
else 2.Case a<b
S2 3. Result= -1
1.Test whether C is true or false. 4.Case a=b
2.If C is true, then do S1; otherwise do S2. 5. Result =0
12.Explain Conditional Statement with Flowchart. OR 6.Else – a>b
Draw a flowchart for conditional statement. 7. Result = 1
 Conditional statement is used to execute a 16.Write about Iterative control flow with flowchart
statement only if a condition is true An iterative process executes the same action
 Do nothing if the condition is false. repeatedly till condition False.
Let S – Statements C - Condition The iterative statement is commonly known as a loop
if C If C is a condition and S is a statement, then
S while C
1.Test whether C is true or false. S
2.If C is true then do S; This describes the following
otherwise do nothing. action:
13.Both conditional statement and iterative statement 1. Test whether C is true or
have a condition and a statement. How do they differ? false.
2. If C is true, then do S and go back to
Conditional statement step 1; otherwise do nothing.
 Conditional statement is used to execute a 17.Why is function an abstraction?
statement only if a condition is true
 Do nothing if the condition is false. Function is an abstraction of an algorithm,
Iterative Statement  The parts of an algorithm are known as
An iterative process executes the same action functions.
repeatedly till condition False  A function is like a sub algorithm.
14.What is case analysis?  Construct each part (function)separately,
Write about Case analysis control flow with flowchart.  and then integrate the parts to the complete
 Case analysis is a multiple branching statement, algorithm.
 Based on a condition, the control is transferred to  A Function is specified by the input property and
one of the many possible points. desired input – output relation.
If C1,C2,C3 are conditions 18.How do we refine a statement? OR
True
S1,S2,S3 ,S4 are Statements Define Refinement.
case C1 C1 S1 After decomposing a problem into smaller sub
S1 False problems,
case C2  Each sub problem can be expanded into more
C2 S2
S2 detailed steps.
case C3  Each step can be further expanded.
S3  This is known as refinement.
else C3 S3
S4
END
 For each case, the S4
problem is solved
independently.
19.Consider the problem of testing whether a triangle is 20.Draw a flowchart for -3case analysis using
right-angled, given its three sides a, b, c, where c is the alternative statements.
longest side. The triangle is right-angled, if c2 = a2 + b2
Here a function square() is specified as
Square(y) Case
--input : y
F==’A’ “ APPLE”
-- output : y2 (y*y)
Flowchart for square()

Input y
Case
“BALL”
Y*y F==’B’

Algorithm
Right_angled(a,b,c)
--input: c>=a,c>=b Case
--output: ifc2 = a2 + b2 is true result = TRUE otherwise F==’C’ “CAT”
result = FALSE
if ( square(c ) == square(a) + square(b) )
result: = TRUE it is right angle triangle
else ’
result: = FALSE it is not a right angle triangle
Flowchart Default Statement End

start 21.Define a function to double a number in two


different ways: (1) n + n, (2) 2 x n
(1) n + n 2)2*n
Input a,b,c Double 1(n) Double2(n)
-- input(n) --input(n)
--output y=n+n --output y= 2 x n
22.Exchange the contents: Given two glasses marked A
C2==a2+b2 TRUE
T and B. Glass A is full of apple drink and glass B is full of
grape drink. Write the specification for exchanging the
F contents of glasses A and B, and write a sequence of
assignments to satisfy the specification
FALSE End Exchange(a,b)
--input: A , B are integers
If C is false in line 2, trace the control flow in this --output: A,B are integers T=0
algorithm. T:=A
1 S1 A:= B
2 -- C is false B:= T
3 if C
4 S2
5 else
6 S3
7 S4
If test condition C is FALSE
S3 ,S4 statements are executed.
23.Circulate the contents: Write the specification and
construct an algorithm to circulate the contents of the
variables A, B and C as shown below: The arrows
indicate that B gets the value of A, C gets the value of B
and A gets the value of C.

Algorithm
Contents(a,b,c)
--input : a=10,b=20,c=30
--output: a=c ,b=a ,c=b
a=30,b=10 , c=20
Algorithm
Start
Read a,b,c
t=b
b=a
a=c
c=t
print a,b,c
End
24.Trace the step-by-step execution of the algorithm for
factorial(4).
factorial(n)
-- inputs : n is an integer , n ≥ 0
-- outputs : f = n!
f, i := 1 ,1
while i ≤ n
f, i := f × i, i+1
Algorithm
Read n=4
f=1,i=1
check i<=n if true execute the following loop
{
f=f*i
i=i+1
}
If false comes out of the loop and
Print f
Output: 24
Unit II Algorithmic Problem Solving CHAPTER

Iteration and Recursion


1.Define Iteration.
 In iteration, the loop body is repeatedly executed
as long as the loop condition is true.
solved directly.
4
Base case: The problem size is small enough to be

Recursion step: The problem size is not small enough.


 Each time the loop body is executed, the Deconstruct the problem into a sub-problem, strictly
variables are updated. smaller in size than the given problem.
2.Define Recursion 8.Define factorial of a natural number recursively.
 Recursion is an algorithm design technique.
 It is similar to iteration, but more powerful. Factorial(n)
 Using recursion, we can solve a problem with a --input :n
given input, --output: factorial of n
 by solving the instances of the problem with a part of get n
the input. f=1
3.What is an invariant? i=1 -- base case
 An expression involving variables, which remains loop(i<n) true
unchanged by an assignment. f=f*I – recursion step
 These variables are called an invariant of the False: factorial of n
assignment 9.There are 7 tumblers on a table, all standing upside
4.Define a loop invariant. down. You are allowed to turn any 2 tumblers
 An invariant for the loop body is known as a loop simultaneously in one move. Is it possible to reach a
invariant situation when all the tumblers are right side up? (Hint:
5.Does testing the loop condition affect the loop The parity of the number of upside down tumblers is
invariant? Why? invariant.)
No. It does not affect the loop invariant. Output : To turn all tumblers up
Because a loop invariant is true The number of tumblers up is u;
Model
 at the start of the loop
1.
 at the start of each iteration
Two tumblers upside up
 at the end of each iteration
u increments by 2
 at the end of the loop .
u:=u+2
6.What is the relationship between loop invariant, loop
2.
condition and the input- output recursively?
Two tumblers upside down
 Establish the loop invariant at the start of the loop. u decrements by 2
 The loop body should be update the variables u:=u - 2
and maintain the loop invariant, at the same time. 3.
 When the loop ends, the termination condition and One tumbler is upside down and another is proper
the loop invariant should establish the input-output u is not changed
relation. u is either incremented or decremented
7.What is recursive problem solving? So we can ignore of u not being changed.
To solve a problem recursively, Now
 Each solver receives an input and reduces the Invariants are u + 2 , u – 2
problem to sub-problems,
 and calls another instance of the solver, known
as sub-solver, to solve the sub-problem is known as
recursive call.
 The input size to a sub-problem is smaller than the
input size to the original problem.
From the solution to the sub-problem, the solver
constructs the solution to the original problem.
a recursive solver has two cases:
10.A knockout tournament is a series of games. Two 13.Power can also be defined recursively as
players compete in each game; the loser is knocked
out (i.e. does not play any more), the winner carries on.
The winner of the tournament is the player that is left
after all other players have been knocked out. Suppose
there are 1234 players in a tournament. How many
games are played before the tournament winner is Construct a recursive algorithm using this definition.
decided? How many multiplications are
needed to calculate a 10 ?
No. of Players : p
No. of Games : g Power (a,n)
--inputs : n integer
Initially : p=1234 , g = 0 --output : a n
If( n=0 ) --base case
p, g := p – 1 , g + 1 1
else if (n is odd)
Invariant is p + g a x power (a , a n-1) -- recursion step
else (n is even)
Finally Winner player is 1 , p = 1 a x power (a n/2 x a n/2) -- recursion step

p + g : = 1234
g =1234 - 1
g = 1233 ( No.of games played = 1233)

11.King Vikramaditya has two magic swords. With one,


he can cut off 19 heads of a dragon, but after that the
dragon grows 13 heads. With the other sword, he can
cut off 7 heads, but 22 new heads grow. If all heads are
cut off, the dragon dies. If the dragon has originally
1000 heads, can it ever die? (Hint:The number of heads
mod 3 is invariant.)

If the dragon has 1000 heads we start at 1000=1(mod 3)


we cannot get to 0 .so the dragon lives.

12.Assume an 8 × 8 chessboard with the usual coloring.


"Recoloring" operation changes the color of all squares
of a row or a column. You can recolor re-peatedly. The
goal is to attain just one black square. Show that you
cannot achieve the goal. (Hint: If a row or column has
b black squares, it changes by (|8 - b) - b|).

White squares W = 32
Black squares B = 32

W+ B = 64 , W – B = 0 = 0 mod 4
But the required state has 63 W 1 B
So W – B = 63 – 1 = 62 = 2 mod 4
Which is impossible.
CHAPTER - 1 Answers:
1. First generation computers used 1.c 2.d 3.b 4.c 5.a 6.c 7.b
(a) Vacuum tubes (b) Transistors 8.c
(c) Integrated circuits (d) Microprocessors
2. Name the volatile memory Part - II
(a) ROM (b) PROM (c) RAM (d) EPROM 1. Which is a basic electronic circuit which operates on
3. Identify the output device one or more signals?
(a) Keyboard (b) Memory (c) Monitor (d) Mouse (A) Boolean algebra (B) Gate (C) Fundamental gates
4. Identify the input device (D) Derived gates
(a) Printer (b) Mouse (c) Plotter (d) Projector 2. Which gate is called as the logical inverter?
5. …………… Output device is used for printing building (A) AND (B) OR ( C) NOT (D) XNOR
plan, flex board, etc. (a) Thermal printer (b) Plotter 3. A + A = ?
(c) Dot matrix (d) inkjet printer (A) A (B) O (C ) 1 (D) A
6. In ATM machines, which one of the following is used 4. NOR is a combination of ?
to (a) Touch Screen (b) speaker (c) Monitor (d) Printer (A) NOT(OR) (B)NOT(AND) (C ) NOT(NOT) (D)
7. When a system restarts …………… ….. Which type of NOT(NOR)
booting is used. (a) Warm booting (b) Cold booting (c) 5. NAND is called as …… Gate
Touch boot (d) Real boot. (A) Fundamental Gate (B) Derived Gate (C ) Logical
8. Expand POST Gate (D) Electronic gate
(a) Post on self Test (b) Power on Software Test Answers:
c) Power On Self Test (d) Power on Self Text 1.b 2.c 3.a 4.a 5.b
9. Which one of the following is the main memory? CHAPTER - 3
(a) ROM (b) RAM (c) Flash drive (d) Hard disk
10. Which generation of computer used IC’s? 1. Which of the following is said to be the brain of a
(a) First (b) Second (c) Third (d) Fourth computer?
Answers: (a) Input devices (b) Output devices (c) Memory device
1.a 2.c 3.c 4.b 5.b 6.a 7.a (d) Microprocessor
8.d 9.b 10.c 2. Which of the following is not the part of a
CHAPTER - 2 Part - I microprocessor unit?
1. Which refers to the number of bits processed by a (a) ALU (b) Control unit (c) Cache memory (d) register
computer’s CPU? 3. How many bits constitute a word?
A) Byte B) Nibble C) Word length D) Bit (a) 8 (b) 16 (c) 32 (d) determined by the processor
2. How many bytes does 1 Kilo Byte contain? used.
A) 1000 B) 8 C) 4 D) 1024 4. Which of the following device identifies the location
3. Expansion for ASCII when address is placed in the memory address register?
A) American School Code for Information Interchange (a) Locator (b) encoder (c) decoder (d) multiplexer
B) American Standard Code for Information Interchange 5. Which of the following is a CISC processor?
C) All Standard Code for Information Interchange (a) Intel P6 (b) AMD K6 (c) Pentium III (d) Pentium IV
D) American Society Code for Information Interchange 6. Which is the fastest memory?
4. 2^50 is referred as (a) Hard disk (b) Main memory
A) Kilo B) Tera C) Peta D) Zetta (c) Cache memory (d) Blue-Ray dist
5. How many characters can be handled in Binary 7. How many memory locations are identified by a
Coded Decimal System? processor with 8 bits address bus at a time?
A) 64 B) 255 C) 256 D) 128 (a) 28 (b) 1024 (c) 256 (d) 8000
6. For 11012 what is the Hexadecimal equivalent? 8. What is the capacity of 12cm diameter DVD with
A) F B) E C) D D) B single sided and single layer?
7. What is the 1’s complement of 00100110? (a) 4.7 GB (b) 5.5 GB (c) 7.8GB (d) 2.2 GB
A) 00100110 B) 11011001 C) 11010001 D) 9. What is the smallest size of data represented in a CD?
00101001 (a) blocks (b) sectors (c) pits (d) tracks
8. Which amongst this is not an Octal number?
A) 645 B) 234 C) 876 D) 123
10. Display devices are connected to the computer 4. What is the meaning of "Hibernate" in Windows
through. XP/Windows 7?
(a) USB port (b) Ps/2 port (c) SCSI port (d) VGA a. Restart the Computer in safe mode
connector b. Restart the Computer in hibernate mode
Answers: c. Shutdown the Computer terminating all the running
1.d 2.c 3.d 4.c 5.c 6.c 7.c applications
8.a 9.c 10.d d. Shutdown the Computer without closing the running
applications
CHAPTER - 4 5. Which of the following OS is not based on Linux?
1) Operating system is a a. Ubuntu b. Redhat c. CentOs d. BSD
A) Application Software B) Hardware 6. Which of the following in Ubuntu OS is used to view
C) System Software D) Component the options for the devices installed?
2) Identify the usage of Operating Systems a. Settings b. Files c. Dash d. VBox_GAs_5.2.2
A) Easy interaction between the human and computer 7. Identify the default email client in Ubuntu.
B) Controlling input & output Devices a. Thunderbird b. Firefox c. Internet Explorer d.
C) Managing use of main memory D) All the above Chrome
3) Which of the following is not a function of an 8. Which is the default application for spreadsheets in
Operating System? Ubuntu? This is available in the software launcher.
A) Process Management B) Memory Management a. LibreOffice Writer b. LibreOffice Calc
C) Security management D) Complier Environment c. LibreOffice Impress d. LibreOffice Spreadsheet
4) Which of the following OS is a commercially licensed 9. Which is the default browser for Ubuntu?
Operating system? a. Firefox b. Internet Explorer c. Chrome d. Thunderbird
A) Windows B) UBUNTU C) FEDORA D) REDHAT 10. Where will you select the option to log out,
5) Which of the following Operating systems support suspend, restart, or shut down from the desktop of
Mobile Devices? Ubuntu OS?
A) Windows 7 B) Linux C) BOSS D) iOS a. Session Indicator b. Launcher c. Files d. Search
6) File Management manages
A) Files B) Folders C) Directory systems D) All the Above Answers:
7) Interactive Operating System provides
A) Graphics User Interface (GUI) B) Data Distribution 1.d 2.a 3.d 4.d 5.d 6.a 7.a
C) Security Management D) Real Time Processing 8.b 9.a 10.a
8) Android is a
A) Mobile Operating system B) Open Source CHAPTER - 6
C) Developed by Google D) All the above
9) Which of the following refers to Android operating 1.Which of the following activities is algorithmic in
system’s version? nature?
A) JELLY BEAN B) UBUNTU C) OS/2 D) MITTIKA (a) Assemble a bicycle. (b) Describe a bicycle.
(c) Label the parts of a bicycle. (d) Explain how a bicycle
Answers: works.
1.c 2.d 3.d 4.a 5.d 6.d 7.a 2. Which of the following activities is not algorithmic in
8.d 9.a nature?
(a) Multiply two numbers. (b) Draw a kolam.
CHAPTER - 5 (c) Walk in the park. (d) Braid the hair.
3. Omitting details inessential to the task and
1. From the options given below, choose the operations representing only the essential features of the task is
managed by the operating system. known as
a. Memory b. Processor c. I/O devices d. all the above (a) specification (b) abstraction
2. Which is the default folder for many Windows (c) composition (d) decomposition
Applications to save your file? 4. Stating the input property and the as :-output
a. My Document b. My Pictures c. Documents and relation a problem is known
Settings d. My Computer (a) Specification (b) statement
3. Under which of the following OS, the option Shift + (c) algorithm (d) definition
Delete – permanently deletes a file or folder?
a. Windows 7 b. Windows 8 c.Windows10 d. All of
the OS
5. Ensuring the input-output relation is 6. How many times the loop is iterated?
(a) the responsibility of the algorithm and the right of the i := 0
user. while i ≠ 5
(b) the responsibility of the user and the right of the i := i + 1
algorithm. (a) 4 (b) 5 (c) 6 (d) 0
(c) the responsibility of the algorithm but not the right of
the user. Answers:
(d) the responsibility of both the user and the algorithm. 1.a 2.c 3.b 4.a 5.a 6.b
6. If i = 5 before the assignment i := i-1 after the
assignment, the value of i is CHAPTER - 8
(a) 5 (b) 4 (c) 3 (d) 2 1.A loop invariant need not be true
7. If 0 < i before the assignment i := i-1 after the (a) at the start of the loop. (b) at the start of each
assignment, we can conclude that iteration (c) at the end of each iteration (d) at the start
(a) 0 < i (b) 0 ≤ i (c) i = 0 (d) 0 ≥i of the algorithm
2.We wish to cover a chessboard with dominoes, the
number of black squares and the number of white
Answers: squares covered by dominoes, respectively, placing a
1.a 2.d 3.b 4.a 5.d 6.4 7.b domino can be modeled by
(a) b := b + 2 (b) w := w + 2 (c) b,w := b+1, w+1(d) b := w
CHAPTER - 7 3. If m x a + n x b is an invariant for the assignment
1. Suppose u,v = 10 ,5 before the assignment .What are a, b : = a + 8, b + 7, the values of m and n are
the values of u and v after the sequence of (a) m = 8, n = 7 (b) m = 7, n = -8 (c) m = 7, n = 8 (d) m
assignments? = 8, n = -7
1 u := v 4. Which of the following is not an invariant of the
2 v := u assignment? m, n := m+2, n+3
(a) u, v = 5 ,5 (b) u, v = 5 ,10 (c) u, v = 10 ,5 (d) u, v = (a) m mod 2(b) n mod 3 (c) 3 X m - 2 X n (d) 2 X m - 3 X n
10 ,10 5. If Fibonacci number is defined recursively as
2. Which of the following properties is true after the to evaluate F(4), how many times F() is applied?
assignment (at line 3) ? (a) 3 (b) 4 (c) 8 (d) 9
1 -- i+j = 0 6. Using this recursive definition
2 i, j := i+1, j-1 how many multiplications are needed to calculate a10?
3 -- ? (a) 11 (b) 10 (c) 9 d) 8
(a) i+j >0 (b) i+j < 0 (c) i+j =0 (d) i = j
3. If C1 is false and C2 is true, the compound statement Answers:
1 if C1 1.d 2.a 3.b 4.d 5.b 6.9
2 S1
3 else
4 if C2
5 S2
6 else
7 S3
Executes
(a) S1 (b) S2 (c) S3 (d) none
4. If C is false just before the loop, the control flows
through
1 S1
2 while C
3 S2
4 S3
(a) S1 ; S3 (b) S1 ; S2 ; S3 (c)S1 ; S2 ; S2 ; S3 (d) S1 ; S2
; S2 ; S2 ; S3
5. If C is true, S1 is executed in both the flowcharts, but
S2 is executed in
(a) (1) only (b) (2) only (c) both (1) and (2) (d) neither
(1) nor (2)
Dept.of C.S. ,RMKMHSS - 601206

42
www.rmkmhsselango.blogspot.com 9677515019

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy