Is the answer in book wrong? Ones complement conversion

  • Thread starter Thread starter orangeincup
  • Start date Start date
  • Tags Tags
    Book
AI Thread Summary
The discussion centers on converting the one's complement binary number 1000 1000 into its decimal equivalent. There is confusion regarding the sign representation, as the leading '1' indicates a negative value in one's complement. The correct interpretation reveals that the one's complement of the number is positive, leading to a final result of -119. The book's stated answer of 119 is incorrect for this context. Clarification is needed on the conversion process and the implications of the sign bit in one's complement representation.
orangeincup
Messages
121
Reaction score
0

Homework Statement


Convert the following one's compliment binary into a decimal number
1000 1000

The Attempt at a Solution


The book says the answer is suppose to be 119, but shouldn't it be negative? I thought one at the front of the number represented the sign, when using one's compliment.
 
Last edited:
Physics news on Phys.org
It depends on how many bits are defined for the number like 8bits or 16bits...

In this case, it looks like it is a negative number so the ones complement of it will be positive because all bits are reversed.

So show your work and we can confirm what you got.

http://en.m.wikipedia.org/wiki/Ones'_complement
 
Last edited:
  • Like
Likes 1 person
For positive numbers, the ones and twos complement representation of a value are the same. For negative numbers with the same string of bits, the ones complement value will be +1 more than the two's complement value. For 8 bit numbers, 10000000 is -128 in two's complement and -127 (= -128 + 1) in one's complement, 11111111 is -1 in two's complement and 0 (= -1 + 1) in ones complement, and 10001000 is -120 in two's complement and -119 (= -120 + 1) in ones compement.
 
Last edited:
  • Like
Likes 1 person
1000 1000 represented by one's complement
My workings...
1 at the far right means it's negative
inverting numbers...
0111 0111
0+64+32+16+0+4+2+1=119

Answer: -119

The solution says it's 119. Here's exactly what the question asks for:

What is the decimal representation of 8 bit 1000 1000 (subscript 2) one’s
compliment numbers.
Ans: 119
 
TL;DR Summary: I came across this question from a Sri Lankan A-level textbook. Question - An ice cube with a length of 10 cm is immersed in water at 0 °C. An observer observes the ice cube from the water, and it seems to be 7.75 cm long. If the refractive index of water is 4/3, find the height of the ice cube immersed in the water. I could not understand how the apparent height of the ice cube in the water depends on the height of the ice cube immersed in the water. Does anyone have an...
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...
Back
Top