logical-gates

Logical Gates like AND, OR, NOR, XOR with bit-wise operation

Usage no npm install needed!

<script type="module">
  import logicalGates from 'https://cdn.skypack.dev/logical-gates';
</script>

README

Logic Gates

Implementation for logic gates in js

Installation

  yarn add logical-gates

Usage

  import { AND, OR, NAND, NOT, NOR } from 'logical-gates';

Left bitwise operator

  import { LAND, LOR, LXOR } from 'logical-gates';

Example :

const result = LAND(5, 3);

Explanation :

 5 = 101
 3 =11
 // Left wise
 3 = 110

Result

  4