Project

logicgates

0.0
No commit activity in last 3 years
No release in over 3 years
Common logic gates written in Ruby. A proof that all logical operations can be derived from AND, OR and NOT.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.13
~> 10.0
 Project Readme

LogicGates

A Ruby gem of common logic gates. Also serves as a proof that all logical operations can be derived from the logical operators OR and NOT. (Could also have been done with AND and NOT).

Installation

gem 'logicgates'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install logicgates

API

LogicGates::my_and(a, b)
LogicGates::my_or(a, b)
LogicGates::not(a)
LogicGates::xor(a, b)
LogicGates::nor(a, b)
LogicGates::nand(a, b)
LogicGates::xnor(a, b)
LogicGates::mux(a, b)