1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Calculate check sum

  1. Jun 1, 2013 #1

    trollcast

    User Avatar
    Gold Member

    1. The problem statement, all variables and given/known data
    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{------------}##

    2. Relevant equations

    3. 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##
     
  2. jcsd
  3. Jun 1, 2013 #2

    rcgldr

    User Avatar
    Homework Helper

    There are multiple implementations for checksum. You need to specify what checksum means for this problem.
     
  4. Jun 1, 2013 #3

    trollcast

    User Avatar
    Gold Member

    Checksum is simply the sum of all the bytes with any overflow ignored so the checksum is the same size as the original bytes.
     
  5. Jun 2, 2013 #4

    lewando

    User Avatar
    Gold Member

    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!
     
  6. Jun 2, 2013 #5

    trollcast

    User Avatar
    Gold Member

    That makes sense now.

    Is that method more correct or should either be acceptable?
     
  7. Jun 2, 2013 #6

    lewando

    User Avatar
    Gold Member

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted