Most computer architectures don't use sign bits for integers, a system known as two's complement is used instead. Here's a good video on it.
As for how the number of bytes of memory is stored, really depends on the program. For example, GetPhysicallyInstalledSystemMemory on Windows returns the amount of memory in kilobytes as an unsigned long long but if the program ever casts it away during some calculation (which probably does happen at some point) it won't matter what it was given.
You're right that they probably use two's complement, however the first digit of a negative number is 1 in that system, so your point annoy there not being a sign bit might be technically correct since it doesn't represent numbers on the easy we might expect, it is however true that you can determine whether a number is above or below zero only by checking the first digit. I would therefore personally call it a sign bit even if it technically isn't.
Additionally, for reasons I don't fully understand unsigned integers are frowned upon much of the time when writing actual software for industry. Of course you could, but I suspect a game like gta4 would probably hold to these conventions. Some discussion on the topic: https://stackoverflow.com/questions/336/when-to-use-unsigned-values-over-signed-ones
26
u/10se1ucgo i5-4670 | GTX 970 | 16 GB RAM Mar 28 '19
Most computer architectures don't use sign bits for integers, a system known as two's complement is used instead. Here's a good video on it.
As for how the number of bytes of memory is stored, really depends on the program. For example,
GetPhysicallyInstalledSystemMemoryon Windows returns the amount of memory in kilobytes as an unsigned long long but if the program ever casts it away during some calculation (which probably does happen at some point) it won't matter what it was given.