Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/11/07 07:22
Read: times


 
#143089 - write down the bits
Responding to: ???'s previous message
Russ,

this is a classical example of "paper-and-pencil-ware".
So, take a sheet of paper and a pencil... :-)

Write down the bits of CRC (say c15..c0) and the input byte (say, b7..b0). Now, start to do the CRC manually, bitwise, observing where the individual bits go. You will find out, that within the first 4 bits, the bits won't get mixed too much, and in fact only the high nibble of the original CRC xored with high nibble of the input byte is xored into CRC shifted left by that nible, into 3 positions (this comes from the fact that the 3 nonzero bits in the 1021 poly are sufficently far from each other, and the highest nonzero bit is sufficiently far from the "overflow" end).

Now try to write down the same in nibbles form; and do it for both nibbles. You will then see how the algo works...

Have fun!

Jan



List of 32 messages in thread
TopicAuthorDate
CRC16 CCITT - What a challenge!            01/01/70 00:00      
   Have you seen this?            01/01/70 00:00      
      Of course!            01/01/70 00:00      
         Balance            01/01/70 00:00      
            I know, Russ,            01/01/70 00:00      
         Code? What code?            01/01/70 00:00      
            in the code library - look to the left column            01/01/70 00:00      
               Thanks! I missed that note in the first post.            01/01/70 00:00      
   I need a hint            01/01/70 00:00      
      write down the bits            01/01/70 00:00      
         Thanks for the hint            01/01/70 00:00      
            Your observations plus a comparison in C            01/01/70 00:00      
               The rest of the story ...            01/01/70 00:00      
                  Compilers, but Keil C51 8.09 for the stated 28~            01/01/70 00:00      
                  and this processes only a nibble, isn't it...            01/01/70 00:00      
                     No, it process the entire byte.            01/01/70 00:00      
                        now it\'s my pencil time...            01/01/70 00:00      
                           FYFI            01/01/70 00:00      
                              Clarification re: 8-bit optimized term            01/01/70 00:00      
                              on optimisation            01/01/70 00:00      
                                 Jan's optimization            01/01/70 00:00      
                                    Re: on optimization            01/01/70 00:00      
                                       Can you please be more specific?            01/01/70 00:00      
                                          More specifically ...            01/01/70 00:00      
            and what            01/01/70 00:00      
               More on checksums            01/01/70 00:00      
   No reason to hide the excreted code            01/01/70 00:00      
      Excreted code needs context like any other code            01/01/70 00:00      
   One More Comment            01/01/70 00:00      
      ... and a marginal remark ...            01/01/70 00:00      
         Init all ones frequently specified            01/01/70 00:00      
   18 cycles            01/01/70 00:00      

Back to Subject List