{"id":21516549,"url":"https://github.com/vinetos/neural-network-xor","last_synced_at":"2025-07-22T22:04:42.516Z","repository":{"id":93033609,"uuid":"301094600","full_name":"Vinetos/neural-network-xor","owner":"Vinetos","description":"Implements a neural network learning XOR gate in your favourite languages !","archived":false,"fork":false,"pushed_at":"2020-10-10T19:29:40.000Z","size":62,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-15T00:33:36.226Z","etag":null,"topics":["ai","algorithms","artificial-intelligence","artificial-neural-networks","beginner-friendly","hacktoberfest","xor-neural-network"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Vinetos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-04T09:58:31.000Z","updated_at":"2022-01-31T16:02:04.000Z","dependencies_parsed_at":"2023-03-13T17:22:43.498Z","dependency_job_id":null,"html_url":"https://github.com/Vinetos/neural-network-xor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Vinetos/neural-network-xor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vinetos%2Fneural-network-xor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vinetos%2Fneural-network-xor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vinetos%2Fneural-network-xor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vinetos%2Fneural-network-xor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vinetos","download_url":"https://codeload.github.com/Vinetos/neural-network-xor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vinetos%2Fneural-network-xor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266580299,"owners_count":23951193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","algorithms","artificial-intelligence","artificial-neural-networks","beginner-friendly","hacktoberfest","xor-neural-network"],"created_at":"2024-11-24T00:22:16.012Z","updated_at":"2025-07-22T22:04:42.487Z","avatar_url":"https://github.com/Vinetos.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural-Network-XOR\nImplement a Neural Network learning XOR gate in your favourite languages !\n\n# File architecture\nTo avoid problems, follow this architecture :\n```\n\u003croot\u003e\n  |_ python\n      |_ \u003cusername\u003e\n          |_ my file.py\n          |_ network.py\n  |_ java\n      |_ \u003cusername\u003e\n          |_ Main.java\n          |_ Test.java\n``` \n\nTo increase lisibility, I recommend to create only **ONE FILE**.\nFor instance, `main.py` should contains all the code needed to run the project.\n\n# XOR gate \n\u003cimg align=\"right\" src=\"https://upload.wikimedia.org/wikipedia/commons/e/ed/3_gate_XOR.svg\"\u003e\nAn XOR gate (sometimes referred to by its extended name, Exclusive OR gate) is a **digital logic gate** with two or more inputs and one output that performs exclusive disjunction. The output of an XOR gate is true only when exactly one of its inputs is true. If both of an XOR gate's inputs are false, or if both of its inputs are true, then the output of the XOR gate is false.\n\u003cbr/\u003e\nIf an XOR gate has more than two inputs, then its behavior depends on its implementation. In the vast majority of cases, an XOR gate will output true if an odd number of its inputs is true.\n\u003cbr/\u003e\n\n| Input  | Output |\n| ------------- | ------------- |\n| \u003ctable\u003e\u003ctr\u003e\u003cth\u003eA\u003c/th\u003e\u003cth\u003eB\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e  | \u003ctable\u003e\u003ctr\u003e\u003cth\u003eQ = A ⊕ B\u003c/th\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e  |\n\n## Logical Proof of XOR\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eA\u003c/th\u003e\n    \u003cth\u003eB\u003c/th\u003e \n    \u003cth\u003eA + B\u003c/th\u003e\n    \u003cth\u003eA'\u003c/th\u003e\n    \u003cth\u003eB'\u003c/th\u003e \n    \u003cth\u003eA' + B'\u003c/th\u003e\n    \u003cth\u003eA ⊕ B = (A+B).(A'+B')\u003c/th\u003e\n  \u003c/tr\u003e\n  \n\u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\n\u003ctr\u003e\n  \n \u003ctr\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\n\u003ctr\u003e\n  \n \u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\n\u003ctr\u003e\n  \n\u003ctr\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e1\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\u003ctd\u003e0\u003c/td\u003e\n\u003ctr\u003e\n  \n\u003c/table\u003e\n\n\nIn this table,\n - **A + B** represent **OR** operation between A and B\n - A' and B'represent A \u0026 B compliment respectively\n - dot(**.**) represent **AND** operation\n \n### Significance of XOR in Neural Network\nGates are the building blocks of **Perceptron**. XOR is a **classification problem** and one for which the expected outputs are known in advance. It is therefore appropriate to use a supervised learning approach. The **XOR gate** consists of an **OR gate**, **NAND gate** and an **AND gate**. This means we need to combine two perceptrons.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinetos%2Fneural-network-xor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvinetos%2Fneural-network-xor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvinetos%2Fneural-network-xor/lists"}