Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, sign-magnitude is the right terminology, my mistake, but too late to edit. As for two's complement, look at slide 18-19 from the link somebody produced below:

https://posithub.org/conga/2019/docs/13/1430-John-Introducto...



Hm, they do indeed use 2's-complement... sort of. In case of a negative posit, they don't apply 2's-complement to the mantissa or anything like that, but rather to the entire posit without regard to the meaning of the bits. That's... kind of surprising, huh! Although it's not the first number format to do that. But it is a sort of 2's-complement, yes...


The idea is that you can reuse instructions for signed integer comparisons. This is explicitely mentioned in the standard, section 5.3:

https://posithub.org/docs/posit_standard-2.pdf




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: