Facebook Page
Twitter
RSS
+ Reply to Thread
Results 1 to 3 of 3
  1. MHB Craftsman

    Status
    Offline
    Join Date
    Jan 2014
    Posts
    236
    Thanks
    133 times
    Thanked
    41 times
    #1
    1234567 ^ 7 ^ ~~1234567

    5 & (12345678 ^ ~~ 12345678)

    My prof said there is an easy way to solve these as there is a trick to it. Does anyone know what trick is being referred to?

  2. MHB Journeyman
    MHB Site Helper
    MHB Math Helper
    Bacterius's Avatar
    Status
    Offline
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    643
    Thanks
    668 times
    Thanked
    1,585 time
    Thank/Post
    2.465
    Awards
    Chat Box Champion (Jan-June 2013)
    #2
    Quote Originally Posted by tmt View Post
    1234567 ^ 7 ^ ~~1234567

    5 & (12345678 ^ ~~ 12345678)

    My prof said there is an easy way to solve these as there is a trick to it. Does anyone know what trick is being referred to?
    The "tricks" here are just the basic properties of bitwise arithmetic, namely that ~~x is equivalent to x (negating a bit, and then negating it again, gives you back the original bit) and x ^ x is equivalent to 0 (look at the truth table for exclusive-or). Finally, ^ is commutative. Does that make it easier?

  3. MHB Seeker
    MHB Global Moderator
    MHB Math Scholar
    MHB Coder
    I like Serena's Avatar
    Status
    Online
    Join Date
    Mar 2012
    Location
    Netherlands
    Posts
    6,651
    Thanks
    4,429 times
    Thanked
    12,405 times
    Thank/Post
    1.865
    Awards
    MHB Model Helper Award (2016)  

MHB Best Ideas (2016)  

MHB LaTeX Award (2016)  

MHB Calculus Award (2014)  

MHB Discrete Mathematics Award (Jul-Dec 2013)
    #3
    Quote Originally Posted by Bacterius View Post
    Finally, ^ is commutative.
    Nitpicking. We also need that ^ is associative, which it is.

Similar Threads

  1. Bitwise arithmetic
    By tmt in forum Computer Science
    Replies: 4
    Last Post: December 7th, 2014, 15:13
  2. Arithmetic sequence
    By Albert in forum Challenge Questions and Puzzles
    Replies: 2
    Last Post: December 8th, 2013, 06:16
  3. Arithmetic Geometry
    By mathbalarka in forum Linear and Abstract Algebra
    Replies: 13
    Last Post: November 18th, 2013, 09:21
  4. Arithmetic sequence
    By wishmaster in forum Pre-Calculus
    Replies: 22
    Last Post: November 9th, 2013, 05:47
  5. arithmetic seq.
    By gotah in forum Pre-Algebra and Algebra
    Replies: 1
    Last Post: March 23rd, 2012, 13:05

Tags for this Thread

Posting Permissions

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