Closed RufiS closed 11 years ago
Yes, it uses a signed int basically because Java can't handle (natively) unsigned integers. It might be desirable to change it so it uses a BigInteger instead, so it could handle any word length.
By the way this issue should be opened in BasicCircuits, as RedstoneChips is just the API
Noticed that if I compare FFFFFFFFh and (8->F)**h ( represents DONTCARE value) with a comparator chip, they are equal. Also if i use a multiplier with no constant declared and no overflow bits, multiplying (00000001h x FFFFFFFFh) = 7FFFFFFFh, instead of FFFFFFFFh Also multiplying (7FFFFFFFh x FFFFFFFF) = 00000001 instead of 80000001. Also with the multiplier, (8***h x FFFFFFFFh) = 00000001h instead of 80000000.
compare: input pins 31->0: 1** input pins 63->32: 11111111111111111111111111111111 output pin 0: 0 output pin 1: 1 output pin 2: 0 Multiplier 32 input pins 31->0: 01 input pins 63->32: 11111111111111111111111111111111 output pins 31->0: 0******
signed int used as a variable in the plugin as opposed to an unsigned int??
I came across this while the computer i built with your plugin was doing a compare for the Bresenham's line algorithm function i wrote into the program memory. Also while I was multiplying DY x FFFFFFFFh (-1), the DY problem was however solved by inverting and adding 1. However the compare trouble has me stumped.