IX- Computer Chapter # 6 Page # 201
6.4 RULES OF BOOLEAN ALGEBRA
Rules of Boolean algebra are useful in manipulating and simplifying
Expression
Rule 1 :A+0 = A
A variable ORed with 0 is always equal to the variable.
Proof:
For A=0
L.H.S = 0+0 For A=1
=0 L.H.S =1 +0
= A (R.H.S) =1
=A
= (R.H.S)
Rule 2 : A+1 = 1
A variable ORed with 1 is always equal to 1..
Proof:
For A=0
L.H.S = 0+1 For A=1
= 1 L.H.S =1 +1
= (R.H.S) =1
=(R.H.S)
Rule 3 : A.0 = 0
A variable AND with 0 is always equal to 0.
Proof:
For A=0
L.H.S = 0+0 For A=1
= 0 L.H.S =1 .0
= (R.H.S) =0
=(R.H.S)
Rule 4 :A..1 = A
A variable AND with 1 is always equal to the variable.
Proof:
For A=0
L.H.S = 0.1 For A=1
= 0 L.H.S =1 .1
= A (R.H.S) =1
=A(R.H.S)
Rule 5 :A+A = A
A variable O Red with itself is always equal to the variable.
Proof:
For A=0
L.H.S = 0+0 For A=1
= 0 L.H.S =1 +1
= A (R.H.S) =1
=A(R.H.S)
Page 201
IX- Computer Chapter # 6 Page # 202
Rule 6 :A.A = A
A variable Ended with itself is always equal to the variable.
Proof:
For A=0
L.H.S = 0.0 For A=1
= 0 L.H.S =1 .1
= A (R.H.S) =1
=A(R.H.S)
Rule 7 :A.A = 1
A variable O Red with its complement is always equal to 1 .
Proof:
For A=0
L.H.S = 0+1 For A=1
=1 L.H.S =1 .0
= (R.H.S) =1
=(R.H.S)
Rule 8:A.A = 0
A variable Ended with its complement is always equal to 0 .
Proof:
For A=0
L.H.S =0.1 For A=1
= 0 L.H.S =1 .0
= (R.H.S) =1
=(R.H.S)
Rule 9:A= A
A double complement of a variable is always equal to the variable.
Proof:
For A=0
L.H.S = A=1,A=0 For A=1
= A L.H.S
=A=.0,A=1
= (R.H.S) =A
=(R.H.S)
AAA
010
101
Page 202
IX- Computer Chapter # 6 Page # 203
Rule 10:A + A.B=A
Proof
This rule can be proved by applying the distributive law, rule2 and rule4
as follows.
A+A. B= A(1+B) Factoring A (Distributive law)
= A.1 Rule2 : B+1=1
=A Rule4 :A.1=A
AB A.B A+A.B
00 0 0
01 0 0
10 0 1
11 1 1
Rule 11:A. + A..B=A + B Rule10 : A=A+A.B
Proof Rule6 : A=AA
This rule can be proved as. Rule8 : Adding AA=O
A+A..B = A(A+A.B)
A.B Rule7 :A+A=1 A+B
= (AA + AB) + AB 0 Rule4 : A.1=A 0
= AA +AB + AA + AB 1 1
0 A+AB 1
Factoring 0 0 1
= (A.+ A) (A+ B) 1
= 1. (A +- B) 1
= A+8 1
AB
00
01
10
11
Page 203
IX- Computer Chapter # 6 Page # 204
Rule 12: (A'+ B)(A + C) = A + BC . (2014) Distributive law
Proof:
Rule 6: AA = A
This rule can be proved as follows:
(A + B)(A +C) = AA + AC + AB + BC Factoring (Distributive law)
= A + AC + AB + Be Rule 2 : 1 + C= 1
= A (1+ C) + AB + BC
= A. 1 + AB + BC Factoring (Distributive law)
= A (1+B) + BC
= A. 1 + BC Rule 2 :1+B=1
=A+BC
Rule 4 :A.1=A
A B C A+B A+C (A+B)(A+C) A+BC
000 0 00 0
001 0 10 0
010 1 00 0
011 1 11 1
100 1 11 1
101 1 11 1
110 1 11 1
111 1 11 1
6.5 DEMORGAN'S THEOREMS:
DeMorgan, a mathematician who knew Boole, proposed two theorems that are
an important part of Boolean algebra. They help in simplifying complicated
logical expressions.
__ _ __ _____ _ _
1. xy= X + Y 2. X + y = X.y
xy=x + y
(2014)
Definition:
The complement of a product of variables is equal to the sum of the
complement of the variables.
OR
The complement of a logical product equal the logical sum of the complements.
Proof:
xy = x+ y
Page 204
IX- Computer Chapter # 6 Page # 205
The theorem can be. proved by the' Truth table given below:
x y x.y x.y x y x+y
00 0 1 11 1
01 0 1 10 1
10 0 1 01 1
11 1 0 00 0
(2) x + y = x . y (2014)
Definition:
The complement of a sum of variables is equal to the product of the
complement of the variables.
OR
The complement of a logical product of the complements.
Proof:
x+y=x.y
The theorem 'can be proved by the Truth table given below:
x y x+y x+y x y x.y
0001111
0110100
1010010
1110000
6.6 SIMPLIFICATION BY USING BOOLEAN ALGEBRA:
Many times in the application of Boolean algebra, you have to reduce a
particular expression to its simplest form or change its form to a more
convenient one to implement the expression most efficiently. The approach
taken in this section is to use the basic .laws, rules and theorems of Boolean
algebra to manipulate and simplify an; expression. This method depends on a
thorough knowledge of Boolean algebra.
Example 1:
Using Boolean algebra techniques, simplify the following expression.
AB +A(B + C)+ B(B + C)
Solution:
STEP 1: Apply the distributive law to the second and third terms in the
expression as follows.
AB+AB+AC+BB+BC
STEP 2: Apply rule 6. (BB=B) to the fourth term.
AB +AB + AC + B + BC
STEP 3: Apply rule 5. (AB + AB=AB) to the fourth term.
AB + AC + B + BC
STEP 4: Apply rule 10. (B + BC = B) to the last two term.
AB + AC + B
STEP 5: Apply rule 10. (AB + B = B) to the last two term.
B+AC
At this point the expression has been simplified as much as possible
Page 205
IX- Computer Chapter # 6 Page # 206
Example 2: Simplify the Boolean expression.
AB + AC + A BC
Solution:
STEP 1: Apply the DeMorgan theorem to first term.
STEP 2:
STEP 3: (AB) (AC) + A BC
STEP4:
Apply the DeMorgans theorem to each term in Parenthesis
STEP 5:
terms. (A + B)( A+ C) + ABC
STEP 6:
Apply, the DeMorganss: law to the two terms III Parenthesis
AB + A C+AB + BC + ABC
Apply rule 7. (AA = A) to the first terms and apply rule 10.
[AB + ABC + AB(1 + C) = AB] to the third and last terms.
A+ AC +AB+ BC
Apply value to + = + = to the 1st 2nd
Apply rule to A + AB + BC to the 1st 2nd terms.
+ = +=
A + BC
6.7 STANDARD FORMS OF BOOLEAN EXPRESSIONS:-
All Boolean expressions regardless of their form can be convened into either of
two standard forms.
(i) The Sum - of - Products (SOP) Form.
(ii) The Product - of - Sum (POS) Form.
This makes the simplification of Boolean expression more systematic and
easier.
(i) The Sum-of-Products (SOP) Form:
When two or more products are summed by Boolean addition, the resulting
expression is a Sum-Or-Product (SOP).
OR
A Boolean equation that is the logical sum of logical products this types of
equation applies to an AND-OR circuit.
Example 1: A + ABC
ABC + CDE +BCD
AB+ ABC + AC
An algebraic expression can be change into (SOP)' by applying Boolean
Algebraic techniques. For example, the expression A (B + CD) can 'be
converted 'to SOP form. by applying the distributive law.
A(B+ CD) = AB + ACD
Page 206
IX- Computer Chapter # 6 Page # 207
Example 2: Convert the following expression to SOP form.
(A +B)(B + C + D)
Solution: (A + B) (B + C + D) = AB +AC +AD+ BB + BC + BD
(ii) The Product-of-Sums, (POS) Form:
When two or more sum terms are multiplied, the resulting expression is a
Product of-Sum (POS)
OR
A Boolean equation that is the logical product of logical sum. This type of
equation applies to an OR-AND circuit:
Example: (A + B)(A+ B + C)
(A + B +C)(C + D+ E)(B+ C + D)
(A + B) (A + B + C) (A + C)
6.8 KARNAUGH MAPS:
Karnaugh maps are also used to simplify Boolean expressions. Karnaugh maps
transform a truth table into a simplified expression. Karnaug mapping. Method
helps to minimize the number of literals in a Boolean expression and thus
reduces' the number of gates required in digital circuit for its implementation.
The number of cells in a Karnaugh map is equal to the total number of possible
input variable combinations as is the number of rows in a.truth table. For two
variables, the number of cells is 22 = 4. For three variables, the number of cells is
23 = 8 and so on.
TYPES OF KARNAUGH MAP:
(1) The 2-Variable Karnaugh Map:
The 2 – variable Karnaugh map is an. array of 4 cells as shown in figure. In this
case A and B are used for the variables although other letters could be used.
Binary value of A is along the left side and the value of B is across the top.
(2) The 3-Variabfe Karnaugh Map:
The 3-variable Karnaugh map is an array of eight cells, as shown in the
figure. In this case A, .B and C arc used for the variables. Binary values
of A and B are along the left side and the values of C are along the top.
Page 207
IX- Computer Chapter # 6 Page # 208
The value of a given cell is the. binary values of A and B at the left in the same
row combined with the value of C at the top in the same column. For example,
the cell in the upper left comer has a binary value of OQO and the cell in the
lower right comer has a binary value of 101.
(3) The 4-Variable Karnaugh Map:
The 4-variable Karnaugh map is an array of sixteen cells, as shown in figure.
Binary values of A and B are along the left side and the values of C and D are
across the top:
The value of a given cell is the binary values of A and B at the left in the same
row combined with the binary values of C and D at the top in the same column.
For example, the cell in the upper right comer has a binary value of 00 I 0 and
the cell in lower right comer has a binary value of 1010.
Mapping a standard SOP Expression:
For an SOP expression in standard form, a I is placed on the Karnaugh map for
each product term in the expression. Each 1 is placed in a cell corresponding to
the value of a product term. For example, for the product term ABC, a I goes in
.the III cell on. a 3-variable map.
Page 208
IX- Computer Chapter # 6 Page # 209
When an so expression is completely mapped, there will be a number of I's on
the Karnaugh map equal to the number of product terms in the standard SOP
expression. The cells that donor have a 1 are the cells for which the expression
is 0. Usually, when working with SOP expression the s are left of the map. The
following steps and the illustration in figure show the mapping process.
Step 1. Determine the binary value of each product term in the standard SOP
expression.
Step 2. As each product term is evaluated, place a I on the Karnaugh map in the
cell having the same value as the product term.
Example: Map the following standard SOP expression on a Karnaugh map.
ABC + ABC + ABC + ABC
Solution:
The expression is evaluated as shown below. A "I" is placed on the 3-
variable Karnaugh map for each standard product .term in the expression.
ABC+ABC+ABC+ABC
001+010+110+ 111
Example: Map the following standard. SOP expression on a Karnaugh map.
ABCD + ABCD + ABCD .+ ABCD + ABCD + ABCD + ABCD
Page 209
IX- Computer Chapter # 6 Page # 210
Karnaugh Map Simplification of SOP Expression:
The process that results in an expression containing the fewest possible terms
with the fewest possible variables is called minimization. After all SOP
expression has been mapped, there are three steps in the process of obtaining
a minimum SOP' expressions: grouping the Is, determining the product term for
each group, and summing the resulting product terms;
Grouping the Is: You can gropes on the Karnaugh map according to the
following rules by enclosing those adjacent cells containing I s. The goal- is to
maximize the size of the groups and to 'minimize the number of groups.
1. A group must contain either 1, 2, 4, 8 or 16 cells. I n the case of a 3-
variable map, a eight cells is the maximum group.
2. Each cell in a group must be adjacent. to one or. more cells in that same
group, but all cells in the group do no! have to be adjacent to each
other.
3. Always include the largest possible number of 1 s in a group in
accordance with rule 1.
4. Each Iron the map must be included in at least one group. The s
already in a group can be included to another group as long 'as the
overlapping groups include
Page 210
IX- Computer Chapter # 6 Page # 211
Example: Groups the I 'sin each of the Kamaugh maps?
AB C 1 AB C 0 1
1 1
0 1 00 1
00 1 1 01 1
01 11 1 1
11 1 10
10
CD ABCD
ABCD
0 01 11 10
0 01 11 10
00 1 1 00 1 1
01 1 1 1 1
11 01 1 1 1
10 1 1
11 1 1 1
10 1 11
Solution.
The groupings are shown in here. In some cases, there may be more than one
way to group the 1's to from maximum groupings.
0 01 11 10
0 01 11 10 00 1 1
00 1 1
01 1 1 1 1 01 1 1 1
11
10 1 1 11 1 1 1
10 1 11
Determining the Minimum SOP Expression from Map:
When all the s representing the standard product terms in an expression are
properly mapped and grouped the process of determining the resulting
minimum SOP expression begins. The following rules are applied to find the
minimum product terms and the minimum SOP expression.
1) Group the cells that have Is. Each group of cells containing l s create one
product C term composed of all variables that occur in only one from
(either un complemented or complemented within the group). Variables
that occur both un complemented and complemented within the group
are eliminated.
Page 211
IX- Computer Chapter # 6 Page # 212
2) Determine the: minimum product term for each group:
For a 3variable map
A 1-cell group' yields a 3-variable product term,
A 2-cell group yields a 2-variable product term,
A 4-cell group yields a 1-variable term,
An 8-cell group yield a value of 1 for the Expression.
a) For a 4-variable map:
A 1 -cell group yields a 4-variable product term,
A 2-cell group yields a 3-variable product term,
A 4-cell group yields a 2-variable product term,
An 8-cell group yields a 1-variable term,
A 16-cell group yields a value of 1 for the expression.
3) When all the minimum product terms are derived from the Karnaugh
map, they are summed to from the minimum SOP expression.
Example:
Determine the product term for the Karnaugh map in minimum SOP
expression?
Solution:
In the above figure, the product term for the 8-cell group is 8 because the tells
within that group contain both A and A, C and C, and D and D, so these variables
are imitated. The common item all of them is B. The 4-cell group contains 8, B,E
and D, leaving the product term A C . The 2-cell group contains 8 and B,
leaving A CD as the product term. Notice how overlapping is used to maximize
the size of the group. The resulting minimum SOP expression is the sum of
these product terms:
B+ AC+ACD
Page 212
IX- Computer Chapter # 6 Page # 213
Example:
Determine the product terms for each of the Karnaugh maps in figure and
writer the resulting minimum SOP expression.
Solution:
The resulting minimum product term for each group is shown in figure. The
minimum SOP expression for each of the Karnaugh maps in the figure are:
(a) AB+BC+ABC (b) B+AC+AC
(c) AB + AC+ ABD (d) D + ABC + BC
6.9 EXERCISE
Q.1. What is Boolean algebra?
Ans. In 1850s, an' English mathematician George Boole developed of logic
circuits Boolean algebra is a convenient and systematic way of expressing and
analyzing the operation of logic circuits. The significance of these
developments was not realized at that time. Boolean algebra finds its
application to problems in the form of statements having answers either true
or false. The binary nature of it is linked with the computer development.
Define the following terms of Boolean algebra?
(a) Constants (20.14) (b) Variables (c) Truth table
(d) Complement (e) Logical operators (f) Boolean expression
Ans.
a. Boolean Constants: (2014)
In Boolean algebra, a set of constants has' only two elements 0 or L. They are
stored in Boolean Variables. Thus a Boolean constant is either 0 if not I or is I if
not O.
b. Boolean Variables:
The variables used in Boolean Algebra can be represented by the letters of the
alphabets such as A, B, C, X, Y, Z etc. Each variable must take one of the two
values 1 or O. These two values may be given different names such as TRUE or
FALSE, YES or NO, HIGH or LOW, UP or DOWN, ON or OFF etc.
b. Complement:
The complement is the inverse of a variable and is indicated by a bar over the
variable, For example, complement of the variable A is A.
Example.
( 1) IF A = 1 Then, A = 0
(2) IF A = 0 Then, A =1
Page 213
IX- Computer Chapter # 6 Page # 214
d. Truth Table:
A truth table is a table that shows the result of a Boolean expression for all the
possible combinations of the values given to the variable used.
e. Logical Operators:
In Boolean algebra, there are three basic operators, one unary operator NOT
and two binary operators AND and OR as shown in the following table.
.Operation .Symbol used Comments
NOT' Prime ( , ) or Bar ( ) ) Negation of the value
OR Plus (+ ) or Union (U) Logical addition
Dot ( . ) or Intersection (
AND Logical multiplication
e. BOOLEAN EXPRESSION:
A Boolean expression is an arrangement of variables and logical operators used
to express the operation of a logic circuit.
OR
An expression is a logical statement which is either True or False These
statement are represented by variable , operated by logical operation.
For example:
A+B=C
A+B+CD,A (B+CD)
Q.3what are the laws of Boolean algebra ?
Ans.
LAWS OF BOOLEAN ALGEBRA:
Laws of Boolean algebra are used to define the structure of Boolean
Algebra.
There are three basic laws of Boolean algebra .These are the same as in
ordinary algebra.
1. Commutative 2. Associative laws. 3. Distributive
laws.
(1) Commutative Laws :
The are two commutative laws used in Boolean Algebra.
(a) Commutative Law of addition:
If we reverse the order of addition of two elements the result will be
same which was before the reversal. This commutative law uses binary
operator (+)sign as Boolean sum or Boolean addition
For example:
A+B = B+A
Page 214
IX- Computer Chapter # 6 Page # 215
(b) Commutative Law of Multiplication:
If we reverse the order of multiplication of two elements the result will
be same which was before the reserve this commutative law use sign as
Boolean multiplication.
For example:
A.B=B,A
(2) Associative Laws;
These are two Associative laws used in Boolean Algebra
(a) Associative Law of Addition:
If there three elements a.b.c the sum of (a+b) + c will be same as a
(b.c) the associative laws of addition laws of addition is
A + (B + C) = (A + B) + C
(b) Associative Law of Multiplication:
If there are three elements a.b.c than the product (a.b) c will be
same as a (b.c) the associative laws of multiplication is
A . (B+C) = (A.B).C
1. Distributive Law of Multiplication Over Addition:
According to the distributive law: (Similar to multiplying bracket in
algebra) { += +
(a). A (B+C) = A.B+A.C += +
(b) A + (B.C) = (A+B) (A+C)
Q.4 Define and prove the different rules of Boolean algebra used to
simplify an expression.
Ans.
Rules of Boolean Algebra:
Rules of Boolean algebra are useful in manipulating and simplifying
expressions.
Rule1: A+0=A
A variable ORed with O is always equal to the variable.
Proof:
For A = 0
L. H. S = O+O
=O
= A ( R.H.S )
For A = 1
L.H.S = 1 + O
=1
=A ( R.H.S )
Page 215
IX- Computer Chapter # 6 Page # 216
Rule2: A + 1 = 1
A variable ORed with 1 is always equal to 1.
Proof:
For A = 0
L. H. S = O+1
=1
= ( R.H.S )
For A = 1
L.H.S = 1 + 1
=1
= R.H.S
Rule3: A + O = O
A variable ANDed with O is always equal to O.
Proof:
For A = 0
L. H. S = O+O
=O
= ( R.H.S )
For A = 1
L.H.S = 1 + O
=O
= (R.H.S)
Rule4: A.1=A
A variable ANDed with 1 is always equal to the variable.
Proof:
For A = 0
L. H. S = O+1
=O
=A ( R.H.S )
For A = 1
L.H.S = 1 + 1
=1
=A (R.H.S)
Page 216
IX- Computer Chapter # 6 Page # 217
Rule 5: A+A=A
A variable ORed with itself is always equal to the variable.
Proof:
For A = 0
L. H. S = O+O
=O
=A ( R.H.S )
For A = 1
L.H.S = 1 + 1
=1
=A (R.H.S)
Rule 6: A.A=A
A variable ANDed with itself is always equal to the variable.
Proof:
For A = 0
L. H. S = O+O
=O
=A ( R.H.S )
For A = 1
L.H.S = 1 + 1
=1
=A (R.H.S)
Rule 7: A+A=1
A variable ORed with its complement is always equal to 1.
Proof:
For A = 0
L. H. S = O+1
=1
= ( R.H.S )
For A = 1
L.H.S = 1 + 0
=1
= (R.H.S)
Rule 8: A.A=O
A variable ANDed with its complement is always equal to O.
Proof:
For A = 0
L. H. S = O.1
=1
= ( R.H.S )
For A = 1
L.H.S = 1 . 0
=0
= (R.H.S)
Page 217
IX- Computer Chapter # 6 Page # 218
Rule 9: A=O
The double complement of a variable is always equal to the variable.
Proof:
For A = O
L. H. S A= 1,A = O
=A
= ( R.H.S )
For A = 1
L. H. S A = O, A = 1
=A
= (R.H.S)
AAA
010
101
Equal
Rule 1 0: A + A . B = A
Proof:
This rule can be proved by applying the distributive law, rule 2-
and rule 4 as follows.
A + A . B =A( 1 + B' Factoring A (Distributive
law)
=A. I Rule 2: B + l> 1
=A Rule 4: A. 1= A
The proof is show in the Truth Table
A B A.B A+A.B
00 0 0
01 0 0
10 0 1
11 1 1
<--------------------Equal-------------------->
Page 218
IX- Computer Chapter # 6 Page # 219
Rule 11 : A + A' • B = A + B
Proof:
This rule can be proved as:
A + A . B = (A + A . B) +A'. B Rule 10: A = A+ A·.,B
=(AA + AB) + AB Rule 6 : A =AA'
= AA + AB + AA + AB Rule 8 : Adding AA = 0
= (A + A) (A + B) Factoring
= J . (A + B) Rule 7 : A + A = 1
=A+B
The proof is shown in the Truth Table.
A B A.B A+A.B A+ B
00 0 0 0
01 1 1 1
10 0 1 1
11 0 1 1
Equal
Rule 12: ( A + B ) ( A + C ) = A + BC (2014)
Proof:
This rule can be proved as follows
(A + B)(A +C:) = AA + AC+AB + BC Distributive law
=A +AC + AB +BC Rule 6: AA= A.
=A (1+C) + AB +BC Factoring "(Distributive law)
=A.1 + AB + BC Rule2 : '1+C = 1
=A(1+B)+ BC Factoring "(Distributive law)
=A. 1 + BC Rule 2 : 1+ B =1
=A+BC Rule 4 : A.1 = A
The Proof. js. shown in the Truth Table,
A B C A+B A+C (A+B)(A+C) A+BC
000 0 0 0 0
001 0 1 0 0
010 1 0 0 0
011 1 1 1 1
100 1 1 1 1
101 1 1 1 1
110 1 1 1 1
111 1 1 1 1
<------------------------------Equal------------------------------>
Page 219
IX- Computer Chapter # 6 Page # 220
Q. “tate a d p o e De Mo ga s theo e s.
Ans. De Mo ga s Theo e s:
De Morgan, a mathematician who knew Boole, proposed two theorems
that are an important part of Boolean algebra . They help in simplifying
complicated logical expressions.
1.XY = X+ Y 2. X+Y =X.Y
(1) XY= X+Y: (2014)
Definition:
The complement of a product of variable is equal to the sum of the
complement of the variable .
OR
The complement of a logical product equal the logical sum of the
complement
Proof : XY = X+ Y
The theorem can be proved the Turth table given below:
X Y x.y x.y X Y X+y
000 111 1
010 110 1
100 101 1
111 000 0
<------------------------------Equal------------------------------>
Hence Proved
(2) X + y = x .y : (2014)
Definition:
The complement of a sum of variable is equal to the product of the
complement of the variable .
The complement of a logical product of the complement
Proof : X+Y = X.Y
The theorem can be proved by the Truth table given below: X.y
X Y X+y X+y X Y 1
00 0 111 0
01 1 010 0
10 1 001 0
11 1 000
<------------------------------Equal------------------------------>
Hence Proved
Page 220
IX- Computer Chapter # 6 Page # 221
Q.6 what are the standard forms of Boolean expression?
Ans.
Standard From of Boolean Expression:
All Boolean expression regardless of their form can be converted into either of
two standard forms.
(i)The sum-of- products (SOP)From. (ii) the product-of- Sum (POS)From.
This makes the simplification of Boolean expression more systematic
and easier
(i) The sum-of- Products (SOP) From:
When two or more products are summed by Boolean addition, the
resulting expression is a Sum-of- Product (SOP)
OR
A Boolean equation that is the logical sum of logical products this
types of equation applies to an AND- OR circuit.
Example 1:
A + ABC
ABC + CDE + BCD
AB + ABC+ AC
An algebraic expression can be change into (SOP) by applying Boolean
Algebraic techniques. For example; the expression A (B + CD) can be converted
to SOP form by applying the distributive law.
A(B + CD) = AB+ ACD
Example 2:
Convert the following expression to SOP form.
(A +B) (B + C+ D)
Solution: (A + B) (B + C + D) = AB' + AC + AD + BB + Be + BD
(ii) The Product-of-Sums (POS) Form:
When two or more St'Ii11 terms are multiplied, the resulting
expression is a Product-Of - Sum (POS)
OR
A Boolean equation that is' the logical product of logical sum. This type of
equation applies to an OR-AND circuit.'
Example:
(A + B)( A + B + C )
(A + B + C )(C + D + E )(B + C + D )
( A + B )(A + B + C ) (A+C)
Page 221
IX- Computer Chapter # 6 Page # 222
Q.7 What is a Karnaugh Map? How can Karnaugh Map help in simplifying
a Boolean expression?
Ans. .Kamugh rnapping method helps to minimize the number of literal an a
Boolean expression: and 'thus reduces the number of gates required in digital
circuit for its. implementation. The following steps may be followed for
mapping and simplification of the Boolean function.
i) Identify the square corresponding to each term in the Boolean
expression.
ii) Enter value I In the respective square of the kamaugh map.
iii) Identify adjacent 1 's form group.
iv) Each two. adjacent 1 's may be. combined into a group to eliminate
one literal.
v) Each four adjacent I 's may be combined into a group to eliminate two
literal.
vi) Final expression consists of logical addition of the terms representing
the group in, the kamaugh map.
Q.8 Tick the correct answer.
(i) the complement of a variable is always :
a) 0 b) the inverse of the variable c)1 d) equal to variable
(ii) He Boolean expression A+B+C is :
a) bithe inverse of the variable"; b) 0 c)1 d) equal to variable
(ii) The Boolean expression" . A+ B+ C is:
a) A sum term b) a liter1 term c)a product term
d) a complemented term
(iii) The Boolean expression ABC D is:
A)a sum term B) a product term c) a literal term d)Always
(iv) According to the commutative law of addition:
a) AB + BA b) A = A + A
c) A+(B+.C)d(A+B)+C d)A+B=B+A
v) According to the associative law of multiplication
a) B=BB 'b) A (BC) = (AB) C c) A + B = B + A d) B + B (B+ 0)
(vi) According to the distribution law:
a) A (B + C) = AB + AC b) A (BC) = ABC
c) A (A+1)=A d) A+ AB = A
vii) Which one of the following is not a valid rule 01' Boolean algebra?
a) A +1 = I '. h) A = A c) AA = A d) A +0 = A
Page 222
IX- Computer Chapter # 6 Page # 223
A3-variable Karungh map has:
a) eights cells b) three cells ' c) six teen cells d) four cells
Q.9. Apply DeMorgan's theorem to each of the following expressions.
(i) A+B (ii) AB
= A+B = A.B
= A.B = A+B
= AB Ans. = A+B Ans.
(ii) A+B+C (iv) ABC
= A+B+C = A.B.C
= A.B.C = (A+B). (C+D)
= A+BC Ans.
(iv) A(B+C) (vi) AB+CD
= A-(B+C) = A.B.C
= A+(B.C) = A+B+C Ans.
= A+BC Ans.
(vii) (A+B)(C+D) (viii) AB(CD+EF)
= (A.B)+(C.D) = A.B.(C.D+E.F)
= (A+B)+(C+D)(E+F) Ans.
Q.10. Simplify the following expression as much as possible using Boolean
Algebra techniques?
(i) A(A+B) (ii) A(A+AB)
= AA+BB = AA+AAB
= A+AB = O+AAB
= A(1+B) = AB Ans.
= A(1)
= A Ans.
(iii) A(A+AB) (iv) BC+BC
= AA+AAB = C(B+B)
= A+AAB = C(1)
= A+AB = C Ans.
= A(1+B)
= A(1)
= A Ans.
(iv) ABC+ABC+ABC (vi) AB+ABC+A
= ABC+AC(B+B) = AB+A(BC+1)
= ABC+AC(1) = AB+A(B+1)(C+1)
= ABC+AC = AB+A Ans.
Page 223
IX- Computer Chapter # 6 Page # 224
Q.11 Use a Karnaugh map to simplify each expression to minimize SOP form?
(i) ABC+ABC+ABC (ii) ABC+A BC+A B C+ABC
Page 224
IX- Computer Chapter # 6 Page # 225
QUESTIONS FROM PAST PAPERS:
YEAR.2014:
Section "A".(Multiple Choice Questions) - (MCQs)
Q.1 (v) According to Distributive law:
*A(B'+C)=AB+AC *A(AC)=ABC (A+B)=(B+A) *8+B=B+C
Section "B" (Short -Answer Questions)
Q,2 Define: (b) Boolean constant
Q.6 State and prove De-Morgan's Theorem (a) XY =X+Y b) X + Y = XY
Q.7 Draw K-Map for the following: (a) AB+AB+AB
(h) ABC+ABC+ABC+ABC
Section "C" (Detailed-Answer Questions)
Q.16 (a) Draw and prove that truth table or the following:
(A+b)(A+C)=A+BC
YEAR 2013:
Section "A" (Multiple Choice Questions).- (MCQs)
Q.I (xiv) The Boolean expression ABC is an:
"!' Sun term * Literal term* Product term * Always
Section "B" (Short -Answer Questions)
Q. ll How many logical operators are in Boolean algebra'!
Section "C" (Detailed-Answer Questions) (No Questions)
Page 225
IX- Computer Chapter # 6 Page # 226
YEAR 2012:
Section "A';'(Multiple Choice Questions) - (MCQs) (No Questions)
Section B (Short = Answer Questions)
Q.7' Draw the '1' Map for the Following expression:
--- -
(i) AB + AB+ AB + AB (ii) ABC + ABC + ABC + ABC
“e tio C Detailed-Answer Questions)
Q.16(a) What are the laws or Boolean Algebra? Explain its operators
with the Truth table.
Q.17(b) Convert the following expression into S.O.P form:
(i) (A + B) (B + C + D) (ii) A (B + CD)
YEAR 2011:
Section" A" (Multiple Choice Questions) - (MCQs)
Q.1(vii). When .two or more sum terms are multiplied, the resulting
expression is a:
* POS * S.OP * POP * None of them
(viii) When corn mutative law or multiplication is written as:
*A+B=B+A * AB = BA
* A(B + C) = AB + AC * A + (B + C) = (A + B) +C
(xiv) The Boolean-expression ABC is a:
* Sum Term * Product Term * Literal Term * None of them
Section "B" (Short -Answer Questions)
Q.10 Prove the following rule of Boolean Algebra with the help of truth table.
(A + B) (A + C) = A + BC
Section "C" (Detailed-Answer Questions}(No Questions)
YEAR 2010:
Section "A" (Multiple Choice Questions) - (MCQs)
Q.1(xi) A 2cvariable K-Map has:
* two cells * four cells * Six cells * eight cells
Page 226
IX- Computer Chapter # 6 Page # 227
(xii) The Boolean expression ABC is a:
* S urn term * Literal term * product term *Always 1
Section "B" (Short -Answer Questions)
Q.2(ix)·Prove the following equation and also draw the truth table:
(X + Y) (X + Z)= X.+ YZ
(x) Draw Karnaugh Map for the following expression:
(a) ABC + ABC + ABC + ABC+ ABC (b) AB + AB + AB
Section "C" (Detailed-Answer Questions)
Q.5(a) Define the following terms of Boolean' Algebra:
(i) Constant (ii) Variable (iii) Logical operator
(iv)Complement (v)Truth table (vi)Boolean algebra
YEAR 2009:
Section "A" (Multiple Choice Questions) - (MCQs)
(No Questions)
Section "8" (Short -Answer Questions)
Q.2(xi) Prove the following equation and draw the truth table:
(A+ B) (A + B) = A + BC
(xiii) Use a Karnaugh Map to simplify each of the given expression:
(a) ABC+ABC+ABC+ABC (b) AB+AB+AB
Section "C" (Detailed-Answer Questions)
Q.4(a) What are the laws of Boolean Algebra? State their various types.
Q.5(a) Define De Morgan's Theorem and prove the following:
(i) XY = X + Y . (ii) X + Y = X'Y
Page 227
IX- Computer Chapter # 6 Page # 228
MULTIPLE CHOICE QUESTIONS (MCQs)
(1) The founder of Boolean algebra was ___________. (2014) (d)
(a) Charles Babbage (h) Blavise Pascal (c) George Boole
None of the above
(2)Boolean algebra used Binary values_____________as Boolean constants.
(a)O and J (h)Ot09' (c)Ot07 {d)OtoI5
(3)OR, AND and NOT are the__________operations.
(a) Relational. (h) Logical (c) Arithmetic (d) None of the above
(4) The associative law of addition is written as______________.
(a) A + B = B + A (b) A + (B + C) = (A + B) + C
(c) A + (B + C) = (A + B) (A + C) (d) None of the above
(5) The commutative law 01" addition for two variables is written as___________.
(a) A + B = A . B (h) A + B =B:« A (c) AB = A + B(d) None of the above
(6)The associative law of multiplication is written as___________.
fa) A.(B. C) = (A. B) C (b) ABC = BCA
(c) A (B + C) = AS + AC . (d) None of the above
(7) The complement is represented by a_________________Oil the variable.
(a) + sign ., . (h) Bar sign. (c) – sign (d) Dot sign
(8)OR operator' is represented by a_______________.
(a)'+ sign (b) Bar sign (c) - sign (d) Dot sign
(9) NOT operator is represented by_____________.
(a) +' sign (b) Bar sign (c) Dot sign (d)None of these
(10) AND operator is represented by_____________.
(a) + sign' (b) Bar sign (c) Dot sign (d) None of these
(11) When two or more product terms are multiplied the resulting expression
is________________.
(a) POS., (b) SOP (c) SUM term (d) None of these
(12) Which of the following operator is unary operation.
(a) OR . ,,':' (h) NOt '.' :.,' (c) AND (d) None of these
(13) The Boolean expression ABC is a________________.
(a)'Sum term '(b), Literal term (c) 'Product term (d) Always 1
(14) Inverse of the variable is called___________.
(a) Constant (b) Complement. (c).Variable . ,(d) None of these,
Page 228
IX- Computer Chapter # 6 Page # 229
(15) 'Boolean Algebra-Provides the operation and the rules For working with the
set_____________.
(a) A and 'B (b) 0 to 9 (c) 0 to 7 (d)0 and 1
(16) A+ A '" I is read as______________.
(a) A OR A is equal to 1 (b) A AND A always equal to I
(c)A NOT A is equal to I (d) None of above
(17) Boolean Algebra is being used extensively in designing the .___________used in
computers.
(a) Circuits .(h) Transistors (c) IC''S (d) None of them
(18) In- , an English mathematician George Boole developed a mathematical
system.
(a) 1850'S (h) 1~60'S' (c) 1870'S (d) 1880'S'
(19) Truth table is a table of all possible combinations of the_______________.
(a) Complement' (h) Constants (c) Variables (d) Logical operators
(20) There. are ________logical operators used in Boolean Algebra.
(a)2 (h) 3 (c)4' (d) 5'
(21) OR operator is represented by a ___________sign.
(a) "+" (b):">" . (c) " ". (d) None of them
(22) . 'The commutative law or addition for two variables is _________________
(2011)
(a)A+B=A+B (h)A+B=B+A .(c)·A+A=B+B·. (d) None of them
(23) SOP stands for________________.
(a) Second of private (h) Standard of product (c) Sum of product (d).None
of them
(24) when two or more product terms are summed by Boolean addition; the
resulting expression is a_____________.
(a) Sum of 'product (b) Product of Sum (c) Of product sum .
(d) None of them
(25) A Karnaugh map-is similar to a_______________.
(a) Truth. table (b) Complement (c) Variable - (d) Constants
(26) A 2cviuhble K--Map has_______________.
(2010)
(a) 2 cells' (b) 4 cell (c) Eight cells' (d) Sixteen cells'
(27) When, two or more Sum term are multiplied; the resulting expression is a:
(2011)
(a) POS (b);SOP (c}POP (d) None of them
Page 229
IX- Computer Chapter # 7 Page # 230
CHAPTER-7
COMPUTER STUDIES
CLASS-IX
Page 230
IX- Computer Chapter # 7 Page # 231
COMPUTER SOFTWARE Page # 3
Page # 7
7.1 Software with its types. Page # 8
7.2 Dos with its types/commands and characteristics of Dos. Page # 9
7.3 Wild card Characters with their use. Page # 11
7.4 Syntaxes and Purposes ·of Internal Commands of Dos. Page # 13
7.5 Syntaxes and Purposes of External Commands of Dos.
7.6 Exercise. Page # 19
Page # 21
Differences.
(1) System and Application Software.
(2) Internal and External Commands of Dos.
(3) Dos and Windows.
7.7 Past Papers Questions.
7.8 Additional Multiple Choice Questions (MCQs)
Page 231
IX- Computer Chapter # 7 Page # 232
7.1Software:
The Programs in a computer system range. from those which control the-
operation of the Computer to those. which aid its performance. The
manufacturers provide the processors with. special internal programs usually
called "Operating System" in. addition. there are other programs which are
application oriented. The entire group program is called Computer Software
Soft wear is the program used to run a computer, usually stored on disk Or
ROM.
OR
A set of more than one program is called software. It used for the user's
activities.
Types of Software:(2013)
Software can be classified into two main groups,
(1) System Software.
(2) Application Software.
This software s are further divided into various categories as shown in the
chart below.
Page 232
IX- Computer Chapter # 7 Page # 233
1 ) SYSTEMS SOFTWARE;
The program that directly related to the computer hardware is known
as system software, Essential for the operation and control of the computer
(whatever the task). A set of Program required 10 implement certain functions
in the computing system designed to control the operation of a computer
system. Defines the system software without this Programs no interaction is
possible with computers. System software is normally supplied (as part of- a
new computer and may be stored internally ROM chips or externally on floppy
disks. Some of the main system programs are:
(i) Operating System
(ii) Language Translator
(iii) Data Management Soft wear
(iv) Editors
(v) Utility Software
i) Operating Systems: (2013,2010)
All computers need program to control the various peripheral
devices (printers, etc) and to supervise the loading and saving of files
using disks. These functions are carried out by one or more programs known
as the operating system. The computer user communicates with the operating
system by entering commands in immediate mode, such as RUN, SAVE. PRINT,
etc. The operating system is used to create a link between user and Hardware.
Functions of an operating system:
1. Control basic input and output devices.
2. Allocates system Resources.
3. Manages storage space.
4. Supports application software.
5. Maintain security.
6. Detects Equipment failure.
ii) Translation programs/language Translator: (2012,2011)
Assemblers are programs used for translating other programs in
assembly (low level) language, into machine code. Compilers and
interpreters are used to translate high level languages into machine
code/machine language.
Types of language Translators: (2012)
Page 233
IX- Computer Chapter # 7 Page # 234
a) . The Compiler:
The compiler takes the complete program in high-level language and
translates this entirely into machine code. Any errors in compiling are
reported. The resulting machine code any be permanently saved on disk
and run in the future an infinitum. The compiler is itself a complex
program and may be too large for use on the smaller microcomputers (in
this case an interpreter is used). One disadvantage is that compiled
programs are difficult to edit.
The computer or the language processor converts the entire program into
machine language before execution. A program written by a programmer
in a language .other than machine language is called a source program.
b) The Interpreter:
The interpreter is a simple program than the compiler and is used
on..microcomputers with smaller memories. The interpreter results in
slower program execution than the compiler. It differs from a compiler.
which translates the entire. ,source program into object program without
undergoing its execution.'
c) Assembler:
A program written in assembly language must be translated into true
binary machine code using an assembler and assembler is itself a program.
The assembler is a language translator for low level programming language
called "Assembly Language .
iii) Data Management Software:
Data management software includes database and file management programs
that manage data for an operating system. They can organize, update print
data.
Page 234
IX- Computer Chapter # 7 Page # 235
iv) Editors:
Editors allow the user to type in a program, generate text and make
modifications whenever necessary. A program is first written in an editor and
then is compiled. It is, possible that the compiler of any language has its own
editor for writing programs
v) Utility Software:
Although an operating system usually works behind the scenes; there.
are' times when you need utilities or utility software, to do things such as
prepare disk to store data detect computer viruses on a disk. prepare, copy,
merge, sort out and update files:' A text editor utility software such as word
star, word perfect, Norton's editor etc.
Utility programs:
These are systems programs often needed for routine "housekeeping" tasks.
Typical utility programs are used to:
• Prepare (formal) a new disk with tracks and sectors
• Copy files from one disk to another
•. Copy a graphics screen onto paper (screen "dump")
• Carry out sorting (into alphabetical or numerical order)
• Che k spelli g i a word processing document
2) APPLICATIONS SOFTWARE:
These Software are used to control the activities of users. They are' also
referred as: productivity software is developed to help the user to increase
his/her productivity. The application software 'is used for a particular task in
business, industry and education e.g. word-processing. Application software
is the Procedure written by the user to solve particular problem or to achieve
specific results.
Page 235
IX- Computer Chapter # 7 Page # 236
Types of Application Software:(2010)
Application Software can be divided into the following two major classes.
i) General Purpose Application Software. (20I0)
ii) Special Purpose Application Software.(2010)
i) General-Purpose Application Software:
These are also called packaged software or commercial software A
software can be applied to a wide variety of tasks: Some of the main
general purpose Application, software s are MS Office; Corel Draw,
Adobe Photoshop, In page, etc
ii) Special-purpose Application Software:
The Software that is designed to perform a specific task is known as
special purpose application software. This is called. Custom software s
Custom Software for the tasks of a large organization may –be extremely
complex and, takes a lot of time to develop.
For example.. Inventory Control s Software to maintain Bank Accounts;
Software used in Airline Booking System, etc.
DIFFERENCES BETWELN SYSTEM AND' APPLICATION 'SOFTWARE
System Software Application· software
1)System software is also known as: 1) Application software, is also known
System package as Application package.
2) It is a set of one or more programs, 2) lt is a .set of one or more programs.
Designed to control the operator of designed to carry out operation for a
computer system. specified application.
3) These program do not solve a 3) These programs solve a specific
specific problem problem.
4) System packages .support the- 4. Application packages in via system
running of other of software They cannot control of the peripheral
communicate with packages devices.
peripheral-devices.
5)DOS, WINDOWS and UNIX are the 5) GWBASIC, COBOL, VB, MS-Word,
examples of system software. MS-Excel are the examples of
application software
Page 236
IX- Computer Chapter # 7 Page # 237
7.2 DOS
(Disk Operating System)
DOS stands for Disk Operating System. Disk Operating System is designed to
operate the IBM Personal Computer or compatibles, is basically a collection of
soft a e p og a s that help to a age the Pe so al Co pute s esou es
that is. System, Board, Disk Storage, Printers, Keyboard, Visual, Display Unit,
etc and direct the fundamental computer operations. A computer system
minus the operating system is a useless piece of machine. With an operating
system you are able to interact with the computer and instruct it what to do.
DOS is thus like and efficient manager in an office , supervising the inputs to
the office, assigning it to appropriate staff member along with the necessary
instructions.DOS perform operating dealing with the disk and its data. A
command is a way of communication with the computer.
CHARACTERISTICS OF DISK OPERATING SYSTEM:
Disk operating system programs are the programs are the programs needed to
operate the computer. Operating system programs supervise the operations of
the computer. Input/output, debugging, storage assignment tasks, compiling
a d epo ti g s ste status a e so e of the ope ati g s ste s tasks.
TYPES / COMMANDS OF DOS:
There are two types of DOS commands.
1. Internal commands.
2. External commands.
INTERNAL COMMAND:-
The internal command is a command, which is present in the system. It is a part
of the COMMAND.COM program. If you type in any of the internal commands,
such as COPY, irrespective of which disk drive is operational, you will still be
able to use the COPY command Putting it simplify, once the DOS gets resident
in the memory, for internal command usage. The system does not refer to the
DOS disk or the system Disk by takes the required instruction from the memory
resident portion of DOS.
Page 237
IX- Computer Chapter # 7 Page # 238
EXTERNAL COMMAND:-
External commands are those when MS-DOS is fully present. Before an external
command can be put to use, it first loaded. As a result you must have the MS-
DOS system Disk in the computer to make use of an external commands are
part of the standard MS-DOS system, but are not memory resident. They
provide some extra facilities to the basic MS-Dos operating system. Most of the
utility programs make up the external commands.
DIFFERENCE BETWEEN INTERNAL AND EXTERNAKL COMMANDS
Internal Commands External Commands
1) Internal commands are saved in RAM.
2) These command are the part of 1)External commands are saved in Disk.
command. Com. 2)These are separate programs, which are
3) These commands are transferred into present on disk
3) These commands are not transferred in
computer, memory at the time of o pute s e o at the ti e of
booting the computer system. booting computer system
4)Internal command cannot be displayed 4) Internal command can be displayed
deleted, copied, and renamed deleted, copied, and renamed.
5)Internal command do not have any file 5)External command have file extension
extension. of (Com, Exe, Sys, Bat).
6)Example of internal commands are Cls, 6)Example of internal commands are
Date, Time, ver. format, Disk copy, Label, etc.
7.3 What are wild card characters?
While looking for a particular file (using DIR command to see the directory
or DEL command to delete files), You can use two special characters called will
card.
(1) A question mark (?) can take the place of any single characters
(2) An asterisk (*) can replace any group of characters, ever the entire file
name or extension. This enables us to execute a command effecting all
of files in the group without entering each file name separately.
What is a file?
A collection of bytes representing a program or data , organized into records
and stored as a named group on a disk.
What is a subdirectory?
A directory is contained within another directory or subdirectory.
Technically all directories other than the root directory are subdirectory.
Page 238
IX- Computer Chapter # 7 Page # 239
REFERENCE SYNTAX NOTATION:-
The following syntax notation is used in this chapter for both DOS and
BASIC commands.
CAPS Item in capital indicate Keywords.
Italics Items in italics represent information that you must supply.
[ ] Items inside square brackets are optional.
…. Items followed by ellipses can be repeated.
{ } Braces indicate that you have a choice between two or more
items.
I Vertical bars separate the different choice inside braces.
: Vertical ellipses are used in syntax line and program examples to
show that a portion of program is omitted.
You must enter all punctuation including commas, parentheses,
semicolon hyphen, and equal sign, exactly as shown.
Somme internal and external commands of Dos with their purpose and
syntax are listed below.
INTERNAL COMMANDS OF DOS
1. CLS (Clear the screen) 9. VER (VERSION)
2. DIR (Disk information Report) 10. MD-MKDIR (MAKE DIRECTORY)
3. COPY 11. RD-RMDIR (REMOVE DIRECTORY)
4. TIME 12. PATH
5. DATE 13. PROMPT
6. REN OR RENAME 14. TYPE
7. DEL (DELETE) 15. CD-CHDIR (CHANGE DIRECTORY)
8. VOL (VOLUME)
16. COPY CON
Page 239
IX- Computer Chapter # 7 Page # 240
EXTERNAL COMMAND OF DOS
1) CHKDSK 8) TREE
2) FORMAT 9) ATTRIB
3) DISKCOPY 10) UNFORMAT
4) DISCOMP 11) UNDELETE
5) XCOPY 12) DOSKEY
6) BACKUP 13) SYS (SYSTEM)
7) LEBEL
7.4 SYNTEXES AND PURPOSE OF INTERNAL COMMANDS OF DOS:
CLS (Clear Screen Command)
Purpose: Cleans the screen
SYNTAX : CLS
DIR (Directory Command)
Purpose: Lists either all the directory entries, or only those for
specified files.
SYNTAX : DIR [drive:] [path] [file name [ext]] [/p] [/w]
Copy (File Copy Command)
Purpose: Copies one or more files to the location you specific
SYNTAX: COPY [drive:] [path] filename [.ext] drive: [path]
DATE (Display / sets Time)
Purpose: displays the date and asks for the new date.
SYNTAX: DATE [mm / dd / yy]
TIME (Display / sets Time)
Purpose: Displays the dater and asks for the new date.
SYNTAX: Date [mm/dd/yy]
REN/RENAME (Rename File Command)
Purpose: Changes the name of a file.
Page 240
IX- Computer Chapter # 7 Page # 241
SYNTAX: REN [drive:] [pathename] filename filename2
DEL / ERASE
Purpose: Deletes the files you specify
SYNTAX: DEL [drive:] [path] [filename [p/].
ERASE [drive:] [path] filename [P/]
Switch p/ prompt you for confirmation before deleting the specified file.
VOL (Volume)
Purpose: Displays the disk volume labelo and serial number.
SYNTAX: VOL [drive:]
VER (Version)
Purpose: Displays the MS-Dos version number.
SYNTAX: VER
MD / MKDIR (Make Directory)
Purpose: Creates a subdirectory on the specified disk.
SYNTAX: MD [drive:] [part] or MKDIR [d:] path
PROMPT
Purpose: Changes the appearance of the command prompt.
SYNTAX: PROMPT[text]
COPY CON
Purpose: Create a new file in DOS
SYNTAX: Copy con [drive:] [Path] [filename.ext]
PARAMETER:-
Text:
Specifies any text and information you want included in your system
prompt. The following list shows the character combinations you can
include instead of, or in addition to, any character string ($) in the text
parameter. The list includes a brief description of the text or information
that each character combination adds to your command prompt.
Page 241
IX- Computer Chapter # 7 Page # 242
$Q = (equal sign)
$$ $ (Dollar sign)
$T Current time
$D Current date
$P Current drive and path
$V MS DOS version number
$N Current drive
$G >(greater-then sign)
$L < (less-then sign)
$B 1 (pipe)
$_ Enter Linefeed
$E ASCII escape code (code 27)
$H Backspace (to delete a character that has been written to the
prompt command line)
7.5 SYNTAXES AND PURPOSES OF EXTERNAL COMMANDS OF DOS:
Format (Disk initialize command)
Purpose: It is used of FORMAT the disk permanently.
SYNTAX: FORMAT [drive name:] [/s][/v]
CHKDSK (Check disk command)
Purpose: Analyzes the directories, files, and the file allocation table
on the designated or default drive and produces a disk
and memory status report.
SYNTAX: [drive name:] [path] CHKDSK
DISCOMPY (Copy diskettes only)
Purpose: Copies the contents of the diskette in the SOURCE drive
to the diskette in the TARGET diskette
SYNTAX: DISKCOPY [drive:[drive]]
DISCOMP (Copy file & Directories)
Purpose compares the contents of the diskette in the first
specified drive to the contents of the diskette in the
SYNTAX: second specified drive.
XCOPY DISCOMP [d:]d:]]
Purpose: (Copy files & Directories)
Copies files and directories, including low-level
SYNTAX: directories, it they exist.
BACKUP XCOPY [drive:] [pathname]
Purpose: (Backs up file (s))
SYNTAX: Backups one or more files form one disk to another.
LABEL [drivel :] [path] [filename] drive2:]
Purpose: (Updates label on a disk)
Creates, changes, or deletes the volume label on a disk.
Page 242
IX- Computer Chapter # 7 Page # 243
SYNTAX: LABEL [drive:] [label]
TREE (Display the path, directory and subdirectory)
Purpose: Graphically displays the path (and, optionally, lists the
contents) of each directory and subdirectory on the given
Format: Drive.
ATTRIB TREE [drive] [path]
Purpose:
Function displays or modifies a file attribute byte i.e.
SYNTAX: allows you to set the read attribute of a file to read-only
Remarks:- or to display the attribute of a file.
[d:][path] ATTRIB [+A][-A][+R][-R] file spec [/s]
UNFORMAT:- [d:][path] before ATTARIB to specify the drive and path
Purpose: that contains the drive and path that contains the ATTRIB
command file.
Format:- +A di e ts ATT‘IB to set a file s a hi e it.
UNDELETE:- - A di e ts ATT‘IB to lea a file s a hi e it.
Purpose: +‘ di e ts ATT‘IB to set a file s ead-only bit.
-‘ di e ts ATT‘IB to lea a file s ead-only bit.
SYNTAX:
DOSKEY: Restores a disk that was erased by using the FORMAT
Purpose: command:
UNFORMAT drive [/L][/test][p]
SYNTAX:
SYS: Restore files that were previously deleted by using the
Purpose: <DEL> command.
Undelete [[drive:][path][filename]
SYNTAX:
Remarks: Loads the DOSKEY program into memory. The DOSKEY
EDIT: program recalls MS-DOS commands and enables you to
Purpose: edit command lines and create and run macros.
DOSKEY [REINSTALL] [/BUESIZ=size][/MACROS]
SYNTAX: [History] Insert/Overstake) [macro name]
To make the system disk bootable, COMMAND.COM
should be separately copied.
[drive:][path] SYS target drive:
Target drive specifies the target disk for the system file.
Edit is a text a editor program. This program is used to
create, modify and print text file batch files and DOS
configure files.
EDIT [drive:][Path][filename]
Page 243
IX- Computer Chapter # 7 Page # 244
DIFFERENCES BETWEEN DOS AND WINDOWS
DOS WINDOWS (2012)
1) DOS is a single user single tasking 1) Windows is a single user multi
operating system. tasking operating system (2011)
2) DOS uses a text base interface. 2) Windows uses a colorful graphics
interface
3) We just can type-in commands 3) In Windows the commands are
located on the screen in form of
pictures called icons.
4) It is difficult to operate 4) It is easy to operate.
5) We cannot use mouse in DOS 5) We can use mouse in WINDOWS
7.6 Exercise
Q.1 What is a Software? (20 l3)
Ans. Software is a general term used for computer programs. A
Computer program planned is step by step set of instructions that
directs the computer what to do and how to do. It makes the computer
useful. The term software refers to the non-physical elements of a
computer.
OR
A set of more than one program is called software. It is used for the user's
activities.
Q.2. Describe various types of software? (2013)
Ans. There are two basic types of software.
1. Systemsoftware. 2. Application software
1) SYSTEM SOFTWARE:
The programs directly related to the computer hardware and perform tasks
associated with controlling and utilizing computer hardware are know as
system software, this software does not solve a specific problem.
TYPES OF SYSTEM SOFTWARE:
There are five types of system software.
(i) Operating system
(ii) Language translators.
a) Interpreter b) Compiler c) Assembler
(iii) Data management software.
(iv) Editors
(v) Utility software
Page 244
IX- Computer Chapter # 7 Page # 245
(i) Operating System
Operating system is a set of programs that controls and supervises the
hardware of a computer and provides services to application software,
programmers and uses of computer.
A ope ati g s ste is used to eate a li k / use s a d o pute s
ha d a e
The primary goal of an operating system is to make the computer convenient
to use, the secondary goal is to use the computer efficiently following are some
of the popular operating system used.
In personal computers: Dos windows, Unix Linux etc.
(ii) Language translators:
Language translators are the programs that are used to convert source
program into object program, because the hardware cannot understand the
source program directly.
Type of translators:
There are three types of translators.
a) Compiler b) Interpreter c) Assembler
a) Assembler:
Assembler is a program that converts an assembly language program
into machine language/machine code.
b) Compiler:
Compiler translator the whole program at once from high level language
into machine language.
c) Interpreter:
Interpreter translates the whole program line-by-line. Interpreter does
not make any object file and it translates the program every time you
will execute it.
(iii) Data-management 'software:
Data management software includes database and file management programs
that manages data for an operating system.
(iv) Editors:
Editors allow the user to type-in a program, generate text and make
modifications whenever necessary. A program is first written in an editor and
then is compiled.
Page 245
IX- Computer Chapter # 7 Page # 246
(v) Utility software:
These software are the readymade programs that users can purchase as
separate products to perform a wide range of functions. Examples are PC-tools,
scan disk, antivirus etc.
2) APPLICATION SOFTWARE:(2010)
Application software s are programs that help a user to perform a specific job.
It helps the user work faster, more efficiently and provide more productivity.
Types of Application software:
These are called packaged software or commercial software. -
(i) General-Purpose Application Software.
(ii) Special-Purpose Application Software.
(i) General-Purpose Application Software:
These are called packaged software or commercial software. A single software
can be applied to a wide variety of tasks, These softwa e s i lude Ms-office,
Corel" Draw, Adobe-Photo shop, etc.
ii) Special Purpose Application Software:
The software that is designed to perform a specific task is known as special
purpose application software. The examples of these software s are software
to process inventory control, software to maintain bank accounts etc.
Q3: What is the difference between Application software and a system
Software'?
Ans.
~ ';SYSTEM SOFTWARE APPLICATION SOFTWARE
1) System software is also known as 1) Application software is also known
System package. Application package.
2) It is a set of one or more programs, 2) It is a set of one or more programs
designed to control the operations of designed to carryout operation for a
computer system. specified application. .
3) These programs do not solve a specific 3) These programs solve a specific
problem. problem.
4) System packages support the running 4) Application packages run via system
of other software, communicate with packages. They can not control the
• peripheral devices.
peripheral devices ..
5) DOS, WINDOWS and UNIX are the 5) GWBASIC, COBOL, VB, MS-Word,
examples of system software. MS-Excel are the examples of . .
'application software.
Page 246
IX- Computer Chapter # 7 Page # 247
Q4: What is an operating system? (2013. 2010)
Ans. Operating System:
Operating system is a set of programs that controls and supervises the
hardware of a computer and provides services to the application' software,
programmers and uses of computers.
"An operating system is used to create a link between users. and computers
hardware. Some popular operating system are, Dos, Windows, Unix, Linux, etc.
OR
1. Control basic input and output devices.
2. Allocates system Resources.
3. Manages storage space.
4. Supports application software.
5. Maintain security.
6. Detects Equipment failure.
Q.5: What are language translators? Define each. (2012, 2011)
Ans. Language Translators:
Language Translators are the programs that converts source programs
into object programs.
Types of Language Translators:
(a) Assembler (b) Compiler (c) Interpreter
a) Assembler:
Assembler is a program that convert an assembly language program into
machine.
b) Compiler:
Compiler' translates the whole program in a way that it translates the
high level language into machine language.
c) Interpreter:
Interpreter translates, the 'whole program line -by-line. Interpreter does
pot make any object file and it translates the program every time you
will execute it.
Q6: What are the characteristics of Disk Operating System? (2013)
Ans.: Disk Operating system' programs are the programs needed to operate
the computer. Operating system programs supervise the operations of
the computer. Input/output, debugging, storage assignment tasks..
compiling and reporting system status are some of the operating
systems tasks.
Page 247
IX- Computer Chapter # 7 Page # 248
Q7.What are the types of DOS commands?
Ans. Types of Dos Commands:
The are two types of Dos Commands
1) .Internal Commands. 2) External Commands.
Q8: Differentiate between internal and external commands.
(2014, 2012)
Ans.
, Internal Commands External Commands
1 }Internal. command's are saved in RAM 1) External commands are saved in disk,
2) These commands are the part of 2) These are separate programs, which
Command. Corn. are present on disk.
3) These commands are transferred into 3)These commands are not transferred in
computer's memory at the time of computer's memory at the time of
booting the computer system. booting computer system.
4) Internal command cannot be 4) External commands can be displayed,
displayed, renamed deleted, copied and copied, deleted and renamed.
renamed.
5) External commands have file
5) Internal commands do not have any
file extension; extension of (Com, Exe, Sys, Bat).
6) Examples of internal commands are. 6) Examples of external commands are
Cls, Date, Time, Ver, etc. Format Disk copy, Label, etc.
Q.9: What are wild-card characters? Why are they used? (2011)
Ans. Wildcard Characters:
While looking for a particular file (using DIR command to see the
directory or DEL command to delete files), you can use two special characters
called wild cards.
Use of Wildcard Characters:
(1) A question mark (?) can take the place of any single character
(2) An asterisk (*) can replace any group of characters, ever the entire file
name or extension. This enables us to execute a command affecting all
of files in the group without entering each file name separately.
Page 248
IX- Computer Chapter # 7 Page # 249
Q10. What is a Directory? What Dos commands are used to create,
change and Delete a directory?
Ans. Directory
A directory contains information about each file as its name, size in
bytes and the date and time they were created or last updated.
(i) MKDIR or MD command is used to create a directory.
(ii) CHDIR or CD command is used to change a directory.
(iii) RMDIR or RD recommend is used to delete an empty 'directory.
(iv) DEL TREE command is used to delete directories and their contents
(files and sub directories)
Q.11 Give the appropriate DOS command for the task given below?
(i) Copy the entire contents of a disk to another disk.
Ans. DISKCOPY A: B:
(ii) Create a prompt of Your- name with:\> symbols.
Ans. PROMPT AMMAR. P$g.
(iii) Show the list of all files whose name starts with the lette A.
Ans. DIRA.*.*
(iv) Copy all those files Irorn C: drive to A: drive whose extension is DOC.
Ans. C:\> COPY *.OOC A:
(v) Create a directory of' your name on "C' drive". (2011).
Ans.: C:\> MO Y AQOO[3 ORMO C:\ HASEEB
(vi) Delete all files' from "A" drive with permission to delete each file.
Ans: A:\>DEL*.*/P ORDELA:\*.*/P
(vii) Rename a file SAM PLEOTXT 'as TESTO TXT
Ans.: REN SAMPLE·. TXT TEST. TXT
(viii) Display all the contents of a file PROFILE .T. Xf on monitor. (20)2)
Ans. TYPE PROFILE.TXT
(ix) Change directory from ABC to ROOTO.
Ans.: A:\ ABC>CD\
x) Remove a directory named XYZ form C drive.
Ans. C:\> RO XYZ OR RD C\XYZ
(xi) Format a disk in drive" A" making it bootable.
Ans.: FORMAT A:lS
(xii) Check the contents of disk in drive A for possible errors.
Ans.: A:\> CHKDSK ORCHKDSK A:
(xiii) Label the disk in drive A with your name.
Ans.: A:\> LABEL AASHIR
Page 249
IX- Computer Chapter # 7 Page # 250
(xiv) Create a text tile with any name.
Ans: Copy CON Y AQOOB. TXT OREDIT HASEEB.TXT
(xv) Prepare a bootable floppy disk
Ans: C:\> SYS A:
(xvi) Copy all files with all subdirectories from SAMPLE-directory of C: drive
A: drive.
Ans: XCOPY C:\ SAMPL,E A:'
xvii) Print a file XYZ. TXT to printer.
Ans: TYPE XYZ. TXT> PRNOR PRINT XYZ. TXT
xviii) Delete the entire directory TEST.
Ans: DEL TREE TEST
(xix) Display volume label of C: drive.
Ans: VOL C:
(xx) Check which version of DOS is running on your computer?
Ans: VER
Q12: Fill in the blanks:
(i) DOS stands for Disk Operating System
(ii) Wildcard characters used in DOS are ? and * .
(iii) TI1e PROJECT signals 'that system is waiting for you to give some
commands.
(iv) The loading of operating system into memory is called booting process
OR Boot Strapping
(v) Operating Systemic a set of programs that controls and supervises the
operations of the computer.
(vi) DOS commands arc grouped into internal command s and external
Commands.
(vii) Compiler translates the whole program at a time and stores the
translated program on disk.
(viii) Commands l Language a way of communicating with the computer.
(ix) The command displays the contents of a file.
(x) The PATH command searches in a list of specified subdirectories for
command or program files.
Q 13: Tick the correct answer:
(i) An operating system is a:
(a) set of users (b) application program
(c) self programs (d) supervisor program.
(ii) The command that clears show current date in a prompt is:
(a) CLEAR (b) CLS (c) CLR (d) CLEAN
(iii) The command that can show current date in a prompt is:
(a) PROMPT $date (b) PROMPT
(c) PROMPT Sp (d) PROMPT $d
Page 250