- #1
ECE
- 7
- 0
Why in 2's complement the range of numbers that can be represented with 4 bits are from -8 to +7? Wouldn't the numbers with 4 bits be till 15? I am confused.Please help me out.
-Thankyou
-Thankyou
Last edited:
2's complement is a mathematical operation used to represent negative numbers in binary form. It involves flipping the bits of a number and adding 1 to the result.
2's complement is used to simplify arithmetic operations on binary numbers. It allows for the addition, subtraction, and multiplication of both positive and negative numbers using the same set of rules.
For 2's complement representation, the number of bits needed depends on the range of numbers that need to be represented. With 4 bits, the range of numbers that can be represented is -8 to 7.
To convert a positive number to 2's complement with 4 bits, first convert the number to binary. Then, if the number is positive, leave the bits as is. If the number is negative, flip all the bits and add 1 to the result.
No, 2's complement is only used for representing negative and positive numbers in binary form. It is not used for decimal numbers.