Documente Academic
Documente Profesional
Documente Cultură
ANDHRA PRADESH
Name : P.Swarupa
Designation : Lecturer
Branch : ECE
Institute : Govt. Polytechnic, Masabtank, Hyd.
Semester : III Semester
Subject : Digital Electronics
Subject Code : EC – 304
Topic : Basics of Digital Electronics
Duration : 50 Mts.
Sub-Topic : Binary subtraction, Uses of codes
Teaching Aids : PPT Animations
EC304.5 1
Objectives
On the completion of this period, you would be able
to
• Perform Subtraction of Binary numbers
using 2’s complement method.
• know Use of Codes
EC304.5 2
Binary Subtraction
EC304.5 3
Example : Subtract 0110 from 1101 by using
2’s complement method.
1 1 0 1 ………. Minuend
0 1 1 0 ……...Subtrahend
2’s complement of 0110 is 1001 + 1 = 1010
So
1101
1010
10111 neglect the carry
The difference is 0 1 1 1
EC304.5 4
Case [ii] Subtrahend is larger than minuend
EC304.5 5
EXAMPLE
EC304.5 6
Use of digital codes
EC304.5 7
Use of digital codes (Contd)
•
Hexadecimal numbers are used extensively in
microprocessor work.
EC304.5 8
Use of alphanumeric codes
• ASCII code is used by manufacturers to standardize Computer
Hardware.
lines.
EC304.5 9
Quiz
1.What is the complement of 1001
a. 0110
b. 1000
c.1011
d. 1111
EC304.5 11
2. The advantage of 2’s complement
subtraction is
EC304.5 12
Frequently asked Questions
1. Use the 2’s complement method to perform the following
Subtractions
a. 1111 – 1011
b. 110011 – 100101
c. 100101 -110011
d. 1011 -1111
EC304.5 13
Frequently asked Questions(contd..)
f. 54 – 65
b. 68 -32
j. 43 – 68
d. 65 – 54
EC304.5 14
Frequently asked Questions(contd..)
EC304.5 15