Results 1 to 10 of 10

Thread: bit operations

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member voidflux's Avatar
    Join Date
    Jun 2003
    Location
    Brockway, PA
    Posts
    290

    Resolved bit operations

    Hello everyone, anyone know how to produce a 32 bit integer from a 16 bit short number?

    Like say I have,

    16-bit short number whose value is equal to -24001. How would i convert this short number to an int k, so that the output of k is equal to 41535.

    This is the first time I ever messed with bit shifting, so i'm not sure how this is suppose to look. I know I can use & to change the 1's to 0's. But other then that i'm pretty confused.


    Thanks for listening!
    Last edited by Dilenger4; Oct 7th, 2004 at 05:08 PM.
    C¤ry Sanchez
    Computer Science/Engineering
    @ Penn State
    IBM.zSeries Intern
    Mandriva 2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width