Tutorial needed that will tell me what ">>>" means

Discussion in 'JavaScript' started by offthedome, Jul 1, 2010.

  1. #1
    I have a javascript where ">>>", ">>", and "<<" appear in the code. I don't know what these mean. I can't find a tutorial that will explain it to me. Anyone know of one? Or knows what they mean?
     
    offthedome, Jul 1, 2010 IP
  2. offthedome

    offthedome Active Member

    Messages:
    446
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    95
    #2
    I found wikipedia.... From the wording of the article, I still can't tell the difference between ">>>" and ">>" in the case of negative numbers.

    Now I also have "|=". What does this mean? like in b[length >> 4] |= 0x80 << ((length) % 32);
     
    offthedome, Jul 1, 2010 IP
  3. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
  4. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #4
    Those are bitwise operators. Left shift (<<) causes the left-most bits to disappear, the resulting number is padded with trailing zeros. Right shift (>>) also causes the right-most bits to disappear, resulting number is padded with the sign of the number. Just research it yourself (google) if you want to learn more about it
     
    Rainulf, Jul 3, 2010 IP