Results 1 to 4 of 4

Thread: Bit shifting

  1. #1

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950

    Bit shifting

    How would I accomplish bit shifting in VB?

    Something like

    char i = 16;

    cout << (i >> 1); - 8
    cout << (i << 1); - 32

    Thanks,
    Don't anthropomorphize computers -- they hate it

  2. #2
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Times by two or divide by two.

  3. #3

    Thread Starter
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    Doh, makes sense. he he he.

    Thanks,
    Don't anthropomorphize computers -- they hate it

  4. #4
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    There can be a problem with it overflowing though.

    Heh.

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