An AND gate have two bits of input and a single bit of output.

The output of AND gate is logic '1' only if both inputs are at logic '1'. Otherwise, the output is logic '0'.

The truth table defines the behavior of this gate.

The function implmented by AND2 gates has interesting properties:

The function is symmetric. Thus, x * y == y * x. This can be verified by using truth tables. We use * to represent AND.

The function is associative. Thus, (x * y) * z == x * (y * z). This can be verified by using truth tables.

Because of these properties, it's easy to define an n-input AND gate.

ANDn(x1, x2,...,xn) = x1 * x2 * ... * xn

That is, an AND gate with n-inputs is the AND of all the bits. This is not ambiguous because the AND function is associative (all parenthesization of this expression are equivalent).

## VHDL code for AND gate

## No comments:

## Post a Comment

Please provide valuable comments and suggestions for our motivation...