Electronics and Communication Engineering - Digital Electronics - Discussion

Discussion Forum : Digital Electronics - Section 1 (Q.No. 7)
7.
In 2's complement representation the number 11100101 represents the decimal number
+37
-31
+27
-27
Answer: Option
Explanation:

A = 11100101. Therefore A = 00011010 and A' = A + 1 = 00011011 = 16 + 8 + 2 + 1 = 27. Therefore A = -27.

Discussion:
54 comments Page 2 of 6.

Mannu Jha said:   7 years ago
The MSB holds the sign.

Veer said:   7 years ago
How it comes in negative.

Priyajit Pal said:   8 years ago
Negative numbers are always represented in 2's compliment form. That's why the original no must be negative.

Sneha said:   8 years ago
If carry is generated find 2's complement of the answer to get final result,

If carry is not generated give negative sign and write the value.

RAJ said:   8 years ago
At all many have a doubt for the negative sign doubt so I ll try to solve it.

In digital electronics the MSB bit (the leftmost bit) is the sign bit and its negative if it is set to 1 or if it is set to 0 it is positive. So look at the MSB perform the operation and represent it as positive or negative depending on the sign bit.

Abarna said:   8 years ago
How to convert a signed binary two's complement?
1110 0101(2) to an integer in decimal system (in base 10)

1. Is this a positive or a negative number?
In a signed binary two's complement, first bit (the leftmost) indicates the sign,
1 = negative, 0 = positive.
1110 0101 is the binary representation of a negative integer, on 8 bits.


2. Get the binary representation in one's complement:
* Run this step only if the number is negative *
Subtract 1 from the binary initial number:
1110 0101 - 1 = 1110 0100


2. Get the binary representation of the positive (unsigned) number:
* Run this step only if the number is negative *
Flip all the bits in the signed binary one's complement representation (reverse the digits) - replace the bits set on 1 with 0s and the bits on 0 with 1s:
!(1110 0100) = 0001 1011


3. Map the unsigned binary number's digits versus the corresponding powers of 2 that their place value represent:

27
0
26
0
25
0
24
1
23
1
22
0
21
1
20
1

4. Multiply each bit by its corresponding power of 2 and add all the terms up:
0001 1011(2) = (0 * 27 + 0 * 26 + 0 * 25 + 1 * 24 + 1 * 23 + 0 * 22 + 1 * 21 + 1 * 20)(10) = (0 + 0 + 0 + 16 + 8 + 0 + 2 + 1)(10) = (16 + 8 + 2 + 1)(10) = 27(10).

5. If needed, adjust the sign of the integer number by the first digit (leftmost) of the signed binary:
1110 0101(2) = -27(10).

Nikhil said:   8 years ago
Msb bit decides the sign of the number. After finding the 2's compliment the msb bit is 0, hence the negative sign. If it was 1 it would hav been +27.

Prakash kasera said:   8 years ago
Please understand the question?
The question is saying that the given binary number 11100101 is in already 2's complement form, then how can we write 11100101 in decimal format?

Ans: Left most digit is 1 means it should be a negative number (A/C to question)
1= -ve
0= +ve

step_1------->substract 1 from 11100101 to get 1's complement form
we will get 1's form = 11100100.

step_2--------> Now reverse each digit of 11100100 to get original number in binary
we will get 00011011=27.

step_3--------> so answer will be -27.

Uday kumar said:   8 years ago
Why negative sign comes?

Aditya gupta said:   8 years ago
It is used in short form that you are seeing 16+8+2+1. It is basically the conversion of binary in decimal where 1 is there we add all that positions by taking 2^4+2^8+2^1+2^0 power here represents the position of bits.


Post your comments here:

Your comments will be displayed after verification.