PlanetMath (more info)
 Math for the people, by the people. Sponsor PlanetMath
Encyclopedia | Requests | Forums | Docs | Wiki | Random | RSS  
Login
create new user
name:
pass:
forget your password?
Main Menu
Owner confidence rating: High Entry average rating: No information on entry rating
bitwise AND (Definition)

Bitwise AND is a bit-level operation on two binary values which indicates which bits are set in both values. For each position $i$ , if and only if the bit $d_i$ in both values is 1, then $d_i$ of the result is also 1, othewise, it's 0. For example, given 50 and 163 in two unsigned bytes, a bitwise AND returns 34.

  0 0 1 1 0 0 1 0
AND 1 0 1 0 0 0 1 1
= 0 0 1 0 0 0 1 0

In most high-level programming languages that offer bitwise AND, the usual operator is a single ampersand (&), not to be confused with a double ampersand (&&) which performs a Boolean AND, returning a True or False value.

The Windows Calculator offers bitwise AND in scientific calculator mode, while the Mac OS X Calculator offers it in programmer mode.




"bitwise AND" is owned by PrimeFan.
(view preamble | get metadata)

View style:

See Also: bitwise OR, bitwise XOR, bitwise NOT

Log in to rate this entry.
(view current ratings)

Cross-references: Mac OS X Calculator, mode, scientific calculator, Windows Calculator, Boolean, operator, languages, binary, operation
There is 1 reference to this entry.

This is version 1 of bitwise AND, born on 2007-05-05.
Object id is 9335, canonical name is BitwiseAND.
Accessed 934 times total.

Classification:
AMS MSC11A63 (Number theory :: Elementary number theory :: Radix representation; digital problems)

Pending Errata and Addenda
None.
Discussion
Style: Expand: Order:
forum policy

No messages.

Interact
post | correct | update request | add derivation | add example | add (any)