diff --git a/docs/standard/base-types/standard-numeric-format-strings.md b/docs/standard/base-types/standard-numeric-format-strings.md index 2d88f76072324..d8ab53813c07e 100644 --- a/docs/standard/base-types/standard-numeric-format-strings.md +++ b/docs/standard/base-types/standard-numeric-format-strings.md @@ -98,6 +98,9 @@ The binary ("B") format specifier converts a number to a string of binary digits The precision specifier indicates the minimum number of digits desired in the resulting string. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier. +For , positive values always have a leading zero to distinguish them from negative values. This ensures the output round-trips to the original value when parsed. +For instance, the number `3` converted with the format specifier `"B2"` is `011` because the binary number `11` represents the negative value `-1`. + The result string is not affected by the formatting information of the current object. @@ -309,6 +312,9 @@ The hexadecimal ("X") format specifier converts a number to a string of hexadeci The precision specifier indicates the minimum number of digits desired in the resulting string. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier. +For , positive values always have a leading zero to distinguish them from negative values. This ensures the output round-trips to the original value when parsed. +For instance, the number `F` converted with the format specifier `"X1"` is `0F` because the hexadecimal number `F` represents the negative value `-1`. + The result string is not affected by the formatting information of the current object. The following example formats values with the hexadecimal format specifier.