Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MSB3 to Variant Table #153

Closed
kyzer-davis opened this issue Sep 20, 2023 · 0 comments · Fixed by #152
Closed

Add MSB3 to Variant Table #153

kyzer-davis opened this issue Sep 20, 2023 · 0 comments · Fixed by #152

Comments

@kyzer-davis
Copy link
Collaborator

kyzer-davis commented Sep 20, 2023

Split from #145, obviously this spec only cares about two-bits 1 and 0 but re-uses the table from RFC4122.
The final value of the "three bit variant" is don't care. thus 10x
However, the hex that gets converted is a 4 bit value. Thus later some text I wrote discussed the possible Hex values for the 10x variant. Which is really 10xx

I was reviewing the comment from OPSDIR and trying to figure out how to call out this 4th "don't care bit"...

(2) p 14, sec 4.2.  Version Field

      Table 2: UUID variant 10x versions defined by this specification
   An example version/variant layout for UUIDv4 follows the table where
   M represents the version placement for the hexadecimal representation
   of 0x4 (0b0100) and the N represents the variant placement for one of
   the four possible hexadecimal representation of variant 10x: 0x8
   (0b1000), 0x9 (0b1001), 0xA (0b1010), 0xB (0b1011)

Table 1 only defines 3 bits and doesn't obviously mention a 4th bit, and yet
the examples below are displaying 4 bits, where I assume that the 4th bit is
effectively arbitrary data in the UUID definition.  Please consider whether it
would be helpful to clarify this.

My solution

  • Add another don't care bit to the table in MSB3 position (and call out the possible hex Values in a column as well.)
    • As far as I can see this wouldn't cause any problems as it does not change any values.

Thus:

{{table1}} lists the contents of the variant field, where the letter "x" indicates a "don't-care" value.

| Msb0 | Msb1 | Msb2 | Msb3 | Hex     |Description                                                                    |
|    0 |    x | x    | x    | 1-7     |Reserved, NCS backward compatibility and includes Nil UUID as per {{niluuid}}. |
|    1 |    0 | x    | x    | 8-9,A-B |The variant specified in this document.                                        |
|    1 |    1 | 0    | x    | C-D     |Reserved, Microsoft Corporation backward compatibility.                        |
|    1 |    1 | 1    | x    | E-F     |Reserved for future definition and includes Max UUID as per {{maxuuid}}.       |
kyzer-davis added a commit that referenced this issue Sep 22, 2023
@kyzer-davis kyzer-davis linked a pull request Sep 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant