Digital-Logic-Sim icon indicating copy to clipboard operation
Digital-Logic-Sim copied to clipboard

[Feature] Add the negative sign back to the 7-segment display

Open mcl-playz opened this issue 1 year ago • 10 comments

In this tutorial, the 7-segment display has the capability to display a negative sign. However, in the newest version, this functionality seems to be absent.

I have attempted to create a workaround to achieve this by trying to display a '-' character on the display before the most significant digit. However, I haven't been successful in implementing this correctly.

Therefore, I would like to request either:

  • Reintroduction of the original negative sign functionality if it was intentionally removed.
  • Guidance or a solution on how to implement a workaround that displays a negative sign before the most significant digit in the current version.

Any assistance or direction on this would be greatly appreciated, cheers :D

P.S. My 8-bit display and the digit display are identical to the ones shown in the tutorial.

mcl-playz avatar Apr 15 '25 13:04 mcl-playz

the lack of a negative sign is closer to real-life 7-segment displays. Typically you'd use a second one and just light up the center segment if the number is negative (if you're using 2s compliment, that'd be the Most Significant Bit)

RobMayer avatar Apr 15 '25 16:04 RobMayer

@RobMayer Alright, thats a fair reason. How would I implement the negative sign? Would I add a whole new display and only show the negative symbol on there or could I also show it on the existing displays?

mcl-playz avatar Apr 16 '25 04:04 mcl-playz

Up to you, really - you could use a whole 'nother display, or you could make it use the right-most display that is otherwise not used.

https://www.youtube.com/watch?v=dLh1n2dErzE&list=PLowKtXNTBypGqImE405J2565dvjafglHU&index=33

RobMayer avatar Apr 16 '25 04:04 RobMayer

@RobMayer I'm unable to figure out make it use the right-most display that is otherwise not used, so I ended up just creating another chip purely for displaying the negative symbol and cancelling the ripple blanking if it is on. If you know how I could make the ripple negative work properly please share!

mcl-playz avatar Apr 16 '25 05:04 mcl-playz

they made a mistake, they meant left most

BestGiter avatar Apr 17 '25 02:04 BestGiter

they made a mistake, they meant left most

Who did?

RobMayer avatar Apr 17 '25 03:04 RobMayer

@RobMayer I'm unable to figure out make it use the right-most display that is otherwise not used, so I ended up just creating another chip purely for displaying the negative symbol and cancelling the ripple blanking if it is on. If you know how I could make the ripple negative work properly please share!

I don't actually know how to make reverse ripple work off the top of my head, but I think I encountered something similar when I was making a bidirectional counter with carry/borrow? I might start there, maybe?

RobMayer avatar Apr 17 '25 03:04 RobMayer

its because number is right alligned, who does left alligned numbers

BestGiter avatar Apr 17 '25 03:04 BestGiter

There were no mistakes. We're not referring to left-align numbers.

When you have, say, 5 displays, and a number you want to show has 2 digits, and is negative, the negative sign would go on the third display - the "Right-most otherwise unused" display. The question they were asking was how to "reverse ripple" to pick the right-most-otherwise-unused display to place the negative sign on.

RobMayer avatar Apr 17 '25 03:04 RobMayer

oh its just that you worded it kinda badly

BestGiter avatar Apr 17 '25 03:04 BestGiter