Everything2
Near Matches
Ignore Exact
Full Text
Everything2

and

"and" is also a: user

created by toebee

(thing) by JeffMagnus (4.9 y) (print)   ?   (I like it!) Thu Jul 27 2000 at 22:42:52

Actually 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

(thing) by yerricde (8.5 mon) (print)   ?   (I like it!) Thu Mar 29 2001 at 22:10:14

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


(idea) by hobyrne (3 y) (print)   ?   (I like it!) Thu Dec 19 2002 at 3:21:40

"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).


(thing) by azuroth (3.2 y) (print)   ?   (I like it!) Sun Oct 17 2004 at 8:35:22

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."

(thing) by philologue (8 mon) (print)   ?   (I like it!) Sat Oct 20 2007 at 5:59:19

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.


(definition) by Webster 1913 (print) 1 C! Tue Dec 21 1999 at 21:47:17

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.


printable version
chaos

Katana NAND or Tastes that, surprisingly, go well together
HOT DAMN!: Drinking, Debauchery, and Dastardly Deeds nor The most elusive type of problem in a C program XOR
Why do geeks love Robert Heinlein? There but for the grace of God go I logical operators conjunction
Lottery paradox Robot Odyssey Boolean law Village Inn
ampersand Lua DeMorgan's Rule &&
v. I-type ALU Truth table
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Little presents from the Node Fairy:
I've got a page one story buried in my yard; I've got a troubled mind
Foo Fighters
Dr. Seuss
Medea
Chinatown
The last time I saw Orson Welles
How to wipe your ass
muse
What to do if a big dog attacks you
Ferris wheel
August 2, 2006
Aesop's Fables
Dune
New Writeups
Heisenberg
Editor Log: July 2008(log)
sam512
halfway homes, catacombs, twilight zones(fiction)
Timeshredder
The Texas UFO Crash of 1897(event)
Heitah
The Dark Knight(review)
ignis_glaciesque
Uppsala(place)
ignis_glaciesque
diffusion of responsibility(idea)
TheOrientalAfrican
The Soft Meadow of my Childhood(event)
BookReader
The Dragon Slayers(fiction)
kohlcass
religiously fashionable(review)
Pavlovna
waulking song(thing)
tentative
Stick Man(poetry)
Ereneta
The Fight with the Snapping Turtle: Or, the American St. George(poetry)
sitaraika
Fog and fire(personal)
MonoliTheory
She sobs in response(fiction)
kohlcass
Arzu(person)
This page courtesy of The Everything Development Company