This is the reward for yourself!Retro-modern “things of the week”
If you write the contents roughly
Limited to 300 pieces, with a serial number engraved on the back of the case.
A gorgeous cruise collection inspired by the movie "Mermaids in Love" has arrived.'60, which is also the stage of the movie ... → Continue reading
"Anan" has always created the "era", transmitted the "topics", and created the "trend" of women.
The web version of "anan" such as "ananweb" is aimed at women in the late 20's to 40's with great curiosity. We deliver "real".
Wikipedia related words
If there is no explanation, there is no corresponding item on Wikipedia.
Not all numeric identifiers are serial numbers, and as an example of a non-serial identification number, the number has no information other than identification. nominal number(Nominal valueIrrelevant).
Serial numbers can start with any number and evendifferenceYou can increase or decrease by minutes (however, you cannot change the difference on the way). But usually it increments from 1 or 0 by 1 to the total number or total number minus 1 and exceeds the total numberNegative numberNever become.
Typical usage is expanded, large objectssetNot only the numerical value or character string that identifies the origin ofInformation engineeringInData processingIt has come to be used for identification in.
Serial number example
- Serial number isquality managementWhen a defect is found in the product manufactured in a certain period, the defective product group can be quickly identified by the serial number. Also,theftThe serial number is also effective for security and forgery, making it easy to find stolen or counterfeit products (Serial numberreference).
- Like Japan,billSome countries have unique serial numbers, which areCounterfeit billIt is also used for tracking.
- Prefecture codeIs 47PrefecturesIs assigned a serial code from 01 to 47 from northeast to southwest.
- Asteroid numberIs the first小 惑星CeresIt is a fixed number starting from No. 1.
- ComputersoftwareProduct specificLicense keyA number is assigned and you are often prompted to enter that number during installation. This is commonly called a "serial", but to prevent use with a forged numberRedundancyIt's not serial because it has. If it is serial, the random number will be a valid number issued for any license (unless the total number of licenses is exceeded).
- magazineFor periodicals such asISSNThe ISSN 5th digit to 7th digit is serial to domestic magazines, but not ISSN as a whole.BookToISBNIs given, the "book title symbol" is serial to the book of the publisher but not many publishers depending on the publisher, and the entire ISBN is not serial either.
- CryptographyFor widespread use ofCertificate AuthorityIs required. Issued by a certificate authorityPublic keyIs applied to the sequence number arithmetic described later, but is not a serial number.
Estimate total number from serial number
If some product has a serial number starting from 1 (if it does not start 1 but it is known, it can be converted to a serial number starting from 1 by adding or subtracting a constant),n The total number can be estimated by taking one sample.
Sequence number arithmetic
Serial number isCommunication protocolIt is often used in and is called a sequence number. This is essential to establish the order of the packets. However, the number of bits assigned to the sequence number is fixed, and once the sequence is completed, the number is reused from the beginning. Thus, the most recently assigned serial number and the long ago assigned serial number are the same. In order to prevent such problems due to sequence number ambiguity,RFC 1982(Serial Number Arithmetic) defines special rules for calculations involving this type of serial number.
Some protocols ignore the problem and simply use a large integer as the serial number and assume that the technology will be obsolete before the problem occurs (2000 issuereference).
Sequence number operation
Where the sequence number has a small positiveIntegerAddition and comparison of sequence numbers are explained. Only the unsigned implementation is dealt with and the number of bits is represented by "SERIAL_BITS" as in RFC.
To add an integer to a sequence number, simply add an unsigned integer and then perform an unsigned remainder operation to keep the addition result within the range (generally,CPUThe unsigned add instruction automatically performs such an operation).
s'= (s + n) modulo (2 ^ SERIAL_BITS)
The addition of values outside the range below is undefined.
[0 .. (2 ^(SERIAL_BITS-1)-1)]
Basically, if the addition result is outside this range, "rounding" occurs, and as a result, the sequence number becomes smaller than the original value.
The method of comparing two sequence numbers i2 and i1 (an unsigned integer representation of sequence numbers s2 and s1) is shown below.
Comparing for equality is no different from comparing ordinary numbers. The magnitude comparison algorithm is complicated, and one has to judge that a “rounded” small value is actually a large value in consideration of the case where one of the sequence numbers is near the limit of the range of values. That is, s1 is considered less than s2 if:
(i1 <i2 and i2 --i1 <2 ^ (SERIAL_BITS --1)) or (i1> i2 and i1 --i2> 2 ^ (SERIAL_BITS --1))
Similarly, s1 is considered greater than s2 if:
(i1 <i2 and i2 --i1> 2 ^ (SERIAL_BITS --1)) or (i1> i2 and i1 --i2 <2 ^ (SERIAL_BITS --1))
There are some problems with this algorithm. First, depending on the numerical value, the magnitude comparison result is not defined. Since implementation of the algorithm is carried out independently by various organizations, it is almost impossible to prevent such problems from occurring.
RFC 1982 Then write:
It is possible to define magnitude comparisons so that this problem does not occur for any combination of values, but such a definition would be a burden to implement on the device and would be difficult to understand. Also, the meaning of the following cases is difficult to understand intuitively.
s1 <s2 and (s1 + 1)> (s2 + 1)
Therefore, the problematic case is undefined, and the implementation may return some result or may return an error, and the user must be careful to handle either case. Normally this would result in no such combination of values.
- William W. Plummer, "Sequence Number Arithmetic" BB & N Inc, September 1978.
- R. Elz and R. Bush, RFC 1982, "Serial Number Arithmetic" Network Working Group, August 1996