Is the answer in book wrong? Ones complement conversion

  • Thread starter Thread starter orangeincup
  • Start date Start date
  • Tags Tags
    Book
Click For Summary

Homework Help Overview

The discussion revolves around converting a binary number in one's complement format into its decimal representation. The original poster questions the validity of the answer provided in a textbook, which states that the conversion of the binary number 1000 1000 results in 119, while they believe it should be negative due to the leading one indicating a negative sign in one's complement notation.

Discussion Character

  • Conceptual clarification, Assumption checking

Approaches and Questions Raised

  • Participants discuss the implications of the number of bits defined for the binary representation and how this affects the interpretation of the sign. There are attempts to clarify the relationship between one's complement and two's complement values, particularly for negative numbers. Some participants suggest showing work to confirm the conversion process.

Discussion Status

The discussion is ongoing, with participants exploring different interpretations of the binary representation and its conversion. Some guidance has been offered regarding the workings of one's complement, but no consensus has been reached regarding the final answer.

Contextual Notes

There is a mention of the number of bits being relevant to the interpretation of the binary number, which may affect the conversion process. The original poster also highlights the specific wording of the question from the textbook, which may imply certain assumptions about the expected answer.

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   Reactions: 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   Reactions: 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
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 7 ·
Replies
7
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
9
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
5
Views
3K