Close

Signed or unsigned ?

A project log for SPDT16: 16-bits arithmetic unit with relays

Let's imagine I could get about 200 SPDT relays. Of course I would know what to do with them :-D But will 200 be enough ?

yann-guidon-ygdesYann Guidon / YGDES 05/02/2016 at 22:332 Comments

For the sake of simplicity, we'll consider that this machine only handles unsigned numbers.

For the addition and subtraction, this does not matter because 2s-complement representation is insensitive to the actual circuit. It's then just a matter of how we interpret the Most Significant Bit, and display the input and output numbers.

Considering that the #DYPLED is not yet ready and I'll be using TIL311s in hexadecimal, it just makes sense to say the numbers are positive.

For division and multiplication, the hardware must know the signedness of the operands. Things can get pretty tricky and division has weird rounding behaviours. These considerations are better left to "advanced" machinery building projects...

Discussions

Ed S wrote 05/03/2016 at 10:28 point

Possible alternative: "the machine works in two's complement (so there's a unique zero, and a negative number is easy to spot) but multiplication and division is unsigned."

  Are you sure? yes | no

Yann Guidon / YGDES wrote 05/03/2016 at 10:46 point

Yes but "think of the children" ;-)

Negative numbers will not be talked about...

  Are you sure? yes | no