HELP!what is the meaning of "&" ???

This is a discussion on HELP!what is the meaning of "&" ??? within the C Programming forums, part of the General Programming Boards category; Hi, can somebody explain to me what is the meaning of the syntax below? what is actually meant by n&0xff ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    2

    HELP!what is the meaning of "&" ???

    Hi, can somebody explain to me what is the meaning of the syntax below? what is actually meant by n&0xff and n>>8. Need the explanation for the & and >>.Thanks!

    case 'u': // get last micro volumes
    n=e_get_micro_volume(0);
    buffer[i++]=n&0xff;
    buffer[i++]=n>>8;

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    >> = bitwise shift right by 8 bits
    & = bitwise and

    Both are described in http://www.cprogramming.com/tutorial...operators.html

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    2
    Thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. what is the meaning of "offset"
    By cromologic in forum C Programming
    Replies: 5
    Last Post: 05-02-2008, 09:09 AM
  2. The Meaning of Life: A Trick Question?
    By chix/w/guns in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 07-12-2004, 07:53 PM
  3. Replies: 8
    Last Post: 04-11-2003, 07:37 AM
  4. The meaning of "Duh"
    By Magos in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 02-26-2003, 12:46 PM
  5. would you help me with Linked list, please?
    By unhwan in forum C Programming
    Replies: 1
    Last Post: 06-11-2002, 12:24 AM

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