0

How different computers know which signed integers representation was used by each other?

For example, if I send two's complement method encoded inetegers via network, how does clients know that it was two's complement method instead of, for example, one's complement or signed magnitude?

FrozenHeart
  • 19,844
  • 33
  • 126
  • 242
  • 1
    They wouldn't. So you put it in the specification of the communication protocol. – harold Jan 21 '16 at 12:31
  • As an example of what @harold was saying, the [unoffical quake network specs](http://www.gamers.org/dEngine/quake/QDP/qnp.html) say: "All numbers are in big-endian order unless otherwise stated." – Alex Taylor Feb 06 '16 at 10:08
  • @Alex Taylor But I'm talking about the signed integers representation, not BE / LE – FrozenHeart Feb 06 '16 at 11:28
  • And what harold said is still true - it's agreed to in the communications protocol. – Alex Taylor Feb 06 '16 at 11:36

0 Answers0