The CRC is initialised to FFFF. It is updated byte by byte and uses the CCITT-CRC16 algorithm. It is written to the track high byte and then low byte.
===Syncing& Address Mark ===
In order The sync is 12 bytes of 0 which are used to read prime and synchronize the data correctly and to ensure separator with the data bits and clock bits are in the expected order a specific bit pattern is used for syncing. This bit pattern is specific to the format used by 0 encodes as AAAA. The address mark itself effectively syncs the FDCwith the data marking where the expected data structures start.
When this pattern is recognised then all data following is synced and will always read the same.
This special value used by the NEC765 is 4489 and has the following properties.
* 4489 is an encoded version of the data byte A1 and has bit 7 set. It doesn't matter what the value of the previous byte is, the first clock of 4489 will always be 0. Therefore the pattern 4489 can't be influenced by data around it.
* To make the value special, it has a "missing clock". What this means is that one of cell which encodes the clocks is forced to 0clock and data bit has no clock. The equivalent A1 byte encoded to MFM without the missing clock is different, therefore it is unique.