ra4king / CircuitSim

Basic Circuit Simulator
https://ra4king.github.io/CircuitSim
BSD 3-Clause "New" or "Revised" License
76 stars 27 forks source link

Don't require constant values to be entered in decimal #97

Open ausbin opened 12 months ago

ausbin commented 12 months ago

A student posted this on Piazza:

Hello! I am a little confused with the constant node. I have used it in other implementations for some of the more basic circuits with lower bit numbers, however there are certain 8-bit numbers such as "00001000" that when in the value attribute of the constant node, in the simulation if shows "11101000". Another one is "00000100" that shows up and computes at "01100100". I have no clue if this is a feature, or if I am missing an important detail.

image

It's pretty fair to be confused by this in my opinion. Ideally, the value would be editable in terms of the display base