Question about binary
Hi i'll make this quick.
When I use
DEBUGIN BIN5 testvar
I am trying to input a 4 digit binary number ie 1001, when I tried to do this with BIN4 I would input 4 numbers but it would only save 3 of them.
Which is why I changed it to BIN5, the thing is it seems I have to place a leading 1 or 0 THEN input my 4 digit number.
Why is this? And will using BIN5 screw up my use of OUTC? OUTC is 4 digits while i'm inputting a "supposedly" 5 digit number.
like OUTC = testvar
Whats the right way to do this?
When I use
DEBUGIN BIN5 testvar
I am trying to input a 4 digit binary number ie 1001, when I tried to do this with BIN4 I would input 4 numbers but it would only save 3 of them.
Which is why I changed it to BIN5, the thing is it seems I have to place a leading 1 or 0 THEN input my 4 digit number.
Why is this? And will using BIN5 screw up my use of OUTC? OUTC is 4 digits while i'm inputting a "supposedly" 5 digit number.
like OUTC = testvar
Whats the right way to do this?
Comments
testvar VAR Byte
main:
DEBUGIN BIN4 testvar
OUTC=testvar
DEBUG BIN4 OUTC,CR
PAUSE 300
GOTO main
Jeff T.
EDIT sorry testvar would be better declared a nib
Post Edited (Unsoundcode) : 11/13/2008 7:30:09 PM GMT