selbstdual
- 3rd June 2007, 01:23
Math issue
I wrote the following numbers to the eeprom
Position 31 till 40 (included)
2118: 00 00 00 00 00 00 00 03 ........ (Position 24 - 31)
2120: 02 02 06 04 00 03 02 00 ........ (Position 32 - 39)
2128: 01 10 27 64 00 00 00 00 ..'d.... (Position 40 - 47)
Then I wrote the following
READ 31, TenThousand
READ 32, Thousand
READ 33, Hundred
REAd 34, Ten
READ 35, One
READ 36, BThousand
READ 37, BHundred
READ 38, BTen
READ 39, BOne
Numbers = (TenThousand * 10000) + (Thousand * 1000) + (Hundred * 100) + (Ten * 10) + One
B = (BThousand * 1000) + (BHundred * 100) + (BTen * 10) + BOne
WRITE 41, Numbers.Byte0
WRITE 42, Numbers.BYte1
WRITE 43, B.Byte0
WRITE 44, B.Byte1
Result - as seen in the code above - is for numbers 10 and 27 and for B 64 and 00.
But being combined and converted to decimal numbers this is not 32264 and 320.
Why ?
I wrote the following numbers to the eeprom
Position 31 till 40 (included)
2118: 00 00 00 00 00 00 00 03 ........ (Position 24 - 31)
2120: 02 02 06 04 00 03 02 00 ........ (Position 32 - 39)
2128: 01 10 27 64 00 00 00 00 ..'d.... (Position 40 - 47)
Then I wrote the following
READ 31, TenThousand
READ 32, Thousand
READ 33, Hundred
REAd 34, Ten
READ 35, One
READ 36, BThousand
READ 37, BHundred
READ 38, BTen
READ 39, BOne
Numbers = (TenThousand * 10000) + (Thousand * 1000) + (Hundred * 100) + (Ten * 10) + One
B = (BThousand * 1000) + (BHundred * 100) + (BTen * 10) + BOne
WRITE 41, Numbers.Byte0
WRITE 42, Numbers.BYte1
WRITE 43, B.Byte0
WRITE 44, B.Byte1
Result - as seen in the code above - is for numbers 10 and 27 and for B 64 and 00.
But being combined and converted to decimal numbers this is not 32264 and 320.
Why ?