1. Computing & Technology

Discuss in my forum

Definition of AND

By , About.com Guide

Definition: AND is an operation between two bits. If both bits are set then the result is set otherwise the result is clear. This can be shown as below.
 A B --- A AND B
 0 0 ----- 0
 0 1 ----- 0
 1 0 ----- 0
 1 1 ----- 1
 
In C, C++ and C# binary AND is represented by a single character &.

In expressions, AND is represented by the double character && as in

 if (a==2) && (b==3) { //.. rest of code 
Which means if a equals 2 and b equals 3

Glossary:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Examples:
OR is often used to combine bytes together.

©2012 About.com. All rights reserved.

A part of The New York Times Company.