• Create Account

Banner advertising on our site currently available from just \$5!

### #ActualServant of the Lord

Posted 07 July 2013 - 02:32 PM

To add onto what Brother Bob says, since memory is laid out mostly as powers of two*, and 16 is a power of two, it makes it very convenient to describe memory-related values in hexadecimal.

1 byte = 2 digit hex exactly

2 bytes = 4 digit hex exactly

4 bytes = 8 digit hex exactly

Binary would work just as good... but it is too wordy. 11101010 11010101 10010011 11011101 verses just 0xEAD593DD. It's alot more compact to display.

Decimal is also alot more compact to display (3939865565), but it doesn't line up to the powers of two like binary and hexadecimal does.

Some people also use octal (base 8), though I don't see that all too often.

The final benefit of hexadecimal is that you can spell words in it: 0xDEADC0DE

*The basic units of memory (bytes) don't have to be laid out in powers of two, but it almost always is nowadays. Example: 32bit PCs and 64bit PCs. Sure, there's some wierd systems where bytes are 10 bits, but hey,

### #1Servant of the Lord

Posted 07 July 2013 - 02:28 PM

To add onto what Brother Bob says, since memory is laid out mostly as powers of two, and 16 is a power of two, it makes it very convenient to describe memory-related values in hexadecimal.

1 byte = 2 digit hex exactly

2 bytes = 4 digit hex exactly

4 bytes = 8 digit hex exactly

Binary would work just as good... but it is too wordy. 11101010 11010101 10010011 11011101 verses just 0xEAD593DD. It's alot more compact to display.

Decimal is also alot more compact to display (3939865565), but it doesn't line up to the powers of two like binary and hexadecimal does.

Some people also use octal (base 8), though I don't see that all too often.

The final benefit of hexadecimal is that you can spell words in it: 0xDEADC0DE

PARTNERS