Close

Use binary, 2s complement numbers

A project log for PDP - Processor Design Principles

Distilling my experience and wisdom about the architecture, organisation and design choices of my CPUs

yann-guidon-ygdesYann Guidon / YGDES 02/01/2018 at 22:571 Comment

Need I say more ?

Who uses 1s complement anyway ?


Update :

https://stackoverflow.com/questions/1099276/why-base-2-with-binary-numbers

"CDC used to produce 1's complement machines which made negation very easy as you suggest. As I understand it, it also allowed them to produce hardware for subtraction that didn't infringe on IBM's patent on the 2's complement binary subtractor."
edited Oct 18 '12 at 19:05 by NullUserException

Because of this, 1's complement has crept into some languages up until the 80's, such as VHDL (derived from Ada, derived from Pascal, "because we want the language to run everywhere we can"), creating confusion and facepalms for decades...

Discussions

Ted Yapo wrote 02/02/2018 at 01:19 point

Sure, but you can't represent -0 in your fancy 2's complement :-)  And more negative numbers than positive ones?  That can't be right...

  Are you sure? yes | no