Thread: Multiple or operator usages

  1. #1
    Registered User
    Join Date
    Mar 2011
    Location
    India ,Kerala
    Posts
    37

    Multiple or operator usages

    Hello i want to know it works
    LCDPORT = ((c >> 4) & 0x0f) | EN | RS;

    c is 8bit
    RS and EN is a single bit
    please anyone help me with some example thanks

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Read up on bitwise operations. I believe we have a tutorial or FAQ answer concerning that on cprogramming.com
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Mar 2011
    Location
    India ,Kerala
    Posts
    37
    can i get that link ?

  4. #4
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 12-09-2008, 11:19 AM
  2. Replies: 1
    Last Post: 07-07-2008, 03:38 AM
  3. Add multiple data in a std::set using +=operator
    By IndioDoido in forum C++ Programming
    Replies: 14
    Last Post: 11-01-2007, 11:19 AM
  4. Usages of const keyword
    By @nthony in forum C Programming
    Replies: 2
    Last Post: 09-16-2007, 11:45 PM
  5. Replies: 1
    Last Post: 05-01-2003, 02:52 PM