Bit shifts and endianness

Discussion in 'C Programming' started by gamehack, Jan 5, 2006.

  1. gamehack

    Chuck F. Guest

    No, the add operation is independent of base, in that the value of
    the result is base independent. The base is only a convenience
    used in representing values and mechanizing operations such as add.

    For example, if you represent five as a five inch stick, and three
    as a three inch stick, you can perform the add operation by laying
    the two sticks in line together. No base is involved.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
    More details at: <http://cfaj.freeshell.org/google/>
     
    Chuck F., Jan 9, 2006
    #61
    1. Advertisements

  2. gamehack

    Jordan Abel Guest

    Arguably that is in a form of unary, with the digit 1 being an inch
    length of stick.

    11111
    + 111
    =11111111
     
    Jordan Abel, Jan 9, 2006
    #62
    1. Advertisements

  3. gamehack

    Jordan Abel Guest

    OK, I went too far with this one. Just took a step back and realized how
    ridiculous this argument has become. I think we should just agree to
    disagree, and forget this whole thing [until the next time it comes up]
     
    Jordan Abel, Jan 9, 2006
    #63
  4. gamehack

    Chuck F. Guest

    .... 10 identical copies within 10 minutes ...

    This is happening all over, from people who apparently have at
    least some clues. I think usenet has been googled once more. I
    don't know if it is their interface, encouraging people to send and
    resend by failing to react, or what.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
    More details at: <http://cfaj.freeshell.org/google/>
     
    Chuck F., Jan 9, 2006
    #64
  5. gamehack

    Eric Sosman Guest

    10 + 010 + 0x10 = XXXIV
     
    Eric Sosman, Jan 9, 2006
    #65
  6. gamehack

    Flash Gordon Guest

    Someone in another group reported getting an error on trying to send, so
    reposted. Both copies came through. I can see why this would cause
    people to make multiple posts.
     
    Flash Gordon, Jan 9, 2006
    #66
  7. gamehack

    Nelu Guest

    It happend to me too. I posted a message on google groups
    about a week ago and it came in yesterday.
     
    Nelu, Jan 9, 2006
    #67
  8. Though not with the representation mensanator suggested, as the
    standard requires a pure binary representation (C99 6.2.6.2).
     
    Michael Wojcik, Jan 9, 2006
    #68
  9. For some definitions of "add". I'm not a mathematician, but I know of
    at least three definitions of "add" which don't follow that rule, and
    one of them is in every day usage by millions of children.
    The *value* of the result is base-independent, but its representation
    isn't. For instance, using a common definition of add, 11+11=11=6+1,
    provided the bases of each number are appropriately chosen
    Note that this contradicts your above assertion. :)
    You're working in base "inch".

    Its actually kinda hard to provide any non-thought number experiments
    that fail to use some base.

    Mark McIntyre
     
    Mark McIntyre, Jan 9, 2006
    #69
  10. Hmmm? Which bases would that be?

    11+11 is going to be an even number
    no matter what base is involved (since it is "two times" whatever "11"
    represents in that base).

    11 could be either even or odd, depending on whether the base was odd
    or even. [*]

    6+1 is, though, going to be odd no matter which base > 6 is chosen. [*]

    So, 11+11 in one base could potentially be a different base's 11,
    but 11+11 in one base cannot be a different base's 6+1. [*]


    [*] provided, that is, that:
    '+' is integral addition,
    '1' represents unity,
    '6' represents successor(successor(successor(successor(successor(unity)))))
    '=' represents an assertion of equality of integral value

    If you've remapped '6' as the glyph of, say, successor(successor(unity))
    then we will remap words such as "value" and "representation" and "base"
    and -define- you to be wrong ;-)
     
    Walter Roberson, Jan 9, 2006
    #70
  11. On Mon, 9 Jan 2006 22:36:37 +0000 (UTC), in comp.lang.c ,
    two, three, six and ten.
    Ya reckon?

    Note that the post was made in response to remarks concerning how
    unimportant bases were to teh "add" operation and which had an
    example.
    Mark McIntyre
     
    Mark McIntyre, Jan 9, 2006
    #71
  12. Mark McIntyre said:
    That's irrelevant, but I'm done arguing. I don't see how I can make myself
    any clearer than I already have. If you're not persuaded, c'est la vie.
     
    Richard Heathfield, Jan 10, 2006
    #72
  13. I have long objected to (soi-disant) 'normal' people who accuse
    programmers (such as myself) of being strange or weird.

    I may have to reconsider. :)

    - David.Thompson1 at worldnet.att.net
     
    Dave Thompson, Jan 11, 2006
    #73
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.