# Boolean Logic Package

**URL:** <https://discourse.julialang.org/t/boolean-logic-package/14241>\
**Category:** General Usage\
**Tags:** question\
**Created:** [August 29, 2018, 1:36pm UTC](https://discourse.julialang.org/t/boolean-logic-package/14241 "2018-08-29T13:36:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rpgowers](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rpgowers/32/46229_2.png) [@rpgowers](https://discourse.julialang.org/u/rpgowers)\
**Post date:** [August 29, 2018, 1:36pm UTC](https://discourse.julialang.org/t/boolean-logic-package/14241/1 "2018-08-29T13:36:35Z")

</div>

I am wondering if there exists a package for more complex Boolean operations. Some simple examples would be:

1. majority logic,

> majority([false,true,false]) = false

1. logic gates which have multiple outputs, such as the [Fredkin gate](https://en.wikipedia.org/wiki/Fredkin_gate)

2. Generate truth tables from Boolean operators.

While none of these examples are too challenging to for the user to define functions for, there may be situations in which it could convenient to have this either done efficiently or for teaching purposes in logic. I think it would be fun to create a package that does this, but I don’t want to reinvent the wheel if it exists and I just haven’t been able to find it.

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [August 29, 2018, 4:20pm UTC](https://discourse.julialang.org/t/boolean-logic-package/14241/2 "2018-08-29T16:20:48Z")

</div>

None to my knowledge. A few of us have toyed with one part or another of that; none of that was really for release.
