# Powershell, ~~36~~ 34 bytes

Inspired by xnor, but the sequence `*108%143%2`

is shorter then original `*3%61%37%9%7%2`

```
$args|% t*y|%{$n+=108*$_};$n%143%2
```

Test script:

```
$f = {
$args|% t*y|%{$n+=108*$_};$n%143%2
#$args|% t*y|%{$n+=3*$_};$n%61%37%9%7%2 # sequence by xnor
}
@(
,("AND 0 0", 0)
,("AND 0 1", 0)
,("AND 1 0", 0)
,("AND 1 1", 1)
,("XOR 0 0", 0)
,("XOR 0 1", 1)
,("XOR 1 0", 1)
,("XOR 1 1", 0)
,("OR 0 0", 0)
,("OR 0 1", 1)
,("OR 1 0", 1)
,("OR 1 1", 1)
,("NAND 0 0", 1)
,("NAND 0 1", 1)
,("NAND 1 0", 1)
,("NAND 1 1", 0)
,("NOR 0 0", 1)
,("NOR 0 1", 0)
,("NOR 1 0", 0)
,("NOR 1 1", 0)
,("XNOR 0 0", 1)
,("XNOR 0 1", 0)
,("XNOR 1 0", 0)
,("XNOR 1 1", 1)
) | % {
$s,$e = $_
$r = &$f $s
"$($r-eq$e): $s=$r"
}
```

Output:

```
True: AND 0 0=0
True: AND 0 1=0
True: AND 1 0=0
True: AND 1 1=1
True: XOR 0 0=0
True: XOR 0 1=1
True: XOR 1 0=1
True: XOR 1 1=0
True: OR 0 0=0
True: OR 0 1=1
True: OR 1 0=1
True: OR 1 1=1
True: NAND 0 0=1
True: NAND 0 1=1
True: NAND 1 0=1
True: NAND 1 1=0
True: NOR 0 0=1
True: NOR 0 1=0
True: NOR 1 0=0
True: NOR 1 1=0
True: XNOR 0 0=1
True: XNOR 0 1=0
True: XNOR 1 0=0
True: XNOR 1 1=1
```

Can we take in an array as input? – Quintec – 2018-10-06T01:58:02.970

no @Quintec you cant – qazwsx – 2018-10-06T02:06:48.000

3Can we output as True/False? – xnor – 2018-10-06T03:08:27.753

5sure @xnor (also relevant username) – qazwsx – 2018-10-06T03:19:37.680