So I'm trying to confirm that I can use the two's compliment rule to tell that a negative number is negative by checking the bits of it's four bytes. I'm assuming a four byte value to allow for up to 32 bit integers stored... So yeah here we go this is the code.
CLS COLOR #TWHITE DIM BYTES[20] @AGAIN INPUT "ENTER A VALUE " , VALUE GETBYTES VALUE, 4 PRINT "BYTE 0 IS " +STR$(BYTES[0]) PRINT "BYTE 1 IS " +STR$(BYTES[1]) PRINT "BYTE 2 IS " +STR$(BYTES[2]) PRINT "BYTE 3 IS " +STR$(BYTES[3]) FOR T=0 TO 3 COLOR #TOLIVE PRINT "GETTING BITS OF BYTE # " +STR$(T) BYTESTRING$ =" " FOR S=0 TO 7 ' 8 BITS PER BYTE BYTESTRING$ = BYTESTRING$ +STR$(CHECKBIT(BYTES[T], S) NEXT COLOR #TGREEN PRINT BYTESTRING$ GOTO @AGAIN DEF GETBYTES NUM, LENGTH ' LENGTH IN THIS CASE IS THE NUMBER OF BYTES WE EXPECTED FOR I =0 TO LENGTH BYTES[I] = (NUM AND 255) NUM = (NUM - (NUM AND 255)/256 NEXT I END DEF CHECKBITS(N, I) IF (N AND (1 <<I) ) THEN RETURN TRUE ELSE RETURN FALSE ENDIF ENDSo there you have it. Now it seems to work fine but I noticed... there's no pattern when you input a negative value that gaurentees if it's negative that the leading bit will be one.