C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !






Bitwise logical AND


Posted Date: 28 May 2008    Resource Type: Articles    Category: General
Author: Kapil DhawanMember Level: Gold    
Rating: Points: 3



Hi all,

here is the example of using Bitwise Logical AND

Performs a bitwise logical AND operation between two integer values.

Syntax for using this is:
1st Statement & 2nd Statement

for example use this query in Sql server
select 50 & 60
you will get the result as 48


These Statements will be of Integer, bit, binary and varbinary data types. Statements will be used as binary number for the bitwise operation.

If the left and right statements have different integer data types, lets assume the left statement is smallint and the right statement is int, the argument of the smaller data type is converted to the larger data type. In this case, the smallint statement is converted to an int.

The binary representation of 50 is 0011 0010. The binary representation of 60 is 0011 1100. Performing the bitwise AND operation on these two values produces the binary result 0011 0000, which is decimal 48.
0011 0010
0011 1100
0011 0000 this is equal to 48

Note: while using "&"
0+0=0,
0+1=0,
1+1=1


i am writing an article "Binary Represenation" too to get the binary code also.
happy coding




Responses

Author: thebarrett27    12 Jun 2008Member Level: Bronze   Points : 0
nice article


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Benefits of using MOSS 2007
Previous Resource: Decimal and Hexadecimal Representation
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use