4. Number System
When we type some letters or words, the computer translates them in binary
numbers as computers can understand only binary numbers.
Decimal number system has base 10 as it uses 10 digits from 0 to 9
A value of each digit in a number can be determined using
The digit
Symbol value (is the digit value 0 to 9)
The position of the digit in the number
Increasing Power of the base (i.e. 10) occupying successive positions moving to
the left
5. Number System : Example
Number Symbol
Value
Position from
the right end
Positional
Value
Decimal
Equivalent
5 9 2
2
9
5
0
1
2
100
101
102
2*100 = 2
9*101 = 90
5*102 = 500
592
Decimal number (592):
6. Binary number system
Uses two digits, 0
and 1.
Also called base 2
number system
(110011)2 = (51)10
Number Symbol
Value
Position from
the right end
Positional
Value
Decimal
Equivalent
1 1 0 0 1 1
1
1
0
0
1
1
0
1
2
3
4
5
20
21
22
23
24
25
1*0 = 1
1*2 = 2
0*4 = 0
0*8 = 0
1*16= 16
1*32= 32
51
7. Binary number system
A Decimal number can converted into binary number by the
following methods:
• Double-Dabble Method
• Direct Method
8. Double-Dabble Method
Divide the number by 2
Write the dividend under the number . This become the new
number
Write the remainder at the right in column
Repeat these three steps until a ‘0’ is produced as a new number
Output (bottom to top).
9. Decimal to Binary
Convert decimal 17 into binary number
Step Remainder
1 Divide 17 by 2 2 17
8
1
2 Divide 8 by 2 2 8
4
0
3 Divide 4 by 2 2 4
2
0
4 Divide 2 by 2 2 2
1
0
5 Divide 1 by 2 2 1
0
1
10. Direct Method
• Write the positional values of the binary number
…. 26 25 24 23 22 21 20
…. 64 32 16 8 4 2 1
• Now compare the decimal number with position value listed above. The decimal
number lies between 32 and 64. Now place 1 at position 32.
64 32 16 8 4 2 1
1
• Subtract the positional value to the decimal number i.e ( 45-32=13)
45
11. Direct Method
64 32 16 8 4 2 1
1 45-32 =13
1 1 13-8=5
1 1 1 5-4=1
1 1 1 1 1-1=0
Place 0 at the rest of position value
0 1 0 1 1 0 1
(45)10=(101101)2
45
12. Decimal number to fractional Binary number
• Multiply the decimal fraction by 2
• Write the integer part in a column
• The fraction part become a new fraction
• Repeat step 1 to 3 until the fractional part become zero.
• Once the required number of digits (say 4) have been obtained , we
can stop.
13. Example
• Decimal number is (0.625)
Ans: (0.625)10= (0.101)2
Fractional decimal
number
Operation Product Fractional part of
product
Integer part of
product
0.625 Multiply by 2 1.250 .250 1
0.250 -do- 0.500 .500 0
0.500 -do- 1.000 0 1
14. Questions
Convert decimal 89 into equivalent binary number by using Double-
Dabble Method
(89)10= (1011001)2
Convert decimal 89 into equivalent binary number by using Direct
Method
(89)10= (1011001)2
Convert decimal 0.8125 into fractional binary number
(0.8125)10 = (0.1101)2
15. Switching Algebra
Boolean algebra or switching algebra is a system of mathematical logic
to perform different mathematical operations in binary system. These
are only two elements 1 and 0 by which all the mathematical
operations are to be performed.
16. What is a switching network?
Switching
Network
X1
Xm
X2
Z1
Zm
Z2
Combinatorial Network: A stateless network. The output is
completely determined by the values of the input.
Sequential Network: The network stores an internal
state. The output is determined by the input,
and by the internal state.
17. Logic Functions: Boolean Algebra
INVERTER
X X’
X X’
0 1
1 0
If X=0 then X’=1
If X=1 then X’=0
OR
A
B
C=A+B
A B C
0 0 0
0 1 1
1 0 1
1 1 1
If A=1 OR B=1 then C=1
otherwise C=0
A
B
C=A·B
A B C
0 0 0
0 1 0
1 0 0
1 1 1
If A=1 AND B=1 then C=1
otherwise C=0
AND
18. Boolean expressions and logic circuits
Any Boolean expression can be implemented as a logic circuit.
X = [A(C+D)]’+BE
C
D
C+D
[A(C+D)]’ [A(C+D)]’+BE
B
E
BE
A
A(C+D)
19. Basic Theorems: Operations with 0 and 1
X+0 = X
X
0
C=X
X 0 C
0 0 0
1 0 1
X+1 = 1
X
1
C=1
X 1 C
0 1 1
1 1 1
X
0
C=0
X·0 = 0
X 0 C
0 0 0
1 0 0
X
1
C=X
X·1 = X
X 1 C
0 1 0
1 1 1
22. Basic Theorems: Laws of Complementarity
X+X’ = 1
X
X’
C=1
X X’ C
0 1 1
1 0 1
X
X’
C=0
X·X’ = 0
X X’ C
0 1 0
1 0 0
23. Expression Simplification using the Basic
Theorems
X can be an arbitrarily complex expression.
Simplify the following boolean expressions as much as you can using the
basic theorems.
(AB’ + D)E + 1 =
(AB’ + D)(AB’ + D)’ =
(AB + CD) + (CD + A) + (AB + CD)’ =
(AB’ + D)E + 1 = 1
(AB’ + D)(AB’ + D)’ = 0
(AB + CD) + (CD + A) + (AB + CD)’ = 1
24. Associative Law
(X+Y)+Z = X+(Y+Z)
X Y Z X+Y (X+Y)+Z Y+Z X+(Y+Z)
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
X
Y
Z
C
Y
Z
X
C
25. Associative Law
(XY)Z = X(YZ)
X Y Z XY (XY)Z YZ X(YZ)
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 1 0 0 0 0 0
0 1 1 1 0 1 0
1 0 0 0 0 0 0
1 0 1 0 0 0 0
1 1 0 1 0 0 0
1 1 1 1 1 1 1
X
Y
Z
C
Y
Z
X
C
34. Second Distributive Law (A different proof)
(X + Y)(X + Z) = X(X + Z) + Y(X + Z) (using the first distributive law)
= XX + XZ + YX + YZ (using the first distributive law)
= X + XZ + YX + YZ (using the idempotent law)
= X·1 + XZ + YX + YZ (using the operation with 1 law)
= X(1 + Z + Y) + YZ (using the first distributive law)
= X·1 + YZ (using the operation with 1 law)
= X + YZ (using the operation with 1 law)
35. Simplification Theorems
(X + Y’)Y = XY
XY + Y’Y = XY + 0 = XY
XY’ + Y = X + Y
(using the second distributive law)
XY’ + Y = Y + XY’ = (Y + X)(Y + Y’)
= (Y + X)·1 = X + Y
XY + XY’ = X
XY + XY’ = X(Y + Y’) = X·1 = X
X + XY = X
X(1 + Y) = X·1 = X
(X + Y)(X + Y’) = X
(X + Y)(X + Y’) = XX + XY’ + YX + YY’
= X + X(Y’ + Y) + 0
= X + X·1
= X
X(X + Y) = X
X(X + Y) = XX + XY = X·1 + XY
= X(1 + Y) = X·1 = X
36. Examples
Simplify the following expressions:
W = [M + N’P + (R + ST)’][M + N’P + R + ST]
W = M + N’P
X = M + N’P Y = R + ST
W = (X + Y’)(X + Y)
W = XX + XY + Y’X + Y’Y
W = X·1 + XY + XY’ + 0
W = X + X(Y + Y’) = X + X·1 = X
37. Minterm
A minterm of n variables is a product of n literals in which each variable
appears exactly once in either true or complemented form, but not both. (A
literal is a variable or its complement.)
.
Each minterm has a value of 1 for exactly one combination of values of the
variables A, B, and C.
Thus if A = B = C = 0, A′B′C′ = 1;
if A = B = 0 and C = 1, A′B′C = 1;
and so forth
f(A, B, C) = m3 + m4 + m5 + m6 + m7
38. Maxterm
In general, a maxterm of n variables is a sum of n literals in which each
variable appears exactly once in either true or complemented form, but not
both.
Each maxterm has a value of 0 for exactly one combination of values for A, B,
and C. Thus, if A = B = C = 0,
A + B + C = 0; if A = B = 0 and C = 1,
A + B + C′ = 0; and so forth.
f(A, B, C) = M0 M1M2
39. What are Karnaugh maps?
Boolean algebra can be represented in a variety of ways. These include:
Boolean expressions
Truth tables
Circuit diagrams
Another method is the Karnaugh Map (also known as the K-map)
• K-maps are particularly useful for simplifying boolean expressions
K- Map
40. 2 variable K-Map
Starting with the Expression: A ∧ B
As a Truth Table this would be:
As a Circuit Diagram this would be:
A K-Map, will be a small grid with 4 boxes, one for each combination of A and B.
Each grid square has a value for A and a value for B.
To complete the K-Map for the
expression, you find the box in
the row where A is true and the
column where B is true, put a 1
in the box that is in both rows.
A B A ∧ B
0 0 0
0 1 0
1 0 0
1 1 1
1
41. 2 variable K-Map
(0,0) (0,1)
(1,0) (1,1)
One way to view a K-Map is to figure out
what the ‘address’ is for each box:
what its A and B values are for each
position
These have been written in the format (A, B)
42. 2 variable K-Map
To create a K-map for the expression: A
Place 1s in all the boxes in the row where A is true
1 1
43. 2 variable K-Map
To create a K-Map for the expression B
Place 1s in all the boxes in the column where B is true
1
1
44. 2 variable K-Map
• Expression: ~A ∧ B
• Find the row where A is false
and the column where B is true
• Place a 1 in the overlapping
position
1
45. 2 variable K-Map
• Try working backwards!
• Starting with the K-Map, interpret the results and write an expression
• Highlight the row that contains the 1
• Is it A or ~A?
• Highlight the column that contains the 1
• Is it B or ~B?
• Write down your two variables and
join them with an AND (∧)
1
1
46. 3 variable K-Map
In a 3 variable K-Map, we need to accommodate 8 possible combinations of A, B
and C
We’ll start by figuring out the ‘address’ for each position (A, B, C)
(0,0,0) (0,0,1)
(0,1,0) (0,1,1)
(1,1,0) (1,1,1)
(1,0,0) (1,0,1)