Complements are used in digital computers for simplifying the subtraction operation and for logical manipulation.
COMPLEMENTS
Complements
are used in digital computers for simplifying the subtraction operation and for
logical manipulation. There are two types of complements for each base 'r'
system. The two methods are
(i) r's complement
(ii) (r-1)'s complement
For
binary number, r = 2 and r-1 = 1, so the 1's complement of N is (2n
- 1) - N. For r's complement of an n-digit number N in base r is defined as rn
- N for N ≠ 0 and 0 for N = 0.
The
1's complement of a binary number is obtained by change all 1's to zero and
zeros to ones.
Problem: 35
Find I's complement of (10110)2
Solution:
(101
10)2 → 0 1 0 0 1
Problem: 36
Find I's complement of (110111)2
Solution:
(1
10 1 1 1)2 → (001 000)
The
2's complement is obtained by adding one to the 1's complement of the given
number.
2's
complement = 1's complement +1
Problem: 37
Find 2's complement of (10011)2
Solution:
1's complement
1's
complement = 01100
2's complement
2's
complement = 01101
Problem: 38
Find 2's complement of (110110)2
Solution:
1's complement
2's complement
(110110)2 → 2's complement =
(001010)
Basic Electrical and Electronics Engineering: Unit IV: Digital Electronics : Tag: : with Solved Example Problems - Complements
Basic Electrical and Electronics Engineering
BE3251 2nd semester Mechanical Dept | 2021 Regulation | 2nd Semester Mechanical Dept 2021 Regulation
Basic Electrical and Electronics Engineering
BE3251 2nd Semester CSE Dept 2021 | Regulation | 2nd Semester CSE Dept 2021 Regulation
Professional English II
HS3251 2nd Semester 2021 Regulation | 2nd Semester Common to all Dept 2021 Regulation
Statistics and Numerical Methods
MA3251 2nd Semester 2021 Regulation M2 Engineering Mathematics 2 | 2nd Semester Common to all Dept 2021 Regulation
Engineering Graphics
GE3251 eg 2nd semester | 2021 Regulation | 2nd Semester Common to all Dept 2021 Regulation
Physics for Electrical Engineering
PH3202 2nd Semester 2021 Regulation | 2nd Semester EEE Dept 2021 Regulation
Basic Civil and Mechanical Engineering
BE3255 2nd Semester 2021 Regulation | 2nd Semester EEE Dept 2021 Regulation
Electric Circuit Analysis
EE3251 2nd Semester 2021 Regulation | 2nd Semester EEE Dept 2021 Regulation
Physics for Electronics Engineering
PH3254 - Physics II - 2nd Semester - ECE Department - 2021 Regulation | 2nd Semester ECE Dept 2021 Regulation
Electrical and Instrumentation Engineering
BE3254 - 2nd Semester - ECE Dept - 2021 Regulation | 2nd Semester ECE Dept 2021 Regulation
Circuit Analysis
EC3251 - 2nd Semester - ECE Dept - 2021 Regulation | 2nd Semester ECE Dept 2021 Regulation
Materials Science
PH3251 2nd semester Mechanical Dept | 2021 Regulation | 2nd Semester Mechanical Dept 2021 Regulation
Basic Electrical and Electronics Engineering
BE3251 2nd semester Mechanical Dept | 2021 Regulation | 2nd Semester Mechanical Dept 2021 Regulation
Physics for Civil Engineering
PH3201 2021 Regulation | 2nd Semester Civil Dept 2021 Regulation
Basic Electrical, Electronics and Instrumentation Engineering
BE3252 2021 Regulation | 2nd Semester Civil Dept 2021 Regulation
Physics for Information Science
PH3256 2nd Semester CSE Dept | 2021 Regulation | 2nd Semester CSE Dept 2021 Regulation
Basic Electrical and Electronics Engineering
BE3251 2nd Semester CSE Dept 2021 | Regulation | 2nd Semester CSE Dept 2021 Regulation
Programming in C
CS3251 2nd Semester CSE Dept 2021 | Regulation | 2nd Semester CSE Dept 2021 Regulation