reverse all the bits in a unsigned integer

Discussion in 'C++' started by hijkl, Mar 22, 2007.

  1. hijkl

    hijkl Guest

    .. How to reverse all the bits in a unsigned integer? an signed
    integer (you have to keep the sign of the integer)?
    hijkl, Mar 22, 2007
    #1
    1. Advertising

  2. * hijkl:
    > . How to reverse all the bits in a unsigned integer? an signed
    > integer (you have to keep the sign of the integer)?


    Check out the FAQ's solutions to homework problems.

    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is it such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet and in e-mail?
    Alf P. Steinbach, Mar 22, 2007
    #2
    1. Advertising

  3. hijkl

    hijkl Guest

    On Mar 21, 7:06 pm, "Alf P. Steinbach" <> wrote:
    > * hijkl:
    >
    > > . How to reverse all the bits in a unsigned integer? an signed
    > > integer (you have to keep the sign of the integer)?

    >
    > Check out the FAQ's solutions to homework problems.
    >
    > --
    > A: Because it messes up the order in which people normally read text.
    > Q: Why is it such a bad thing?
    > A: Top-posting.
    > Q: What is the most annoying thing on usenet and in e-mail?


    Hi Alf,
    what is that?? i didnt get you :)
    hijkl, Mar 22, 2007
    #3
  4. hijkl

    Jim Langston Guest

    "hijkl" <> wrote in message
    news:...
    > On Mar 21, 7:06 pm, "Alf P. Steinbach" <> wrote:
    >> * hijkl:
    >>
    >> > . How to reverse all the bits in a unsigned integer? an signed
    >> > integer (you have to keep the sign of the integer)?

    >>
    >> Check out the FAQ's solutions to homework problems.

    >
    > Hi Alf,
    > what is that?? i didnt get you :)


    Alf is saying we won't do your homework for you. However, I will point you
    in the right direction. If you want to reverse the bits, look at xor
    (exclusive or).
    Jim Langston, Mar 22, 2007
    #4
  5. hijkl

    Sarath Guest

    On Mar 22, 11:01 am, "hijkl" <> wrote:
    > . How to reverse all the bits in a unsigned integer? an signed
    > integer (you have to keep the sign of the integer)?


    Learn yourself abuot bitwise operators. :)
    Sarath, Mar 22, 2007
    #5
  6. hijkl

    hijkl Guest

    On Mar 21, 7:33 pm, "Sarath" <> wrote:
    > On Mar 22, 11:01 am, "hijkl" <> wrote:
    >
    > > . How to reverse all the bits in a unsigned integer? an signed
    > > integer (you have to keep the sign of the integer)?

    >
    > Learn yourself abuot bitwise operators. :)


    hey guys
    this is not homework questions :) ..
    i was preparing for interview. i founf these questions on net :)
    here is a link
    http://www.aceemploymentservices.net/Articles/Interviewers/Microsoft Interview Questions.htm#think
    and some other links..
    i am done with studies guys
    ok have a fun
    hijkl, Mar 22, 2007
    #6
  7. On 22 Mar, 06:47, "hijkl" <> wrote:
    > On Mar 21, 7:33 pm, "Sarath" <> wrote:
    >
    > > On Mar 22, 11:01 am, "hijkl" <> wrote:

    >
    > > > . How to reverse all the bits in a unsigned integer? an signed
    > > > integer (you have to keep the sign of the integer)?

    >
    > > Learn yourself abuot bitwise operators. :)

    >
    > hey guys
    > this is not homework questions :) ..
    > i was preparing for interview. i founf these questions on net :)
    > here is a linkhttp://www.aceemploymentservices.net/Articles/Interviewers/Microsoft%...
    > and some other links..


    We define homework as anything where you want other people to solve or
    figure out simple things for you.

    --
    Erik Wikström
    =?iso-8859-1?q?Erik_Wikstr=F6m?=, Mar 22, 2007
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sarmin kho
    Replies:
    2
    Views:
    823
    A. Lloyd Flanagan
    Jun 15, 2004
  2. Miki Tebeka
    Replies:
    1
    Views:
    443
    Marcin 'Qrczak' Kowalczyk
    Jun 14, 2004
  3. Replies:
    14
    Views:
    2,090
    CBFalconer
    Jun 18, 2005
  4. Replies:
    6
    Views:
    582
    Alan Franzoni
    Jul 28, 2008
  5. pozz
    Replies:
    12
    Views:
    732
    Tim Rentsch
    Mar 20, 2011
Loading...

Share This Page