ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Talk:Longitudinal redundancy check - Wikipedia, the free encyclopedia

Talk:Longitudinal redundancy check

From Wikipedia, the free encyclopedia

[edit] Is the alogrythm correct on this page?

I think it should be (based upon http://www.automatas.org/modbus/crc7.html)

  lrc=0x00
  
  foreach char in string
  do
     lrc = 0xFF & (lrc + char)
  done
  
  lrc = 0xFF - lrc + 0xFF


Good question. Alas, there seems to be some confusion in terminology -- 2 groups of people using the same term "longitudinal redundancy check" to mean 2 slightly different things. Both groups agree that one starts with a long sequence of bytes, and from them generates a byte that is (typically) appended to the end of the transmission.

Arithmetic sum of all bytes (keeping only the least-significant byte):

XOR of all bytes:

  • The people who form a 2D grid of bits, and do both transverse redundancy check and longitudinal redundancy check, so they can *correct* single-bit errors (and some 2-bit errors). (At least, I understand how this works with XOR -- I don't understand how it is possible to do this with arithmetic sum).
  • the Perl String-LRC "The Longitudinal Redundancy Check (LRC) is a one byte character, commonly used ... in STX-ETX bounded strings sent in financial protocols." Uses XOR (here spelled "^").
  • tech encylopedia: LRC "LRC (Longitudinal Redundancy Check) An error checking method that generates a parity bit from a specified string of bits on a longitudinal track. In a row and column format, such as on magnetic tape, LRC is often used with VRC, which creates a parity bit for each character."
  • [1] "Longitudinal Redundancy Check (LRC) is an error checking method that generates a parity bit from a specified string of bits on a longitudinal track. In a row and column format, such as on magnetic tape, LRC is often used with VRC, which creates a parity bit for each character."

Ambiguous:

  • our Modbus article mentions that "the ASCII format uses a longitudinal redundancy check checksum", but doesn't give any details as to whether this is "arithmetic" or "XOR".
  • "BasicCard 101(Part 1): Program Your First Smartcard " "the ISO/IEC 7816-3 standard. ... protocol includes longitudinal redundancy check (LRC) error checking."

Something completely different:

  • United States Patent 6832315, [2] "Multiply N by a numerical factor, in the present example the integer 19. This factor is known as the longitudinal redundancy check factor, or LRC. "

I wish most of these references leaned one way or the other. Then I could take the most common one and call it correct, and ignore the minority as a simple misunderstanding.

Does the NPOV policy require us to document both of the 2 common kinds of LRC? And then, to avoid confusion, update every article that refers to LRC to specify which kind of LRC is intended? --68.0.120.35 19:55, 6 April 2007 (UTC)

My theory is that the XOR algorithm is the 'true' algorithm. XOR is used to generate information to recover from data lost; see Standard_RAID_levels#RAID_5_parity_handling for example. On the other hand, the 2's complement summation, equivalent to repeated subtraction, is given as the simplest and extremely weak example on the Checksum article. I think this is a result of one, a Modicon documentation error, and two, widespread use of the Modbus protocol based upon said documentation. I recommend adding a sub section to this article to cover the Modbus version, and any history / explanation on the confusion. --Eet 1024 00:00, 30 August 2007 (UTC)
I have thought about it some more. When used on a 2D array of data, horizontally and vertically, either algorithm will allow you to 1, identify a corrupt byte, and if it's the only corrupt byte in either the column or row, easily correct it. If there are other corrupt data in same row and column, you might be able to use Algorithmics of sudoku to correct the errors. --Eet 1024 16:31, 30 August 2007 (UTC)


What is the "true" algorithm for LRC? The XOR one? You were talking about a different variation of LRC using arithmetic sum, wouldn't that be called LRC-Modbus or something? --Polarina (talk) 15:07, 31 December 2007 (UTC)

Both, IMO. Either can be used to catch some classes of errors in a 1 dimensional sting of bytes. Either can be combined with TRC to correct multiple errors. I don't know which one provides more information; I suspect both are equal for 2D. --Eet 1024 (talk) 01:16, 26 January 2008 (UTC)

[edit] Removal of the Java implementation

I'm removing the Java implementation from this article for numerous of reasons. A pseudo-code of the algorithm is already provided, the algorithm is trivial for software implementation and because the implementation is original research. --Polarina (talk) 13:45, 28 March 2008 (UTC)


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -