Calculate CheckSum: Solve w/o Calculator

  • Thread starter Thread starter trollcast
  • Start date Start date
  • Tags Tags
    Sum
Click For Summary

Discussion Overview

The discussion revolves around calculating a checksum for a set of three bytes without using a calculator. Participants explore different methods of carrying during the addition process and their implications on the final result.

Discussion Character

  • Homework-related, Debate/contested, Technical explanation

Main Points Raised

  • One participant presents their calculation of the checksum and notes discrepancies in the carries compared to the provided solution.
  • Some participants indicate that there are multiple implementations of checksum calculations and emphasize the need to clarify what is meant by checksum in this context.
  • Another participant describes checksum as the sum of all bytes with overflow ignored, maintaining the same size as the original bytes.
  • It is noted that the solution's method of carrying differs from the participant's method, with one method carrying to the N+2 column instead of the N+1 column for certain sums.
  • Some participants suggest that both methods of carrying are valid and encourage seeking additional marks for the assignment.
  • A later reply questions whether one method is more correct than the other or if both should be acceptable.
  • Another participant suggests using the method that yields the highest score with the least argument, noting that their method may be quicker and less error-prone for larger sets of bytes.

Areas of Agreement / Disagreement

Participants express differing views on the methods of carrying in checksum calculations, with no consensus on which method is more correct or preferable. The discussion remains unresolved regarding the acceptance of either method.

Contextual Notes

Participants have not fully defined the checksum implementation being used, and there are unresolved aspects regarding the handling of carries in the 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.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
7
Views
2K
Replies
24
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K