And is a conjunction in English grammar.

It is a binary logic operator which evaluates to true if both operands are true.

Truth Table

  TF
  --
T|TF
F|FF
A 6502 instruction that performs a bitwise and operation.
  • Function: A & N => A
  • Updates flags: S . . . . . Z .
  • Opcode numbers:
    (d,x) $21
    dp    $25
    imm   $29
    abs   $2D
    (d),y $31
    d,x   $35
    a,y   $39
    a,x   $3D
    

See also: 6502 instructions | 6502 addressing modes

"and" is a reserved word in the programming language Lua.

In the BNF syntax of Lua, it appears as a terminal atom in one substitution rule:
binopand
"binop" appears as a nonterminal atom in one substitution rule:
expexp binop exp

"and" is the conjunctive binary logical operator. Like the control structures, all logical operators consider "nil" as false and anything else as true. The conjunction operator "and" returns "nil" if its first argument is "nil"; otherwise, it returns its second argument. (Both "and" and "or" use short-cut evaluation, that is, the second operand is evaluated only if necessary.)

This makes the "and" operator a bit like the "if" statement. There are only 3 differences; "and" returns a value but "if" doesn't, the second operand of "and" must be an expression whereas the "then" branch of "if" is a statement, and "if" potentially has "elseif" and "else" branches.

There is one useful Lua idiom that uses the logical operator "and". It is
x = a and b or c
which should be read as x = (a and b) or c. This idiom is equivalent to
if a then x = b else x = c end
provided that b is not "nil".


Other systems do not use short-cut evaluation (a limited form of lazy evaluation), and both operands are always evaluated fully before the result of the "and" operation is determined. Yet other systems, nondeterministic systems, usually found in parallel processing environments, guarantee that the result of the "and" operation is logically correct, but does not guarantee that both operands are fully evaluated, it does not guarantee that either one in particular is evaluated (Lua guarantees that the first operand is evaluated), and it does not guarantee that an operand will not be only partially evaluated (Lua guarantees that the second operand will either be evaluated or not, with no in-between). Using impure functions or expressions with side-effects in nondeterministic systems is therefore considered harmful.

And, in other programming languages, the "and" keyword can have another meaning: a bitwise "and" on two numeric (usually unsigned integer) operands (giving another number, of the same type, as a result). A number may be considered an array of bits; in Eindhoven notation, any number (b) may be expressed as (+ : iZ : bi * 2i) - standard binary notation - each bi being either 0 or 1, thus making an array of bits. (For signed values, the sign bit is considered just another bit in the array; for integers, negative values of i need not be considered.) The "numeric and" performs the "logical and" operation on bits in corresponding positions in the two operands, and places the result of each "logical and" in the corresponding position in the result. In symbols, "b and c" evaluates to (+ : iZ : (bi and ci) * 2i).

The C symbol for "logical and" is && and the C symbol for "numeric and" is & (which is the same symbol used for dereferencing, the opposite of the * operator).

And is a common conjunction in the English language.

It is used to signify truth in both clauses it is connected to. Unlike some other conjunctions however, such as but or because, its conjunctions must always be in the same order:
    clause conjunction clause
    "This is an example and it is correct."

Other conjunctions may be connected in this way but and may not be, in practice:
    conjunction clause, clause
    "And this is an example, it is technically correct, but in practice it appears incorrect."
When heard, a previous sentence is expected to be connected. The cause of this is possibly abundant use of the following syntax.

A common, but incorrect, way of using and is this:
    clause. conjunction clause
    "This is an example. And it is incorrect."
This, however, is technically incorrect. The first clause has ended with a period, then it is referenced from the conjunction.


Oolong says "But there's some debate as to whether it is *really* incorrect to start a sentence with 'and' (in the 'clause. Conjunction, clause' form), I believe. There are times when it makes perfect sense and is quite hard to avoid, after all."

In rhythm, and refers to the eighth note offbeat. Usually it is used in the context of rhythmic counting: "One and two and three and four and". It has additionally become a synonym for "offbeat". Ex: "Play the C on the and of three."

e and a are similar musical terms, to described the second and fourth sixteenth notes. Ex: "One-e-and-a Two-e-and-a," etc.

And (#), conj. [AS. and; akin to OS. endi, Icel. enda, OHG. anti, enti, inti, unti, G. und, D. en, OD. ende. Cf, An if, Ante-.]

1.

A particle which expresses the relation of connection or addition. It is used to conjoin a word with a word, a clause with a clause, or a sentence with a sentence.

(a) It is sometimes used emphatically; as, "there are women and women," that is, two very different sorts of women.

(b) By a rhetorical figure, notions, one of which is modificatory of the other, are connected by and; as, "the tediousness and process of my travel," that is, the tedious process, etc.; "thy fair and outward character," that is, thy outwardly fair character,

Schmidt's Shak. Lex.

2.

In order to; -- used instead of the infinitival to, especially after try, come, go.

At least to try and teach the erring soul. Milton.

3.

It is sometimes, in old songs, a mere expletive.

When that I was and a little tiny boy. Shak.

4.

If; though. See An, conj.

[Obs.]

Chaucer.

As they will set an house on fire, and it were but to roast their eggs. Bacon.

And so forth, and others; and the rest; and similar things; and other things or ingredients. The abbreviation, etc. (et cetera), or &c., is usually read and so forth.

 

© Webster 1913.

Log in or register to write something here or to contact authors.