Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.29 KB

README.md

File metadata and controls

54 lines (40 loc) · 1.29 KB

Introduction:

Addition and multiplication on numbers are the prototypical example of an operation that combines two elements of a set to produce a third.

Usage:

Implement this Class to your project and call the method that you would to use, see examples below.

Import manually:

  • Download Jar File.

  • Using Intellij: File -> Project Structure -> Libraries -> (+) symbol -> From Jar ... Import just downloaded file.

Examples:

/*
    public static void main(String[] args) {
        System.out.println(BAS.Mult("101", "100", "111")); // output: 100
        System.out.println(BAS.Add("101", "100", "111")); // output: 110
    }
*/

Notes:

Addition: BAS.Add would work as "XOR operator" or (Z2, +) math-group.

    /*
     * + | 0 | 1
     * ----------
     * 0 | 0 | 1
     * ----------
     * 1 | 1 | 0
     *
     */

Multiplication: BAS.Mult works as "and operator" (Z2, *) math-group.

    /*
     * * | 0 | 1
     * ----------
     * 0 | 0 | 0
     * ----------
     * 1 | 0 | 1
     *
     */