# bit

Contains functions for bitwise operations on integer values.

## Functions

### 1. bit::and

Performs the logical AND operation on each pair of the corresponding bits, by multiplying them.

**Type definition**

`func(a: int, b: int -> int)`

**List of arguments**

Name | Type | Description |
---|---|---|

a | int | Left value |

b | int | Rignt value |

**List of results**

Name | Type | Description |
---|---|---|

- | int | Result of disjunction |

### 2. bit::mod

Finds the remainder after division of one number by another.

**Type definition**

`func(value: int, divider: int -> int)`

**List of arguments**

Name | Type | Description |
---|---|---|

value | int | The dividend |

divider | int | Th divider |

**List of results**

Name | Type | Description |
---|---|---|

- | int | The remainder |

### 3. bit::not

Inverts all bits of the value.

**Type definition**

`func(value: int -> int)`

**List of arguments**

Name | Type | Description |
---|---|---|

value | int | Value to be inverted |

**List of results**

Name | Type | Description |
---|---|---|

- | int | Result of inversion |

### 4. bit::or

Performs the logical inclusive OR operation on each pair of corresponding bits.

**Type definition**

`func(a: int, b: int -> int)`

**List of arguments**

Name | Type | Description |
---|---|---|

a | int | Left value |

b | int | Rignt value |

**List of results**

Name | Type | Description |
---|---|---|

- | int | Result of inclusive conjuction |

### 5. bit::shl

Shifts each bit of its first parameter to the left. The second parameter decides the number of bits the value is shifted.

**Type definition**

`func(value: int, bits: int -> int)`

**List of arguments**

Name | Type | Description |
---|---|---|

value | int | Value |

bits | int | Number of bits |

**List of results**

Name | Type | Description |
---|---|---|

- | int | Result value |

### 6. bit::shr

Shifts each bit of its first parameter to the right. The second parameter decides the number of bits the value is shifted.

**Type definition**

`func(value: int, bits: int -> int)`

**List of arguments**

Name | Type | Description |
---|---|---|

value | int | Value |

bits | int | Number of places |

**List of results**

Name | Type | Description |
---|---|---|

- | int | Result value |

### 7. bit::xor

Performs the logical exclusive OR operation on each pair of corresponding bits.

**Type definition**

`func(a: int, b: int -> int)`

**List of arguments**

Name | Type | Description |
---|---|---|

a | int | Left value |

b | int | Rignt value |

**List of results**

Name | Type | Description |
---|---|---|

- | int | Result of exclusive conjuction |