The steps for subtracting two positive numbers (M−N) using (r−1)'s complement are: (A) Add the minuend M to the (r−1)'s complement of the substrahend N. (B) If an end carry occurs, add 1 to the least significant bit. (C) If end carry does not occur, take the (r−1)'s complement of the number obtained in step A and place negative sign in front (D) Take (r−1)'s complement of the number obtained in step B on step C. Choose the correct answer from the options given below:
(A), (B), (C) only
Subtracting two positive numbers, M and N (where M − N), can be efficiently performed using the (r−1)'s complement method in digital systems. This method converts subtraction into an addition operation, simplifying the logic required. The base 'r' determines the type of complement used (e.g., for base 10, it's 9's complement; for base 2, it's 1's complement).
The general idea is to add the minuend (M) to the (r−1)'s complement of the substrahend (N). The way the result is interpreted depends on whether an 'end carry' is generated during the addition.
Let's look at the steps provided and see how they fit into the (r−1)'s complement subtraction process.
This is the initial and crucial step. Instead of directly subtracting N from M, we add M to the (r−1)'s complement of N. This conversion is fundamental to the method.
\( \text{Result} = M + (r-1)'s \text{ complement of } N \)
This step is always performed first.
An end carry occurs when the result of the addition in step (A) exceeds the number of bits/digits allocated, generating a carry-out from the most significant position. This typically happens when \(M \ge N\). If an end carry occurs, it signifies a positive result. In the (r−1)'s complement method, this end carry is added back to the least significant bit of the sum. This is called an 'end-around carry'.
\( \text{Final Result} = \text{Sum (from A)} + 1 \quad (\text{if end carry occurs}) \)
This step is performed conditionally after step (A) if there is an end carry.
If no end carry occurs after the addition in step (A), it usually means \(M < N\), and the result M − N is negative. The sum obtained in step (A) in this case is the (r−1)'s complement of the magnitude of the actual difference (N − M). To get the actual magnitude of the difference, you need to take the (r−1)'s complement of the result from step (A). Since the original difference (M − N) was negative, a negative sign is placed in front of this magnitude.
\( \text{Final Result} = - ((r-1)'s \text{ complement of Sum from A}) \quad (\text{if no end carry occurs}) \)
This step is performed conditionally after step (A) if there is no end carry.
This step is confusing and incorrect in the standard (r−1)'s complement subtraction process. Step (B) applies when you have a positive result (after adding the end carry), and step (C) applies when you have a negative result (and you take the complement to find the magnitude). Taking the complement of the result from step (B) (a positive number) is not part of finding the difference M-N. Similarly, step (C) already involves taking the complement to find the magnitude of a negative result; performing another complement based on some combination of step B and C is not the correct procedure.
This step is not a valid part of the standard (r−1)'s complement subtraction method.
Based on the analysis, the process flows from step (A), and then either step (B) or step (C) is applied depending on the outcome of (A).
Case 1: \( M \ge N \) (Result is positive)
Case 2: \( M < N \) (Result is negative)
Step (D) is not used in either case.
The steps involved in the (r−1)'s complement method for subtracting M−N are primarily step (A), followed by either step (B) or step (C), depending on the end carry. Step (D) is not a standard or correct procedure within this method.
Therefore, the correct steps described in the options that are part of the (r−1)'s complement subtraction method are (A), (B), and (C).
| Step | Description | Is it a valid step? | When is it applied? |
|---|---|---|---|
| (A) | Add M to (r−1)'s complement of N. | Yes | Always the first step. |
| (B) | If end carry occurs, add 1. | Yes | After (A) if end carry occurs (\(M \ge N\)). |
| (C) | If no end carry, complement result from (A) & add negative sign. | Yes | After (A) if no end carry occurs (\(M < N\)). |
| (D) | Complement result from B or C. | No | Not a standard step. |
The correct steps that constitute the (r−1)'s complement method for subtracting two positive numbers are those described in (A), (B), and (C). Step (D) is not part of this standard procedure.
| Concept | Description |
|---|---|
| (r−1)'s Complement | A method for representing negative numbers or performing subtraction by converting it to addition. For base r, it's \(r^n - 1 - N\), where n is the number of digits. |
| Subtraction M − N | Calculated as \(M + (\text{(r−1)'s complement of } N)\). |
| End Carry | A carry generated out of the most significant position after addition in step (A). Indicates a positive result (\(M \ge N\)). |
| End-Around Carry | Adding the end carry back to the least significant bit, done in the (r−1)'s complement method when an end carry occurs. |
| No End Carry | Happens when \(M < N\). The result from step (A) is the complement of the magnitude of the negative difference. |
Understanding (r−1)'s complement is essential in computer arithmetic and digital logic. It's closely related to other complement systems:
Both (r−1)'s complement and r's complement provide ways to perform subtraction using addition circuits, which is a key concept in the design of Arithmetic Logic Units (ALUs).
The binary equivalent of the decimal number 10 is __________.
The decimal number 76 in hexadecimal and BCD number system is respectively;
The binary equivalent of the decimal number 10 is __________.
A number may be represented in various number systems. Arrange the following number systems in ascending order based on the number of bits needed to represent the same number.
A. Binary
B. Decimal
C. Hexadecimal
D. Octal
Choose the correct answer from the options given below
Binary addition of 16 and -83 using 2’s compliment results in: