Chapter 1final
Chapter 1final
By Mrs.D.S.Chopada
15/09/21
CO-Course Outcomes
CO1: Test the Digital Systems, Logic Families and Logic
Gates.
CO2:Construct Combinational Logical Circuit.
CO3:Construct Sequential Logical Circuit.
CO4:Use registers and instructions of 8086.
CO5:Develop assembly language programs using 8086.
Course: Digital Techniques and
Microprocessor
•
It uses only 2 symbols i.e. 0 and 1.
•
Also called base 2 number system.
Example
Binary Number: (10101)2
2. Decimal Number System
•
The number system that we use in our
day-to-day life is the decimal number
system.
•
The number system with base 10 is
called as decimal number system.
•
It uses 10 symbols i.e. 0,1,2,3,4,5,6,7,8,9
Example
Decimal Number: (123)10
3. Octal Number System
•
The number system with base 8 is called
as octal number system.
•
Also called base 8 number system.
•
It uses 8 symbols i.e. 0,1,2,3,4,5,6,7
Example
Octal Number: (12035)8
4. Hexadecimal Number System
•
The number system with base 16 is
called as hexadecimal number system.
•
The number system uses 10
digits(0,1,2,3,4,5,6,7,8,9)and 6
letters(A,B,C,D,E,F)
•
A = 10, B = 11, C = 12, D = 13, E = 14,
F = 15.
•
Also called base 16 number system.
Example
Hexadecimal Number: (19F5)16
Relation between number system
Decimal Binary Octal Hexadecimal
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
28/07/18
15 1111 17 F
Number Conversions:
1. Decimal to Binary
2. Decimal to Octal
3. Decimal to Hexadecimal
•
Decimal to Binary Number System
Example :-Convert (29)10 to binary form.
(0.65625)10 =(0.10101)2
Example :-Convert (25.50)10 to binary form.
a) Consider Integer part i.e. 25
(25)10 =(11001)2
b) Consider Fractional part i.e. 0.50
(0.50)10 =(0.1)2
Therefore, (25.50)10 = (11001.1)
( 2
•
Decimal to Octal Number System
Example :-Convert (29)10 to it’s octal form.
Step 2 1 1 1 0 1 (16 + 8 + 4 + 0 + 1)
Step 3 1 1 1 0 1 (29)10
Step 2 1 1 1. 0 1 (4 + 2 + 1+0+1/4)
Step 3 1 1 1. 0 1 (7+0.25)10
Step 2 (1010110.010)2 5 6 . 4
Step 3 (1010110.010)2 (56.4)16
28/07/18
Binary Addition :The rules for binary addition are:
A B Sum Carry Result
0 0 0 0 0
0 1 1 0 1
1 0 1 0 1
1 1 0 1 10
e.g. 1011 and 1100 (Ans: 10111)
Binary Subtraction: The rules for binary subtraction
are:
A B Difference Borrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Binary Division
e.g. Divide 1110101 by 1001(Ans: 1101)
Complements(1's Complement and 2's
Complement)
1’s complement of a binary number is another
binary number obtained by toggling all bits in
it, i.e., transforming the 0 bit to 1 and the 1 bit
to 0.
Examples:
1's complement of "0111" is "1000"
1's complement of "1100" is "0011"
2’s complement of a binary number is 1 added
to the 1’s complement of the binary number.
Examples:
Find 2's Complement of the following numbers
1. 01001110
2. 00110101
1.Ans:- 1's Complement of 01001110 is
10110001
2's Complement is obtained by adding 1 to 1's
Complement i.e.
10110001
+ 1
1
10110010
Subtraction Using 1’s Complement:
• Step 1: Give name A to first number and B to second number(i.e. to
be subtracted)
• Step 2:Convert number to be subtracted (B) to it’s 1’s complement.
• Step 3:Add A and 1’s complement of B numbers using binary addition
rule.
• Step 4:If carry is 1 then add it to the result of addition in step 3 to get
final result. If carry is 1 it indicates subtraction is positive and in true
form.
• Step 5:If carry is 0 then result of addition in step 3 is negative and in
1’s complement form. So covert it into true form by taking 1’s
complement of result.
28/07/18
Subtract (1100)2 - (0110)2 Using 1’s
Complement:
• Step 1: 1100 A and 0110 B
• Step 2: find 1’s complement of B number
• B number 0110
• 1’s complement of B number 1001
• Step 3:Add A and 1’s complement of B numbers
• A number 1100
• 1’s complement of B number + 1001
• Step 4: if carry is 1 1 0101
• then add carry to the result + 1
28/07/18
Subtraction Using 2’s Complement:
• Step 1: Give name A to first number and B to second number(i.e. to
be subtracted)
• Step 2:Convert number to be subtracted (B) to it’s 2’s complement.
• Step 3:Add A and 2’s complement of B numbers using binary addition
rule.
• Step If carry is 1 it indicates subtraction is positive and in true form.
• Step 5:If carry is 0 then result of addition in step 3 is negative and in
2’s complement form. So covert it into true form by taking 2’s
complement of result.
28/07/18
Subtract (1100)2 - (0110)2 Using 2’s
Complement:
• Step 1: 1100 A and 0110 B
• Step 2: find 2’s complement of B number
• B number 0110 1’s complement of B number 1001
• 2’s complement of B number + 11
• 1010
• Step 3:Add A and 2’s complement of B numbers
• A number 1100
• 2’s complement of B number + 1010
• Step 4: if carry is 1 1 0110 This is final result
• then the result is positive and true
28/07/18
Codes:-
1. BCD
2. Gray
3. ASCII
4. EBCDIC
1. BCD(Binary Coded Decimal)
This code is also called as 8-4-2-1 code.
8,4,2,1 are the weights of four digits of each
decimal number.
Decimal Number BCD Binary
0 0000 0000
1 0001 0001
2 0010 0010
3 0011 0011
4 0100 0100
5 0101 0101
6 0110 0110
7 0111 0111
8 1000 1000
9 1001 1001
Decimal Number Binary Number BCD Number
What is the difference between binary and bcd
number?
In a Binary Code, we convert the whole Decimal
number into its binary form.
In BCD, each of the digit of the decimal number is
represented by its binary form in 4 bits.
Let us take an Example:
Suppose a number 123
Its Binary Form will be 01111011
Its BCD will be 0001 0010 0011
2. Gray Code:
It is also known as the reflected binary code
(RBC)
It is an ordering of the binary number system
such that two successive values differ in only
one bit (binary digit).
Gray code for given Binary Number
System
Example :-Find gray code for(11010)2
Step Binary Gray Code
Number
Step 1 (11010)2 1+1+0+1+0
Step 2 (11010)2 1 0 1 1 1
Step 3 (11010)2 10111
Boolean Expression:The expression relating
the input(A) and output(Y) of a gate is called as
boolean expression.
Y= A
Basic Gates :
1. NOT Gate : The NOT gate or inverter is a logic
gate having only one input(A) and one
output(Y).
Logical Symbol:
Boolean Expression:The expression relating
the input(A) and output(Y) of a gate is called as
boolean expression.
Y= A
Truth Table:-
Input(A) Output(Y)
0 1
1 0
2. AND Gate:-
It is a logic gate that performs the logical
multiplication on its inputs.
The output is high(Y=1) if and only if all the
inputs to the AND gate are high i.e.1
The output is low(Y=0) if any one or more
inputs are low(0)
AND gate have two or more inputs and only
one output.
Logical Symbol:-
2. AND Gate:-
Boolean Expression:- Y= A.B
Truth Table:-
Inputs Output
0 0 0
0 1 0
1 0 0
1 1 1
3. OR Gate:-
It is a logic gate that performs the logical
addition on its inputs.
The output is high(Y=1) if any one or both the inputs are high
i.e.1
The output is low(Y=0) if and only if both the inputs are low(0)
OR gate have two or more inputs and only one output.
3. OR Gate:-
Logical Symbol :-
Boolean Expression:-
Y= A+B
Truth Table:-
Inputs Output
0 0 0
0 1 1
1 0 1
1 1 1
Universal Gate:- 1. NAND Gate 2. NOR Gate
1. NAND Gate:-
The term NAND can be split as NOT-AND which means that
the NAND operation can be implemented with the
combination of an AND gate and NOT gate.
Thus NAND gate is equivalent to an AND gate followed by
NOT gate.
NAND gate is called as “Universal Gate”because we can
construct AND,OR,NOT gates using only NAND gates.
a)Logical Symbol:-
b)Equivalent Circuit:-
Truth Table:- Inputs Output
0 0 1
0 1 1
1 0 1
1 1 0
Boolean Expression:- Y= A.B
Universal Gate:-
2. NOR Gate:-
The term NOR can be split as NOT-OR which means that
the NOR operation can be implemented with the
combination of an OR gate and NOT gate.
Thus NOR gate is equivalent to an OR gate followed by
NOT gate.
NOR gate is called as “Universal Gate”because we can
construct AND,OR,NOT gates using only NAND gates.
a)Logical Symbol:-
2)Equivalent Circuit:-
Truth Table:- Inputs Output
0 0 1
0 1 0
1 0 0
1 1 0
Boolean Expression:- Y= A+B
Derived Gates:- 1. EX-OR Gate 2. EX-NOR Gate
1. EX-OR Gate:-
It is called as derived as.
It is a special type of gate.
Output of Ex-OR gate is high i.e.1 if odd numbers of inputs
are high otherwise zero.
a)Logical Symbol:-
Truth Table:- Same input output 0 otherwise 1
Inputs Output
0 0 0
0 1 1
1 0 1
1 1 0
Boolean Expression:- The boolean expression
for two input EX-OR gate is
Y=
Derived Gates:- 2. EX-NOR Gate
2. EX-NOR Gate:-
It is called as derived as.
It is a special type of gate.
Output of Ex-NOR gate is logical complement of Ex-OR
gate.
a)Logical Symbol:-
Truth Table:-
Boolean Expression:- The boolean expression
for two input EX-NOR gate is
Y= A ⊙ B = AB + ĀB ̅.
Boolean Algebra :
Boolean algebra is a division of mathematics which deals
with operations on logical values(binary values) and
contains binary variables.
Boolean algebra is used to analyze and simplify the digital
circuits.
As it uses only binary numbers such as 0 and 1, it is calso
alled as “Binary Algebra” or “Logical Algebra”.
Rules in boolean algebra are:
1. Variables used can have only two values. Binary 1 for HIGH
and binary 0 for LOW.
2. Complement of a variable is represented by a overbar(-).
Thus complement of variable A is represented as A.
3.ORing of variables is represented by a plus(+) sign between
them. e.g. ORing of A, B, C is represented as A+B+C
4. ANDing of the two or more variables is represented by
writing dot between them such as A.B.C
Boolean Laws:-
1. Commutative Law
2. Associative Law
3. Distributive Law
4. AND Law
5. OR Law
6. INVERSION Law
Boolean Laws:-
1. Commutative Law:
A . B = B . A ;The order in which two variables are
AND’ed makes no difference.
A + B = B + A ;The order in which two variables are
OR’ed makes no difference.
Thus the commutative law states that we can change
the sequence of the variables without having any effect
on the output of a logic circuit
Boolean Laws:-
2. Associative Law:
This law states that the order in which the logic operations
are performed is not at all important ultimate outcome
is the same.
A + (B + C) = (A + B) + C = A + B + C (OR Associate Law)
A(B.C) = (A.B)C = A . B . C (AND Associate Law)
3. Distributive Law:
A(B + C) = A.B + A.C (OR Distributive Law)
A + (B.C) = (A + B).(A + C) (AND Distributive Law)
Boolean Laws:-
4. AND Law :-
A.0 = 0
A.1 = A
A.A = A
A.A = 0
5. OR Law :-
A+0 = A
A+1 = 1
A+A = A
A+A = 1
Boolean Laws:-
6. INVERSION Law :-
This law states that if a variable is subjected to a
double inversion then it will result in the original
variable itself.
i.e. A = A
De-Morgan's Theorem :- The two theorems suggested by
De-Morgan are as follows:
Theorem 1 : AB = A + B : NAND = Bubbled OR
A B AB A B A+B
0 0 1 1 1 1
0 1 1 1 0 1
1 0 1 0 1 1
1 1 0 0 0 0
De-Morgan's Theorem :- The two theorems suggested by
De-Morgan are as follows:
Theorem 2 : A + B = A . B : NOR = Bubbled AND
Fan Out 10 50 25