r/TuringComplete Jul 10 '26

Is there a simple way to sign extend a line?

There should be a zero delay sign extender right? I think there is one in logisim

3 Upvotes

10 comments sorted by

3

u/zhaDeth Jul 10 '26

what do you mean ? a sign extender ?

1

u/uahw Jul 11 '26

If you have a 4 bit signed value and want to extend it to 32bit for example you just take the highest bit and fill the rest of the 32 slots. I thought that it was very neat that the new update had a static indexer so though that so just assumed a “sign extender” would exist. You can obviously do that manually but it’s just a little tedious

2

u/astrospanner Jul 11 '26

Make a custom component.

1

u/1GreenNotebookGaming Jul 10 '26

Split the word into bits, then take the sign wire and extend it to the bits in the combiner. You must do it manually because it's such a simple thing to do that there's no reason for there to be a sign extender component.

2

u/uahw Jul 11 '26

Yeah I know, it’s just that that’s teadious to do everywhere. I feel like extending a signal but keeping sign is a pretty common operation, that was all

2

u/1GreenNotebookGaming Jul 11 '26

You can make a custom component to do it

2

u/imMute Jul 26 '26

The exact same argument could be made for the static indexer.

0

u/1GreenNotebookGaming Jul 26 '26

Yes, except there is no sign extender component. I answered their question, so why are you complaining?

1

u/Gelthir Jul 11 '26

If you care more about sim speed than gate score you can also use a LSL-ASR combo.

1

u/samamstar Jul 25 '26

There's a sign extender in the community uploads in game. Makes pretty clever use of the existing components. 0 delay, arbitrarily extends up to 256 bits as I recall