if i have 4 bits I can use 1 hex char...
if i have 8 bits I can use 2 hex chars...
if i have 16 bits I can use 4 hex chars...
etc, etc, etc.
so does that mean i need 128 hex chars for 512 bits?
also, i've been pondering this:
what about internal representations of number systems, example:
can't we cut down the number of numbers needed to address things by using a number system of a higher base?
like: if i had a number system with 1024 digits, can't i address 512 bits with
less characters? (roughly 6 or so hex chars?)
i'm all confused...
addresses
of course you could represent thing with a higher base as long as the base is in the form of 2^n.
Binary would be the for of 2^1 (base 2)
oct would be the form of 2^3 (base
hex would be the form of 2^4 (base 16)
In hex you use "0123456789ABCDEF" to represent the various values, but what about 2^5 (base 32) then? something like:
"0123456789ABCDEFGAHIJKLMNOPQRSTU"
Sure it would be possible, but would be somewhat difficult to work with and what about 2^6 (base 64) then? We run out of characters.
Yes, it is possible, but i dont believe it would be worth it.
base 2 char = up to 1 bits
base 4 char = up to 2 bits
base 8 char = up to 3 bits
base 16 char = up to 4 bits
base 32 char = up to 5 bits
etc...
base 1024 char = up to 10 bits
Binary would be the for of 2^1 (base 2)
oct would be the form of 2^3 (base
hex would be the form of 2^4 (base 16)
In hex you use "0123456789ABCDEF" to represent the various values, but what about 2^5 (base 32) then? something like:
"0123456789ABCDEFGAHIJKLMNOPQRSTU"
Sure it would be possible, but would be somewhat difficult to work with and what about 2^6 (base 64) then? We run out of characters.
Yes, it is possible, but i dont believe it would be worth it.
base 2 char = up to 1 bits
base 4 char = up to 2 bits
base 8 char = up to 3 bits
base 16 char = up to 4 bits
base 32 char = up to 5 bits
etc...
base 1024 char = up to 10 bits
This was supposed to be a cool signature...
Re: addresses
Yes. That's the ice thing about hex - one hexadecimal digit always represents 4 bits (a nibble). That is one of the things that makes it so easy to 'translate' from base 16 to base 2. You know that:eboyd wrote: so does that mean i need 128 hex chars for 512 bits?
0xF = 1111b
0x8 = 1000b
0x1 = 0001b
therefore, you also know that
0xF8 = 1111 1000b
and the same system can be extended to any length of number, so
0x1F81 = 0001 1111 1000 0001b
HTH
Cheers,
Adam