Binary Encoding
A GUID can be stored as a 16-byte (128-bit) number, which is usually split into four fields. The most commonly used structure of these is defined as follows. Note that this format differs from the UUID standard only in the byte order of the first 3 fields.
Bits | Bytes | Name | Endianness
(GUID) |
Endianness
RFC 4122 |
---|---|---|---|---|
32 | 4 | Data1 | Native | Big |
16 | 2 | Data2 | Native | Big |
16 | 2 | Data3 | Native | Big |
64 | 8 | Data4 | Big | Big |
One to three of the most significant bits of the first byte in Data 4 define the type variant of the GUID:
Pattern | Description |
---|---|
0xx | Network Computing System backward compatibility |
10x | Standard |
110 | Microsoft Component Object Model backward compatibility; this includes the GUIDs for important interfaces like IUnknown and IDispatch |
111 | Reserved for future use |
For the "standard" variant, the most significant four bits of Data3 define the version number, and the algorithm used.
Read more about this topic: Globally Unique Identifier
Related Phrases
Related Words