Introduction
Welcome to the second lesson in our Digital Electronics series. In the previous lesson, we mastered the art of converting numbers between binary, octal, decimal, and hexadecimal systems. This skill is the foundation for everything that follows.
So far, we have only dealt with unsigned (positive) numbers. However, real-world digital systems, like the processors that run our computers and phones, must handle both positive and negative numbers to perform arithmetic. This lesson addresses that fundamental requirement.
Today, we will cover the learning outcome: Represent signed numbers using sign-magnitude, 1's complement, and 2's complement. We'll explore how each method works, their respective advantages and disadvantages, and why 2's complement has become the industry standard. A solid grasp of these concepts is crucial for GATE, as questions on number ranges and arithmetic are very common.
Why Do We Need Signed Number Representations?
In the decimal system, we use a simple minus sign (–) to denote a negative number. In the binary world of 1s and 0s, we need a different approach. Digital circuits use a specific bit, typically the Most Significant Bit (MSB), as a sign bit.
There are three primary methods for representing signed binary numbers. Let's begin by watching an overview of these methods.
1's complement and 2's complement | Signed Binary Numbers Explained
This video from ALL ABOUT ELECTRONICS provides an excellent introduction to why we need signed number representations and gives a high-level overview of the three main forms we will study today.
Watch the first 3 minutes and 39 seconds of the video. The presenter will explain the concept of a sign bit and introduce sign-magnitude, 1's complement, and 2's complement representations.
As the video explained, while the representation of positive numbers is the same across all three methods, negative numbers are handled very differently. Let's examine each method in detail.
1. Sign-Magnitude Form
This is the most straightforward method, conceptually similar to how we use '+' and '–' signs in decimal.
- The Most Significant Bit (MSB) is the sign bit.
- 0 indicates a positive number.
- 1 indicates a negative number.
- The remaining bits represent the magnitude of the number in true binary form.
To see this in action, continue with the video.
1's complement and 2's complement | Signed Binary Numbers Explained
This segment of the video explains the sign-magnitude form with clear examples and discusses its limitations.
Watch the video from 03:39 to 06:16. Focus on how +34 and -34 are represented and take note of the two major disadvantages mentioned: the dual representation of zero and the complexity of arithmetic operations.
Key Points for Sign-Magnitude:
- Example (8 bits):
- +34 =
00100010(Sign bit 0, magnitude 34) - -34 =
10100010(Sign bit 1, magnitude 34)
- +34 =
- Range: For an n-bit number, the range is from to .
- Disadvantage: There are two representations for zero:
00000000(+0) and10000000(-0). This redundancy and the complex hardware required for arithmetic make it impractical for modern computers.
2. 1's Complement Form
This method provides a different way to represent negative numbers by using the concept of a complement.
- Positive numbers are represented the same way as in sign-magnitude (MSB=0, followed by the true binary magnitude).
- Negative numbers are represented by taking the 1's complement of the corresponding positive number. To find the 1's complement, you simply invert all the bits (change 1s to 0s and 0s to 1s).
Let's see how this works.
1's complement and 2's complement | Signed Binary Numbers Explained
This part of the video explains the 1's complement representation, including how to calculate it and its properties.
Watch from 06:16 to 10:04. Pay attention to the process of finding the 1's complement for a negative number. Note that this method also has a dual representation for zero.
Key Points for 1's Complement:
- Example (8 bits):
- +34 =
00100010 - To find -34, we take the 1's complement of +34:
11011101. The MSB of '1' automatically signifies a negative number.
- +34 =
- Range: Same as sign-magnitude: to .
- Disadvantage: Like sign-magnitude, it has two representations for zero:
00000000(+0) and its 1's complement11111111(-0). This still complicates arithmetic logic.
3. 2's Complement Form
This is the most important method and the one universally used in modern computing for signed integer representation. It overcomes the issues of the previous two methods.
- Positive numbers are represented in the same way (MSB=0, followed by true binary).
- Negative numbers are represented by taking the 2's complement of the corresponding positive number.
There are two common ways to calculate the 2's complement:
- Method 1 (Definition): Take the 1's complement and add 1.
- Method 2 (Shortcut): Starting from the Least Significant Bit (LSB), copy all bits until the first '1' is encountered. Then, invert all the remaining bits to the left. This is a very fast method for manual calculations, perfect for the GATE exam.
The next segment of the video covers this crucial topic.
1's complement and 2's complement | Signed Binary Numbers Explained
This final segment on theory explains the 2's complement form, demonstrating multiple ways to calculate it and highlighting its key advantages.
Watch from 10:04 to 16:34. Focus on the different methods for finding the 2's complement and understand why it is superior: it has a single, unique representation for zero.
Key Points for 2's Complement:
- Example (8 bits):
- +34 =
00100010 - To find -34:
- 1's complement:
11011101 - Add 1:
11011101 + 1 = 11011110
- 1's complement:
- +34 =
- Range: For an n-bit number, the range is from to . Notice it can represent one more negative number than positive numbers.
- Advantage: It has only one representation for zero (
00000000). Taking the 2's complement of zero yields zero (with carry ignored). This, along with making subtraction as simple as addition, is why it is the standard.
Comparing the Three Systems
Seeing all three representations side-by-side solidifies the differences. The following table compares 4-bit signed numbers.

Converting from Signed Binary to Decimal
GATE questions can also ask you to do the reverse: given a signed binary number, find its decimal value. The method depends on the representation used.
For a summary of these conversion techniques, please review the following document.
This PDF from Sathyabama University provides concise methods for finding the decimal value of a signed binary number for all three representations. This is a crucial skill.
Read the section titled 'Decimal value of Signed Numbers' (page 6). Focus on the methods described for Sign-Magnitude, 1's Complement, and 2's Complement. The technique for 2's complement is particularly important.
Here's a summary of the fastest ways to convert a negative number (MSB=1) back to decimal:
- Sign-Magnitude: Ignore the sign bit, convert the remaining magnitude bits to decimal, and add a minus sign.
- 1's Complement: Find the 1's complement of the number (invert all bits). The result is the positive magnitude. Add a minus sign.
- 2's Complement (Two Methods):
- Complement Back: Find the 2's complement of the number. The result is the positive magnitude. Add a minus sign. (Example: 2's complement of
-6 (1010)is0110, which is +6). - Negative Weight Method (Highly Recommended): Assign a negative weight to the MSB and positive weights to all other bits. Sum the weights where there is a '1'. This is extremely fast.
- Example: For the 8-bit 2's complement number
11101010:
The weights are .
Sum = .
- Example: For the 8-bit 2's complement number
- Complement Back: Find the 2's complement of the number. The result is the positive magnitude. Add a minus sign. (Example: 2's complement of
Practice Problem
Let's tackle a typical GATE-style question that tests your ability to interpret numbers in all three forms.
Question: The 4-bit binary number is 1011. What is its decimal equivalent if it is represented in:
a) Sign-Magnitude form?
b) 1's Complement form?
c) 2's Complement form?
Try to solve this on your own first using the methods we've just discussed.
Solution Walkthrough
Now, let's watch a video that solves a very similar problem and also demonstrates representing a final result in 2's complement.
Digital Electronics (1s Complement and 2s Complement) Solved Problem | Quiz # 363
This quiz video from ALL ABOUT ELECTRONICS - Quiz channel directly addresses how to interpret a given binary number in all three signed formats. It's a perfect application of what we've learned.
Watch the video from 00:29 to 03:58. The first part (until 02:54) solves a problem identical in structure to the one above. The second part shows how to represent a negative decimal number in 6-bit 2's complement, which is great for reinforcing the concept.
Let's quickly verify the answer to our question (1011):
- a) Sign-Magnitude: Sign bit is 1 (-). Magnitude is
011(3). Result: -3. - b) 1's Complement: MSB is 1, so it's negative. Take 1's complement:
0100. This is 4. Result: -4. - c) 2's Complement: MSB is 1, so it's negative. Using the negative weight method for 4 bits (weights -8, 4, 2, 1): . Result: -5.
Conclusion
In this lesson, you have learned the three fundamental ways digital systems represent signed numbers. Understanding these representations, especially 2's complement, is non-negotiable for success in the Digital Electronics section of the GATE exam.
Key Takeaways:
- Signed numbers use the MSB as a sign bit (0 for positive, 1 for negative).
- Sign-Magnitude: Simple concept but has two zeros and complex arithmetic.
- 1's Complement: Negative numbers are the bit-wise inverse of positive ones. Also has two zeros.
- 2's Complement: The industry standard. It has a unique zero and an asymmetric range ( to ). Its structure simplifies arithmetic hardware significantly.
- You should be able to convert both ways: from a decimal number to its signed binary form, and from a signed binary number back to its decimal value for all three systems.
Next Lesson Preview:
Now that we know how to represent negative numbers, we are ready to perform binary arithmetic. In the next lesson, we will focus on binary addition and subtraction using 2's complement. We will see firsthand why this representation is so powerful and learn how to detect overflow, a critical error condition in computer arithmetic that is a favorite topic for GATE questions.