View previous topic :: View next topic |
Author |
Message |
drajasekharreddy Beginner
Joined: 08 Apr 2004 Posts: 16 Topics: 14
|
Posted: Mon Jun 21, 2004 6:12 am Post subject: Regarding COMP variable |
|
|
Hi,
my question is s9(9) comp will occupy 4 bytes. and S9(10) comp will occupy 8 bytes. this everybody knows. but my doubt is why s9(9) comp is taking 4 bytes where as s9(10) comp is taking 8 bytes, even thou the difference is 1 number between s9(9) comp and s9(10) comp. can any body know the reason. r we have to remebeber like this .
s9(1-4) comp = 2 bytes
s9(5-9) comp = 4 bytes
s9(10-18 ) comp = 8 bytes.
Thanx
Raja |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Mon Jun 21, 2004 6:30 am Post subject: |
|
|
drajasekharreddy,
The storage of the binary items is in halfword ,fullword and doubleword which is the reason for 2, 4 , 8 bytes
1 through 4 digits occupy 2 bytes (halfword) and 5 through 9 digits occupy 4 bytes (fullword) and 10 through 18 occupy 8 bytes (doubleword)
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|