arithmatic vs logical shift operation

This is a discussion on arithmatic vs logical shift operation within the C Programming forums, part of the General Programming Boards category; Hi Whenever we do the shift operation (left or right) how can we know that the shift operation is an ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    25

    arithmatic vs logical shift operation

    Hi

    Whenever we do the shift operation (left or right) how can we know
    that the shift operation is an arithmetic or logical shift operation?

    Can someone tell me about any url where I can get examples on bit operations


    thanks & regards
    Onebrother

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    > Can someone tell me about any url where I can get examples on bit operations
    http://www.cprogramming.com/tutorial...operators.html -- On this very site.

  3. #3
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,484
    And here is http://en.wikipedia.org/wiki/Logical_shift wiki with special note about C

    as a conclusion - do not use bitshifting on signed numbers to avoid undefined behaviours
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 12-04-2008, 08:15 PM
  2. still problems with ceasar shift
    By trevordunstan in forum C Programming
    Replies: 2
    Last Post: 09-14-2008, 02:49 AM
  3. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  4. logical operation functions in c; And, Or, Xor, Not etc..
    By Jasonx521 in forum C Programming
    Replies: 6
    Last Post: 10-03-2006, 01:24 AM
  5. Logical Operation Sequence ?!?
    By Halo in forum C Programming
    Replies: 2
    Last Post: 04-16-2002, 01:49 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21