Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

Bit handling

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sam Johnson - 01 May 2004 18:36 GMT
Hi

I've got the following problem: I have a 16bit integer, and I want to get the value, that is represented by the last 13 bits, like that

XXX?????????????    //I'm interested in all that is covered by '?

Additionally, I need to convert this value to integer. For all that, I wrote the following macro, but I'm not sure if it's working properly, so please have a look

#define OFFSET(offset) (offset & 0x1fff

This one should give me these 13 bits, correct

Thanks a lo
Sam
mccoyn - 02 May 2004 00:06 GMT
Looks right to me.
saleem ullah khan - 03 May 2004 22:42 GMT
the macro seems to be correct for getting the final 13bit number,

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.