2. Number System Conversion & Boolean logic
In this chapter, you will be learning about followings
Number System and their conversion
Boolean Logic
Logic gates
Topics to be covered:
Introduction to number system
Types of number system
Number system conversion
Boolean algebra
Logic gates
Law of Boolean algebra
Class 11 Unit 2 By: SD 2
3. Number system and their conversion
The system concerned
with the number and
represented by sequence of
digits is called number
system.
There are two types of
number system: Positional
& Non-positional number
system.
Class 11 Unit 2 By: SD 3
4. According it the order of writing symbols for a number, number systems are divided into two
types.
A) Positional Number System:-
Each digits has unique position. Positional number is easy for arithmetic computations.
Different position of the same symbol signifies different meaning (values).Examples of
positional number systems is decimal, binary etc.
Example: - 294=200+90+4 and 429=400+20+9. Therefore 294and 429 are different.
B) Non-Positional Number System:-
There is no any unique position of the digits. Examples of non-positional number systems are
Roman numbers, Greek numbers etc. Example:- I,II,III,IV,V,VI,X,L,M etc. In today’s world non-
positional number systems are rarely used because of this complex nature and difficulty in
arithmetic.
Class 11 Unit 2 By: SD 4
5. There are 4 types of positional number system and its base are given
below:
Number System Base
Binary Number System 2
Octal Number System 8
Decimal Number System 10
Hexadecimal Number System 16
Class 11 Unit 2 By: SD 5
6. Binary number system.
The number system having base or radix 2 and consists of two digits: 0 and 1
is called Binary number system.
Example: (1001)2, (101)2,𝑒𝑡𝑐.
Octal number system.
The number system having base or radix 8 and consists of eight digits: 0, 1, 2,
3, 4, 5, 6 and 7 is called Octal number system.
Example: (157)8, (136)8,𝑒𝑡𝑐.
Class 11 Unit 2 By: SD 6
7. Decimal (denary) number system.
The number system having base or radix 10 and consists of ten
digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 is called Decimal (Denary)
number system.
Example: (1978)10, (101)10,𝑒𝑡𝑐.
Hexadecimal number system.
The number system having base or radix 16 and consists of sixteen
digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 , 9 and alphabets A, B, C, D, E and F is
called Hexadecimal number system.
Example: (1978)16, (101)16,(𝐵𝐴𝐶)16,𝑒𝑡𝑐.
A 10
B 11
C 12
D 13
E 14
F 15
Class 11 Unit 2 By: SD 7
9. (A) From other Number System to Decimal
We should multiply each digit by its base.
For example:
i) Convert (11111)2 to its decimal equivalent.
Solution: Converting from Binary to decimal, we get
Face Value 1 1 1 1 1
Place Value 24 23 22 21 20
Here,
=1x24+1x23+1x22+1x21+1x20
=1x16+1x8+1x4+1x2+1x1
= 16+8+4+2+1
= (31)10
Class 11 Unit 2 By: SD 9
10. ii) (1011.01)2= (?)10
Solution: Converting from Binary to decimal, we get
Face Value 1 0 1 1 . 0 1
Place Value 23 22 21 20
2-1 2-2
Here,
=1x23+0x22+1x21+1x20+0x2-1+1x2-2
=8+0+2+1+0+0.25
= (11.25)10
Class 11 Unit 2 By: SD 10
11. iii) (1570.04) 8= (?)10
Solution: Converting from Octal to decimal, we get
Face Value 1 5 7 0 0 4
Place Value 83 82 81 80 8-1 8-2
Here,
=1x83+5x82+7x81+0x80+0x8-1+4x8-2
=512+320+56+0+0+0.0625
= (888.0625)10
Class 11 Unit 2 By: SD 11
12. Example: (CAB)16=(?)10
Face Value C A B
Place Value 162 161 160
Here, =Cx162+Ax161+Bx160
=12x256+10x16+11x1=3072+160+11
= (3243)10
Class 11 Unit 2 By: SD 12
13. (B) From Decimal to Other Number System Conversion
i) Decimal to Binary
(456)10= (?)2
Solution:
Converting from decimal to binary, we get
Class 11 Unit 2 By: SD 13
15. Binary to Octal & Hexadecimal conversion
Class 11 Unit 2 By: SD 15
16. Example: convert (10110101)2 into octal.
Solution:
Dividing the given binary number (10110101)2
into groups of 3 bits from right to left, and
appending 0’s at leading position, we have,
Example: convert (10101011101)2 into
hexadecimal
Solution:
Dividing the given binary number
(10101011101)2 into groups of 4 bits from binary
point to left and binary point right and appending
0’s at leading or at trailing position to make each
group of four bits, we have,
Binary bits: 0101 0101 1101
Equivalent hexa: 5 5 13(D)
𝑻𝒉𝒆𝒓𝒆𝒇𝒐𝒓𝒆, (𝟏𝟎𝟏𝟎𝟏𝟎𝟏𝟏𝟏𝟏𝟎𝟏)𝟐= (𝟓𝟓𝑫)𝟏𝟔
Class 11 Unit 2 By: SD 16
18. Hexadecimal to Octal Conversion
Convert (BABA)16 to its equivalent octal number.
Solution: At first converting Hexadecimal to decimal, we get
Face Value B B A
Place Value 162 161 160
Here,
= B x 162 + B x 161 + A x 160
= 11 x 256 + 11 x 16 + 10 x 1
= (3002)10
8 3002
Remainde
r
8 375 - 2
8 46 - 7
8 5 - 6
0 - 5
∴(BBA)16=(5672)8 Answer
Class 11 Unit 2 By: SD 18
19. 𝐸𝑥𝑎𝑚𝑝𝑙𝑒: (567)8 = (? )16
Solution:
First convert Octal to equivalent decimal
(567)8= 5 ∗ 82 + 6 ∗ 81 + 7 ∗ 80
= 320 + 48 + 7
= (375)10
Then covert obtained decimal into hexadecimal
16 375 7
16 23 7
1
Therefore, (567)8 = (177)16
Class 11 Unit 2 By: SD 19
20. Binary calculation
Binary Addition:
As with decimal addition, to add two binary numbers we need to add two corresponding bits
from the two numbers at a time. The result of addition of two bits from the two numbers is
given in the table.
X Y X+Y
0 0 0
0 1 1
1 0 1
1 1 0 (carry 1)
a) 110+10 b) 101101+1001 c) 1011+0111
101101 1011
110 + 001001 + 0111
+ 010 110110 10010
1000
Class 11 Unit 2 By: SD 20
21. Binary Subtraction:
As with decimal subtraction, to subtract a binary number from other we need to
subtract a correspond bit from other. The result of subtraction of a bit from the other is
given in the table.
X Y X-Y
0 0 0
0 1 1 (borrow)
1 0 1
1 1 0
i) 1101-111 ii) 10101-1010 iii) 1010-100
1101 10101 1010
- 0111 - 01010 -0100
0110 01011 0110
Class 11 Unit 2 By: SD 21
22. 1’s and 2’s Complement Methods
The r’s complement and the (r-1)’s complement
When the value of the base or radix “r” is 2 then the two types are referred as the
2’s and 1’s complement for Binary Number System and the 10’s and 9’s
Complement for the Decimal Number System.
1’s and 2’s Complement Methods of Binary Subtraction:
Complements are used in digital computers for simplifying the subtraction
operation and for logical manipulation. There are two types of complements
for each base or radix “r” system.
Class 11 Unit 2 By: SD 22
23. 1’s Complement Method :
The 1‟s complement of binary number is obtained by subtracting each digit from 1. Because
of the subtraction of a binary digit from 1, the bit changes from 0 to 1 and 1 to 0.
For example, the complement of 1’s of 1011001 is 01001110 and the 1’s complement of
000111 is 111000.
2’s Complement Method :
2’s complement of binary number is obtained by adding 1 to 1’s complement value.
The 2’s complement of 101100 is 010100 and is obtained by adding 1 to 1‟s complement
of 101100, i.e. (111111-101100) +1=010100
Class 11 Unit 2 By: SD 23
24. 1. Subtract (1011)2 from (1100)2 by using 1’s and 2’s complement method.
Solution: We have to find 1100-1011 = ?
1’s complement method
Let, P = 1100 and Q = 1011
Since, both numbers have equal bits. No need to add zero in either case in front to make them equal.
1’s Complement of Q = 1111 – 1011
= 0100
Now, adding 1’s complement of Q with P, we get
1
0100
+ 1100
10000
Since, P > Q, there is an end carry 1. So, adding the end carry 1 at last, we get
Answer = 0000 + 1
= (0001)2 Class 11 Unit 2 By: SD 24
25. 2’s complement method
Let, P = 1100 and Q = 1011
Since, both numbers have equal bits. No need to add zero in either case in front to make them
equal.
2’s Complement of Q = (1111 – 1011) + 1
= 0100 + 1
= 0101
Now, adding 2’s complement of Q with P, we get
1
0101
+1100
10001
Since, P > Q, there is an end carry 1. In 2’s complement we have to discard the end carry 1 , then
Answer = (0001)2
Class 11 Unit 2 By: SD 25
26. 2. Subtract (1000)2 from (111)2 by using 1’s and 2’s complement method.
Solution: We have to find 111-1000 = ?
1’s complement method
Let, P = 0111 and Q = 1000
Since, both numbers have not equal bits. We have to place one zero in front of 1st number to make them equal.
1’s Complement of Q = 1111 – 1000
= 0111
Now, adding 1‟s complement of Q with P, we get
111
0111
+ 0111
1110
Since, P < Q, there is no end carry 1. So, we have to find the 1’s complement of 1110 and place the minus sign in front of
final answer, we get
1’s complement of 1110= 1111-1110
= - (0001)2 Class 11 Unit 2 By: SD 26
27. 2’s complement method
Let, P = 0111 and Q = 1000
Since, both numbers have not equal bits. We have to place one zero in front of 1st number to make them equal.
1’s Complement of Q = (1111 – 1000)+1
= 0111+1 = 1000
Now, adding 1’s complement of Q with P, we get
1000
+ 0111
1111
Since, P < Q, there is no end carry 1. So, we have to find the 2‟s complement of
1111 and place the minus sign in front of final answer, we get
2‟s complement of 1111= (1111-1110) + 1
=0000+1
= - (0001)2
Class 11 Unit 2 By: SD 27
28. Logic Function and Boolean Algebra
Introduction:
The algebra of logic, which deals with the study of binary variables and logical
operations is called Boolean Algebra.
Today, it is the backbone of design and analysis of computer and other digital
circuits.
They are useful not only to the hardware design in implementing circuits, but also
to software designer in making decision and for many tasks.
In Boolean algebra the variables are permitted to have two values. They are
Logic 1 ( i. e. on / yes / true / high)
Logic 0 ( i. e. off / no / false / low)
Class 11 Unit 2 By: SD 28
29. Logic Function and Boolean Algebra
Boolean Variables(Logical Variables):
The variables that have only two values 1 and 0 are called Boolean Variables or
Logical Variables.
These variables are denoted by A, B, X, Y etc.
Truth Table:
A table which represents the input output relationships of the binary variables for
each gate is called Truth Table. It shows the relation between all inputs-outputs in
tabular form. Thus, a truth table is a table representing the results of the logical
operations on all possible combinations of logical values.
Class 11 Unit 2 By: SD 29
30. Boolean Expression (Boolean Function)
An expression formed by binary variables, binary operators (AND, OR, NOT) , parenthesis and equal
sign is called Boolean Expression or Boolean Function. For a given value of the variables, the function
can be either 0 or 1. For Example: Z = X.Y
Logic Gate:
An electronic circuit that operates on one or more input signals to produce an output signal is called
logic gate. The logic gate is used for binary operation and is the basic component of digital computer.
Each gate has its specific function and graphical symbol.
There are 3 basic gates: 1) AND gate 2) OR gate 3) NOT gate
From the combination of these 3 basic gates, we can get other derived gates, which are:
4) NAND gate 5) NOR gate 6) Exclusive – OR (XOR) gate 7) Excusive – NOR (XNOR) gate
Class 11 Unit 2 By: SD 30
31. 1. AND gate:
An electronic circuit which produces high(1) output when all inputs are high(1)
otherwise, produces the output low (0) is called AND gate.
The output of AND gate is equal to the product of the logic inputs.
It can have two or more inputs and produces only one output.
It is denoted by dot (.) operator.
Name Graphical Symbol Algebraic Function Truth Table
Class 11 Unit 2 By: SD 31
32. 2. OR gate
An electronic circuit which produces high (1) output when all inputs are high (1)
or any one of input is high (1) and produces output low (0) when all inputs are
low (0) is called OR gate.
The output of the OR gate is equal to the sum of the logic inputs.
It has two or more inputs and produces only one output.
It is denoted by + operator.
Name Graphical Symbol Algebraic Function Truth Table
Class 11 Unit 2 By: SD 32
33. 3. NOT gate (Inverter)
An electronic circuit whose output is the complement of the input is called
NOT gate.
It is also called an inverter.
If we provide high (1) input to NOT gate, it will produce low (0) output and
vice- versa. It has only one input and only one output.
Name Graphical Symbol Algebraic Function Truth Table
Class 11 Unit 2 By: SD 33
34. 4. NAND gate
The gate which is formed by the combination of AND gate and NOT gate is called
NAND gate.
NAND gate produces low (0) output, when all inputs are high (1); otherwise,
produces high (1) output.
It is the complement of the AND gate.
It has two or more inputs and only one output.
Name Graphical Symbol Algebraic Function Truth Table
Class 11 Unit 2 By: SD 34
35. 5. NOR gate
The gate which is formed by the combination of OR gate and NOT gate is called
NOR gate.
NOR gate produces high (1) output, when all inputs are low (0); otherwise, output
will be low (0).
It is the complement of OR gate.
It has two or more inputs and only one output.
Name Graphical Symbol Algebraic Function Truth Table
Class 11 Unit 2 By: SD 35
36. 6. Exclusive – OR (XOR) gate
The XOR gate produces high output (1) when the odd numbers of inputs are
true otherwise, the output will be low (0).
It can also have two or more inputs and only one output.
Name Graphical Symbol Algebraic Function Truth Table
Class 11 Unit 2 By: SD 36
37. 7. Exclusive- NOR (XNOR) gate
The XNOR gate is equivalent to an XOR gate followed by an inverter.
This gate produces low(0) output when odd numbers of inputs are high(1)
otherwise output will be low(0).
It can also have two or more inputs and a single output.
Name Graphical Symbol Algebraic Function Truth Table
https://youtu.be/gI-qXk7XojA
Class 11 Unit 2 By: SD 37
38. # Duality Principle:
Dual of a Boolean expression is derived by
1. Replacing AND operation by OR
2. Replacing OR operation by AND
3. All 1’s are changed to 0
4. All 0’s are changed to 1
5. Variables and complements are left unchanged.
For Example:
F=(X’.1).(0+X) , Here dual of F= (X’+0)+(1.X)
Class 11 Unit 2 By: SD 38
39. Boolean Postulates:
Boolean postulates are the basic rules in Boolean Algebra
which are not required to verify.
OR Law AND Law NOT Law
A+0 =A A.1 = A 0’ =1
A+1 = 1 A.0 = 0 1’ =0
A+A = A A.A = A A” = A
A+A’ =1 A.A’ = 0
Class 11 Unit 2 By: SD 39
40. Laws of Boolean algebra:
1. Associative Laws:
The associative law of Boolean algebra is expressed by:
* (A+B)+C=A+(B+C)
* (A.B).C=A.(B.C)
Proof for (A+B)+C=A+(B+C)
Inputs Output 1 Output 2
A B C A+B (A+B)+C B+C A+(B+C)
0 0 0 0 0 0 0
0 0 1 0 1 1 1
0 1 0 1 1 1 1
0 1 1 1 1 1 1
1 0 0 1 1 0 1
1 0 1 1 1 1 1
1 1 0 1 1 1 1
1 1 1 1 1 1 1
Conclusion:
Comparing the values of (A+B)+C and A+(B+C) from truth table, since ,both are equal.
Hence, Proved.
Class 11 Unit 2 By: SD 40
41. 2. Commutative Laws:
The commutative law of Boolean algebra is expressed by:
* (A+B)=(B+A)
* (A.B)=(B.A)
Proof for (A+B)=(B+A)
Inputs Output 1 Output 2
A B A+B (B+A)
0 0 0 0
0 1 1 1
1 0 1 1
1 1 1 1
Conclusion:
Comparing the values of (A+B) and (B+A) from truth table, since, both are equal. Hence, proved.
Class 11 Unit 2 By: SD 41
42. 3. Distributive Laws:
A distributive law of Boolean algebra is expressed by:
* A.(B+C)=(A.B)+(A.C)
* A+(B.C)=(A+B).(A+C)
Proof for A. (B+C)=(A.B)+(A.C)
Output 1 Output 2
A B C B+C A.(B+C) A.B A.C (A.B)+(A.C)
0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 1 1 1 0 0 0 0
1 0 0 0 0 0 0 0
1 0 1 1 1 0 1 1
1 1 0 1 1 1 0 1
1 1 1 1 1 1 1 1
Conclusion:
Comparing the values of A.(B+C) and (A.B)+(A.C) from truth table, since ,both are equal.
Hence, Proved.
Class 11 Unit 2 By: SD 42
43. 4.IdentityLaws:
The identity law of Boolean algebra is expressed
by:
A+0=A and A.1=A
Proof for A+0=A
Truth Table
Inputs Output
A 0 A+0
0 0 0
1 0 1
Conclusion:
Hence from the truth table the output will be same as the input.
Class 11 Unit 2 By: SD 43
44. 5.Complement Laws:
The Complement law of Boolean algebra is
expressed by:
A+A’=1 and A.A’=0
Proof for A+A’=1
Truth Table
Inputs Output
A A’ A+A’
0 1 1
1 0 1
Conclusion:
Hence from the truth table the output is 1 for A + A’.
Class 11 Unit 2 By: SD 44
45. 5.Complement Laws:
The Complement law of Boolean algebra is
expressed by:
A+A’=1 and A.A’=0
Proof for A+A’=1
Truth Table
Inputs Output
A A’ A+A’
0 1 1
1 0 1
Conclusion:
Hence from the truth table the output is 1 for A + A’.
Class 11 Unit 2 By: SD 45
46. Class 11 Unit 2 By: SD 46
De-Morgan’s Law:
Theorem 1: The complement of a sum of variables is equal to the product of
the complements of the individual variables.
Stated another way,
The complement of two or more variables OR is equivalent to the AND of the
complements of the individual variables.
The formula for expressing this theorem for two variables is
Algebraic form: (A+B)' = A’ .B'
A B A' B' A+B (A+B)' A'.B '
0 0 1 1 0 1 1
0 1 1 0 1 0 0
1 0 0 1 1 0 0
1 1 0 0 1 0 0
47. Class 11 Unit 2 By: SD 47
Theorem 2: The complement of a product of variables is equal to the sum of
the complement of individual variables.
Stated another way,
The complement of two or more variables AND is equivalent to the OR of
the complements of the individual variables.
The formula for expressing this theorem for two variables is
Algebraic form: (A . B) ' = A’+B'
A B A' B' A.B (A.B)' A’+B '
0 0 1 1 0 1 1
0 1 1 0 0 1 1
1 0 0 1 0 1 1
1 1 0 0 1 0 0
48. Universal gate
A universal gate is a gate which can implement
any Boolean function without need to use any
other gate type.
The NAND and NOR gates are universal gates.
Class 11 Unit 2 By: SD 48