UUID Bit Meaning

⸺ by Charles Iliya Krempeaux

⸺ up

⸺ previous

⸺ next

Now let's look a little closer at UUIDs.

A UUID is 128-bits of data — do any of those bits have special meanings? The answer is — yes. Some bit ranges within the 128-bits of a UUID have specific meanings. For example:

	xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx

The 4-bits of the “M” represents the version of the UUID format that the UUID should be interpreted under.

And the most-significant 3-bits of the “N” represents the variant of the UUID format that the UUID should be interpreted under.

So, for example, consider this UUIDL

	            version
	              ↓
	4ffed962-adf6-4eef-931d-8d95b798c080
	                   ↑
	                variant

The version of this UUID is UUID version 4.

And the variant of this UUID is UUID variant 8. (Why the UUID variant is `8` rather than `9` in this example will make more sense later, when we look at the UUID variant more closely.)