Day 9 – Chapter 2: Signed Numbers and Complements
Class 11 Computer Science
2.8 Introduction to Signed Numbers (साइन वाले संख्याओं का परिचय)
Signed numbers in binary are used to represent both positive and negative values. The most common methods to represent signed numbers are the sign-magnitude, 1's complement, and 2's complement representations.
बाइनरी में साइन वाले नंबरों का उपयोग सकारात्मक और नकारात्मक दोनों मानों को दर्शाने के लिए किया जाता है। साइन वाले नंबरों को प्रदर्शित करने के सबसे सामान्य तरीके साइन-मैग्निट्यूड, 1's कंप्लीमेंट और 2's कंप्लीमेंट हैं।
2.9 Representation of Signed Numbers (साइन वाले संख्याओं का निरूपण)
2.9.1 Sign-Magnitude Representation (साइन-मैग्निट्यूड प्रतिनिधित्व)
In this method, the leftmost bit (MSB) represents the sign of the number. A ‘0’ indicates a positive number, and a ‘1’ indicates a negative number.
इस विधि में, बाईं ओर का सबसे महत्वपूर्ण बिट (MSB) संख्या के संकेत का प्रतिनिधित्व करता है। ‘0’ सकारात्मक संख्या को दर्शाता है, और ‘1’ नकारात्मक संख्या को दर्शाता है।
- Example: +5 = 01012, -5 = 11012
2.9.2 1’s Complement Representation (1's कंप्लीमेंट प्रतिनिधित्व)
In 1’s complement, the negative number is represented by inverting all the bits of the positive number.
1's कंप्लीमेंट में, नकारात्मक संख्या को सकारात्मक संख्या के सभी बिट्स को उलटकर दर्शाया जाता है।
- Example: +5 = 01012, -5 = 10102
2.9.3 2’s Complement Representation (2's कंप्लीमेंट प्रतिनिधित्व)
In 2’s complement, the negative number is represented by adding 1 to the 1’s complement of the positive number.
2's कंप्लीमेंट में, नकारात्मक संख्या को सकारात्मक संख्या के 1's कंप्लीमेंट में 1 जोड़कर दर्शाया जाता है।
- Example: +5 = 01012, -5 = 10112
2.10 Importance of Complements in Binary Arithmetic (बाइनरी अंकगणित में कंप्लीमेंट का महत्व)
Complements are widely used in binary arithmetic for subtraction and efficient representation of negative numbers in computer systems.
कंप्लीमेंट का उपयोग बाइनरी अंकगणित में घटाव और कंप्यूटर प्रणालियों में नकारात्मक संख्याओं के कुशल प्रतिनिधित्व के लिए व्यापक रूप से किया जाता है।
Practice Questions (अभ्यास प्रश्न)
Multiple Choice Questions (MCQs)
- Which bit represents the sign in sign-magnitude representation?
(a) LSB | (b) MSB | (c) Middle bit | (d) None - What is the 1’s complement of 01012?
(a) 0101 | (b) 1010 | (c) 1001 | (d) 0110 - What is the 2’s complement of 01012?
(a) 1010 | (b) 1011 | (c) 1100 | (d) 1110 - How is a negative number represented in sign-magnitude representation?
(a) Invert all bits | (b) Add 1 | (c) Set MSB to 1 | (d) None of the above - What is the purpose of complements in binary arithmetic?
(a) To simplify addition | (b) For subtraction | (c) To represent negative numbers | (d) All of the above - What is the sign bit for a positive number in sign-magnitude?
(a) 0 | (b) 1 | (c) -1 | (d) None - Which method is used for efficient subtraction in binary arithmetic?
(a) Addition | (b) 1’s Complement | (c) 2’s Complement | (d) Sign-Magnitude - What is the range of values for an 8-bit signed number?
(a) -128 to 127 | (b) -255 to 255 | (c) -127 to 127 | (d) 0 to 255 - What is the 2’s complement of 11112?
(a) 00002 | (b) 11112 | (c) 00012 | (d) 01112 - What is the main advantage of 2’s complement over 1’s complement?
(a) No ambiguity in 0 | (b) Easier addition | (c) Efficient subtraction | (d) All of the above
Answers to MCQs:
1: (b), 2: (b), 3: (b), 4: (c), 5: (d), 6: (a), 7: (c), 8: (a), 9: (c), 10: (d)
Short Answer Questions (लघु उत्तरीय प्रश्न)
-
Define sign-magnitude representation.
Answer: A method where the MSB represents the sign (0 for positive, 1 for negative) and the rest represent the magnitude. -
What is the 1’s complement of 01102?
Answer: 10012. -
How is a negative number represented in 2’s complement?
Answer: By adding 1 to the 1’s complement of the positive number. -
Why are complements important in binary arithmetic?
Answer: Complements simplify subtraction and representation of negative numbers in binary. -
Convert -7 to 2’s complement (8-bit).
Answer: 111110012.
Long Answer Questions (दीर्घ उत्तरीय प्रश्न)
- Explain sign-magnitude, 1’s complement, and 2’s complement with examples.
- Discuss the advantages of using 2’s complement representation in computer systems.
- How are signed numbers represented in binary systems? Provide examples for each method.
Post a Comment