Calculate CheckSum: Solve w/o Calculator

  • Thread starter Thread starter trollcast
  • Start date Start date
  • Tags Tags
    Sum
AI Thread Summary
The discussion revolves around calculating the checksum for three bytes without a calculator, highlighting discrepancies in carry methods between different solutions. One participant notes their answer aligns with the expected checksum but differs in the way carries are represented, resulting in a lower score. It is clarified that there are multiple implementations of checksum calculations, and both methods can be valid depending on the context. The conversation emphasizes the importance of using the method that maximizes scoring potential while minimizing disputes. Ultimately, understanding the variations in carry representation is crucial for accurate checksum calculations.
trollcast
Gold Member
Messages
282
Reaction score
13

Homework Statement


Calculate the checksum for the following 3 bytes, showing all working without the use of a calculator:

##\displaystyle 01101101 ##
##\displaystyle 00100111 ##
##\displaystyle 00101101 ##
##\displaystyle \text{------------}##

##\displaystyle \text{------------}##

Homework Equations



The Attempt at a Solution



I'm getting the correct answer but my carries are different to the solutions so I'd only 1 mark out of 3:

My answer [I'm putting the carries below the answer line in decimal so you can see them easier]:


##\displaystyle 01101101 ##
##\displaystyle 00100111 ##
##\displaystyle 00101101 ##
##\displaystyle \text{------------}##
##\displaystyle 11000001##
##\displaystyle \text{------------}##
##\displaystyle 1212211##


The solutions answer:

##\displaystyle 01101101 ##
##\displaystyle 00100111 ##
##\displaystyle 00101101 ##
##\displaystyle \text{------------}##
##\displaystyle 11000001##
##\displaystyle \text{------------}##
##\displaystyle 1012011##
 
Physics news on Phys.org
There are multiple implementations for checksum. You need to specify what checksum means for this problem.
 
rcgldr said:
There are multiple implementations for checksum. You need to specify what checksum means for this problem.

Checksum is simply the sum of all the bytes with any overflow ignored so the checksum is the same size as the original bytes.
 
It looks like the solution's method uses a different way of carrying. For example, if the sum for column N equals 4, rather than carrying a 2 to the N+1 column, a 1 is carried to the N+2 column. Both your method and the solution's method work. Now go and grub for those extra marks!
 
lewando said:
It looks like the solution's method uses a different way of carrying. For example, if the sum for column N equals 4, rather than carrying a 2 to the N+1 column, a 1 is carried to the N+2 column. Both your method and the solution's method work. Now go and grub for those extra marks!

That makes sense now.

Is that method more correct or should either be acceptable?
 
Use the one that earns you the highest score with the least amount of argument, I suppose. If you were to add a much larger set of bytes, your method of representing the carry using a single decimal value seems quicker and less error prone.
 
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...
Back
Top