# Pascal - logical and: and

logical and works as follows: just in case it's true if both inputs are true in all other situations the result is false. In next table you can find all possibilities:a | b | x |
---|---|---|

False | False | False |

False | True | False |

True | False | False |

True | True | True |

## and

### Description

`par1 and par2`

### Input

- par1 - logical value
- par2 - logical value

### Output

- Result - logical value

### Examples

## Pascal

in the source code you can find the equivalent of the above table, for easier orientation at the end of each line is a comment which shows the result.```
a1 := false and false; { a1 = false}
a2 := false and true; { a2 = false}
a3 := true and false; { a3 = false}
a4 := true and true; { a4 = true}
```

## Pascal

even one example in what situations we can use the operation logical and:```
a and b
a and true
10 >a and a>5
```

## Pascal

Other pieces of example codes:a and b

not b and true

b2:= x and y;

you can find it in the following collections: logical operators

logical and in another programming language:

Differences to: