4 ms·
Mildly off-topic, but I've always wondered about having a non-fixed length address scheme: if there are 64 bits in the address, let the first 8 bits (64/8 = 8)
by adtac 9y ago
Mildly off-topic, but I've always wondered about having a non-fixed length address scheme: if there are 64 bits in the address, let the first 8 bits (64/8 = 8) be 1 and the 9th bit be 0. This way we encode the length of the address. After that, every bit is available for use (all 64 - 9 = 55 bits).
Suddenly want to increase the domain from 2^55 to something much higher? Use a 15-byte address where the first 15 bits are 1s and the 16th bit is 0. The rest of the (15*8 - 16 = 104) bits are available.
You get the point - we can arbitrarily increase the size without giving up flexibility.
What's the drawback if we use something like this? Routing troubles? Speed?
Alternative method: the addresses can be as many bits as required, but every bit index that's a multiple of 8 must be 1. The last byte is signified by a byte having 0 at index 0. Basically:
[1]1010110 [1]0001111 [0]1101011
^ last byte
- nightcracker 9y ago> What's the drawback if we use something like this? Routing troubles? Speed? This problem is not one of technical difficulties. There are many protocols that could be designed that are future-proof, efficient, etc. The issue is entirely social. Everyone needs to use the same protocol(s), so there's a HEAVY emphasis on 'if it ain't broke, don't fix it'.
- icebraining 9y agoYour method is essentially how UTF-8 works. I think the problem is implementing that efficiently in hardware, which is needed for routers.
- WhoooItsMe 9y agoNot quite, UTF-8 encodes the length of the sequence in the first byte, instead of marking the end, this makes more sense because it is easier to detect broken input. 1110xxxx 10xxxxxx 0xxxxxxx obviously has a byte missing and is broken, but [1]xxxxxxx [0]xxxxxxx could have any number of bytes missing an would just yield the wrong value.
- codesnik 9y agosomething like this was used in MIDI protocol
- Nycto 9y agoThis is called a VLQ, btw. Variable Length Qunatity: https://en.m.wikipedia.org/wiki/Variable-length_quantity https://en.m.wikipedia.org/wiki/Variable-length_quantity