Why is 1000 = -8 in signed 4-bit binary?

  • Thread starter francisg3
  • Start date
  • Tags
    Binary
In summary, signed 4-bit binary notation uses a sign bit to indicate positive or negative values. The values for negative numbers are found by taking the 2's complement (inverting all bits and adding 1). The leftmost bit in binary represents the sign, so the last combination "1000" can represent either 8 or -8. In this case, the convention is to use -8. Therefore, 1000 in signed 4-bit binary notation is equal to -8 in decimal. This applies to other bit lengths as well, such as signed 8-bit and 16-bit binary, which have specific ranges for negative and positive values.
  • #1
francisg3
32
0
I was wondering why 1000 in signed 4-bit binary notation is equal to -8 in decimal. From my understanding, the 1 simply states that sign (1 being negative and 0 being positive) it has no real decimal value. I have read that it is not possible to correctly take the 2's complement of -8 so I cannot come to convince myself that 1000 is in fact -8 in binary.

Thanks for the help!
 
Engineering news on Phys.org
  • #2
Try adding 4 to it. Then add 4 again.
 
  • #3
The left-hand bit is indeed the sign bit, but "-0" doesn't really make sense. Plus, if we allowed -0 and +0, we'd have 2 binary values for zero.

The positive values are easy:
0 = 0000
1 = 0001
2 = 0010
3 = 0011
4 = 0100
5 = 0101
6 = 0110
7 = 0111

For the negative values, you need the 2's complement (invert all the bits, then add "1")

-1 = 1110 + 1 = 1111
-2 = 1101 + 1 = 1110
-3 = 1100 + 1 = 1101
-4 = 1011 + 1 = 1100
-5 = 1010 + 1 = 1011
-6 = 1001 + 1 = 1010
-7 = 1000 + 1 = 1001

The only combination not yet used in either positive or negative values is "1000"
This could equal either 8 or -8, so in keeping with the sign bit convention, -8 is used.

So, signed 4-bit binary gives you the values -8 to 7.
Similarly, signed 8-bit binary give you -128 to 127 and signed 16-bit binary give -32768 to 32767.
 
  • #4
alright i understand now thanks for the explanation!
 

1. Why does 1000 equal -8 in signed 4-bit binary?

In signed 4-bit binary, the first bit is used to represent the sign of the number, with 0 indicating a positive number and 1 indicating a negative number. The remaining 3 bits are used to represent the magnitude of the number. Since 1000 has a 1 as its first bit, it is interpreted as a negative number. In 4-bit binary, the maximum value that can be represented is 7, so when we subtract 8 from 7, we get -1. Therefore, 1000 in signed 4-bit binary equals -8.

2. How is 1000 converted to -8 in signed 4-bit binary?

To convert a positive number to negative in signed 4-bit binary, we first take the positive number and represent it in 4-bit binary. Then, we flip all the bits (0s become 1s and 1s become 0s) and add 1 to the result. So, 1000 becomes 0111 and adding 1 to it gives us 1000, which is equal to -8 in signed 4-bit binary.

3. Can you represent larger numbers in signed 4-bit binary?

No, signed 4-bit binary can only represent numbers up to 7. This is because the first bit is used to represent the sign, leaving only 3 bits to represent the magnitude of the number. With 3 bits, we can represent a maximum value of 7 (111 in binary).

4. What is the purpose of using signed 4-bit binary?

Signed 4-bit binary is commonly used in computer systems to represent integers in a compact and efficient way. It allows for a wider range of numbers to be represented using fewer bits compared to unsigned binary, which can only represent positive numbers.

5. Why is signed 4-bit binary used instead of unsigned binary in some cases?

Signed 4-bit binary is used in cases where we need to represent both positive and negative numbers in a compact format. This is common in computer systems where memory and storage space is limited. Signed 4-bit binary allows for a wider range of numbers to be represented using fewer bits, making it more efficient than unsigned binary in these cases.

Similar threads

Replies
4
Views
927
  • Programming and Computer Science
Replies
3
Views
960
  • Engineering and Comp Sci Homework Help
Replies
1
Views
624
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • Computing and Technology
Replies
4
Views
764
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
Replies
10
Views
3K
  • General Math
Replies
3
Views
5K
  • Special and General Relativity
Replies
24
Views
1K
Back
Top