Binary and

Binary and

If two conditions are combined by "and", they must both be true for the compound condition to be true as well.

Likewise, two bits may be combined with "and":

x y x AND y
0 0 0
0 1 0
1 0 0
1 1 1

I.e. the result is 1, if both x and y are 1, and 0 otherwise. If 0 is equated with "false", and 1 with "true" the "bit and" operation works like our "logical and".

"Binary and" can work on binary numbers of any size, the numbers are simply "and"ed digit by digit. For example:

x: 10001101 y: 01010111 x AND y: 00000101

(Only in the first, and third column from the right, both operands had 1 digits.)

"and" is often called "masking", because y can be seen as a mask which is transparent (1) in some places (x will shine through), and black (0) in others (x will be blocked).

ee also

*Bitwise operation
*Logical conjunction

Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Exchange Broadcast Binary and Metadata Format — (XBMF) ist ein binäres Dateiformat, das als Containerformat für Metadaten im XML Format und Inhalten wie Audio, Bilder, Videos und anderen Daten dient (Binary XML). Ein XBMF besteht aus einem als .tar.gz gepackten Archiv, in dem sich eine… …   Deutsch Wikipedia

  • And — or AND may be any of the following: * Grammatical conjunction, a part of speech that connects two words, phrases, or clauses * Logical conjunction, a two place logical operation used in logic and mathematics * Binary and, an operator used in… …   Wikipedia

  • Binary star — For the hip hop group, see Binary Star (band). Hubble image of the …   Wikipedia

  • Binary prefix — Prefixes for bit and byte multiples Decimal Value SI 1000 k kilo 10002 M mega …   Wikipedia

  • Binary-coded decimal — In computing and electronic systems, binary coded decimal (BCD) is a digital encoding method for numbers using decimal notation, with each decimal digit represented by its own binary sequence. In BCD, a numeral is usually represented by four bits …   Wikipedia

  • Binary code — The word Wikipedia represented in ASCII binary. A binary code is a way of representing text or computer processor instructions by the use of the binary number system s two binary digits 0 and 1. This is accomplished by assigning a bit string to… …   Wikipedia

  • Binary file — binaries redirects here. For double stars, see Binary star. .bin redirects here. For The CD image format, see Disk image. A hex dump of the 318 byte Wikipedia favicon, or …   Wikipedia

  • Binary form — This article is about the musical form. For other uses, see Binary form (disambiguation). Binary form is a musical form in two related sections, both of which are usually repeated. Binary is also a structure used to choreograph dance. Binary form …   Wikipedia

  • binary coded decimal —    Abbreviated BCD. A simple system for converting decimal numbers into binary form, in which each decimal digit is converted into binary and then stored as a single character …   Dictionary of networking

  • Binary System —    This is when two stars are very close to each other, and revolve in an orbit around their common center of mass. Binary and Multiple star systems constitute over half the stars in the sky. See Periastron …   The writer's dictionary of science fiction, fantasy, horror and mythology

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.