Bytes, Words and Quads
Displaying 1-3 of 3 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Devon

A quick memory question:

Does a signed byte, word or quad use more memory than an unsigned one? I understand that a byte is 8 bits, word 16, quad 32, but is a signed byte still 8 bits or is it 9? If it is 9, given that you cannot set bit accurate pointers, I would have to give up the next 7 bits (big deal) and set the next value at the next complete byte, correct?

Such as:

sbyte[Ptr] = 26;
sbyte[Ptr+2] = 13;

Or can I do

sbyte[Ptr] = 26;
sbyte[Ptr+1] = 13;

without overwriting a portion of the first value?

Thanks,
Devon



--- Square's making money. We're making art.

Posted on 2000-12-17 21:49:29

Praetor

A byte, signed or otherwise, still only occupies 8-bits of memory. And it still has a range of 256 possible combinations. The range is just offset for signed vs unsigned. Signed = -128 to 127 while Unsigned = 0 to 255

Words and Quads follow suit.



Praetor - Strong enough for a man, but made for a woman.

Posted on 2000-12-17 22:31:38

Devon

-nt-



--- Square's making money. We're making art.

Posted on 2000-12-17 23:26:39


Displaying 1-3 of 3 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.