title: How to do 8 bit modulo 256 to obtain checksum?
body: <p>I'm doing a checksum program and I already have a sample answer but cannot get the proper answer. The program is supposed to calculate a checksum of a file. Here is the way I understand how to calculate the checksum.</p>
  
  <p>File has 11 chars 10 A's and a newline. To my understanding I have to add all the bytes in the array which is 11 bytes. Do 11 % 256, then 256-(11 % 256). That would equal 245.</p>
  
  <p>The answer is supposed to be 294 hex stripped is 94. Where am I going wrong?</p>
  
  <p>Check out this answer
  <a href="https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/" rel="nofollow noreferrer">https://www.scadacore.com/tools/programming-calculators/online-checksum-calculator/</a></p>