Skip to content

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

License

Notifications You must be signed in to change notification settings

khaledbakeer/BinaryAlgebraicStructures

Repository files navigation

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
     *
     */

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages