However, if you wana just toggle a single bit (say n'th bit) , then instead of FFFF, use a value equivalent to 2^n (2 to the power n) and do the XOR operation exactly similar to the above code.
Let me know, if you need any specific question. You still need to explore yourself a lot by writing simple codes doing such bitwise operation to get more clarity.
Last edited by Praveen_218; 06-22-2010 at 02:05 PM..
Reason: Typo mistake corrections and some minor additions ...
This User Gave Thanks to Praveen_218 For This Post:
Hello everyone.
I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Hi,
Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result.
perl interpreter info,
perl, v5.8.8 built for... (0 Replies)
I am trying to figure out a one liner to toggle a flag variable. eg.
FLAG=0
Is there a way to use sed to toggle above example between 0 and 1. That is if run with flag set to zero it would change it to one if run again it would set it to zero.
I thought I had it figured but the... (6 Replies)
Hi,
I need help to toggle through dates on a weekly basis to be fed into a script as inputs. The format should be: yyyy/mm/dd (start) yyyy/mm/dd (end), where end date is 7 days increments.
The date (start) would be input as an ARGV and would continue until current date.
I can check... (2 Replies)
Hi all,
I have been using Ubuntu for 2 years now, and a few days ago I bought a Macbook. This is my first time using a Mac, so I have spent the better of two days learning the user interface, and configuring my Macbook. One thing I noticed is that there is no easy way to turn on and off hidden... (0 Replies)