Decimal Values of 8-Bit Bit Patterns

  • Thread starter Thread starter ccky
  • Start date Start date
  • Tags Tags
    Bit Patterns
AI Thread Summary
The discussion focuses on converting 8-bit bit patterns into decimal values using excess 128 and 2's complement representations. For the pattern 00000010 in excess 128, the correct decimal value is 126, while the pattern 10000010 in 2's complement yields -126. There is confusion regarding the term "excess 128 2's complement," as these are distinct representations and cannot be combined. The interpretation of excess 128 involves subtracting 128 from the unsigned value, leading to a range of results for different bit patterns. Overall, the calculations for each representation need clarification to ensure accuracy.
ccky
Messages
15
Reaction score
0

Homework Statement


Find the decimal values for the following 8-bit bit pattern
A)00000010 in excess 128 representation
B)10000010 in excess 128 2's complement representation
C)10000010 in excess 128 representation

Homework Equations


Binary
2's complement

The Attempt at a Solution


A(00000010)-1
(00000001)
=11111110.
=254-128=126

B)invert the number to 01111101 and+1=-126

C)130
Is it right or wrong?
 
Last edited:
Physics news on Phys.org
The Wikipedia article on signed numbers has some pretty good information about these number systems that you might want to look over.
http://en.wikipedia.org/wiki/Signed_number_representations

ccky said:

Homework Statement


Find the decimal values for the following 8-bit bit pattern
A)00000010 in excess 128 representation
B)10000010 in excess 128 2's complement representation
For B), are you sure you mean "excess 128 2's complement representation"?

I think the representation can be in "excess 128," or "2's complement" representation, but not both.

C)10000010 in excess 128 representation

Homework Equations


Binary
2's complement

The Attempt at a Solution


A(00000010)-1
(00000001)
=11111110.
=254-128=126
I'm not following what you are doing here. Why did you subtract the 1?

Before getting into Excess-128, let's discuss the more general Excess-K as described in the link above.

Excess-K interpretation = Unsigned interpretation - K
(Simply subtract K from the unsigned interpretation.)

For example,
Excess-K interpretation of "0000 0000" is (0 - K) = -K
Excess-K interpretation of "0000 0001" is (1 - K) = -K + 1
Excess-K interpretation of "0000 0010" is (2 - K) = -K + 2
.
.
.
Excess-K interpretation of "1000 0000" is (128 - K) = -K + 128
.
.
.
Excess-K interpretation of "1111 1111" is (255 - K) = -K + 255.

Now let's put some numbers in knowing that K = 128 for this problem.

Excess-K interpretation of "0000 0000" is (0 - 128) = -128
Excess-K interpretation of "0000 0001" is (1 - 128) = -127
...
Excess-K interpretation of "1000 0000" is (128 - 128) = 0
...
Excess-K interpretation of "1111 1111" is (255 - 128) = 127

Does that make sense?

B)invert the number to 01111101 and+1=-126
Yes, that's correct for "2's Complement representation."

(But I still don't know what is meant by "excess 128 2's complement representation.")

C)130
Is it right or wrong?
That doesn't look right for excess 128 representation. See above in part A where I showed some examples.
 
Back
Top