Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by eru

11 hours ago

For unsigned ints, or also for signed ints?

3 comments

eru

Reply

account42  9 hours ago

Two's complement is a representation specifically for signed integers.

dmitrygr  11 hours ago

For signed. Unsigned overflow was defined for a while now.

  • gblargg  8 hours ago

    And unsigned negation is two's complement negation as well (-u = 0-u).

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities