• Sign Up
  • Archive

Two's Complement Explained

Imagesource: https://neugierig.org/

Some say: Math is a jerk. I personally don't subscribe to this crude theory as, ultimately, at the most fundamental level of our modern digital world, it's nothing more than math. It's the diligent electrons, driven by electromagnetic fields and racing through exotically clustered metals, that keep our world ticking.

What remains incredible – to me, at least – is the idea that one can design a modern computational servant to be Turing-complete on the hardware side in such a way that it only masters the addition of two numbers, plus a little bit of branching and stuff. Yet, on the other hand, based on that ability, it can solve any computable problem.

Computer Science. I love it. ❤️ And those who feel the same way have ascended the abstraction tree in their minds. They know that after addition comes subtraction, which makes multiplication and division possible purely in software... The rest is then simply a laborious task for anyone with too much time on their hands. Absolutely impractical, but possible.

But how do you implement subtraction when the hardware can only add? The answer is first semester CS and it's called Two's Complement. Working with it is one thing, understanding how and why it works is another.

A truly great explanation attempt comes from Evan Martin aka @evmar. Sometimes, brief and to-the-point means effective. This is sometimes.

Share the signal:

Read the full newsletter Issue #81 of 8bitnews.io: Hardware Design AI

More from #81

Don't want to miss updates like that? Subscribe below and receive regular content that we only share with our subscribers.

Don't Miss

Sign up for our retro & computing magazine and get content like that regularly. Relevant. Up to date. Free.

We send our subscribers one update twice a month. Retrocomputing topics well curated by a team who love machines of the 70s, 80s and 90s as much as you do.

  • Terms
  • Privacy
  • Imprint