{"id":27121019,"url":"https://github.com/pie1722/adder-and-subtractor-using-gates","last_synced_at":"2026-01-20T03:33:59.307Z","repository":{"id":266960961,"uuid":"875477697","full_name":"Pie1722/Adder-and-Subtractor-using-Gates","owner":"Pie1722","description":"This is a circuit wich can do addition and substraction and shows the values in 7 segment display. The only limitation is that it can only convert 4 bit binary input to BCD to feed the display so it cant show the sum more than 15.","archived":false,"fork":false,"pushed_at":"2025-02-12T10:07:50.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T11:25:18.778Z","etag":null,"topics":["4bit-adder","4bit-subtractor","binary-to-bcd","k-map","logic-gates","logic-gates-simulator"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pie1722.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":"2024-10-20T04:47:57.000Z","updated_at":"2025-02-12T10:07:53.000Z","dependencies_parsed_at":"2024-12-07T10:18:56.418Z","dependency_job_id":"ffb72d2d-c34c-4330-9be7-de212ac63d53","html_url":"https://github.com/Pie1722/Adder-and-Subtractor-using-Gates","commit_stats":null,"previous_names":["pie1722/adder-and-subtractor-using-gates"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pie1722%2FAdder-and-Subtractor-using-Gates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pie1722%2FAdder-and-Subtractor-using-Gates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pie1722%2FAdder-and-Subtractor-using-Gates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pie1722%2FAdder-and-Subtractor-using-Gates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pie1722","download_url":"https://codeload.github.com/Pie1722/Adder-and-Subtractor-using-Gates/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640557,"owners_count":20971555,"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","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":["4bit-adder","4bit-subtractor","binary-to-bcd","k-map","logic-gates","logic-gates-simulator"],"created_at":"2025-04-07T10:51:23.397Z","updated_at":"2026-01-20T03:33:59.272Z","avatar_url":"https://github.com/Pie1722.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Adder-and-Subtractor-using-Gates\n\nThe 4-bit adder and subtractor circuit can perform addition or subtraction depending on a control signal. This control signal, often referred to as the \"mode\" or \"operation\" signal, determines whether the circuit functions as an adder or subtractor. When set to addition mode, the circuit computes the sum of two 4-bit binary numbers but can only produce output of maximum 4-bit binary number so i will make a 5 bit binary to BCD converter for the output of sum soon. \nIn subtraction mode, it calculates the difference between the two numbers by utilizing the concept of two's complement representation with the help of an EX-OR gate to select the mode.\n\n# SCHEMATIC:\n\n![DTE Schematic_page-0001](https://github.com/user-attachments/assets/7ba4fea5-889a-4421-89e2-80b70dae655f)\n\n# INPUTS:\n\n![image](https://github.com/user-attachments/assets/4676b7b8-707f-4773-804f-9357bdf34b11)\n\nHere various switches are used to select the binary input number.\nThese switches are pulled down using resistors to give the output as low to the basic gates so that they won’t malfunction during the calculation.\nIt is a common problem that if the output is not grounded the value could either be 1 or 0 which is not proper to provide a correct calculation.\n\n# 7 segment display for INPUTS: \n\n![image](https://github.com/user-attachments/assets/9f821d81-186c-47c2-9c74-9f2dc22ed685)\n\nHere we have used a common anode 7 segment display and the driver IC 7447 to display the inputs given from the BINARY TO BCD circuits.\n\n# Binary to BCD converter for inputs (A \u0026 B):\n\nINPUT FROM A\n\n![image](https://github.com/user-attachments/assets/0d752a3a-2a28-403d-b4f2-93a3558e8689)\n\nINPUT FROM  B\n\n![image](https://github.com/user-attachments/assets/153777cf-ce6f-4dd1-b3be-badc8f172bba)\n\n# Binary to BCD Code Converter:\n\n![image](https://github.com/user-attachments/assets/9ed0707b-a163-456e-ac90-598ef780d829)\n\n# Drawing K-Map for each outputs:\n\n![image](https://github.com/user-attachments/assets/a24a505a-55e5-410e-b7f9-045ef3004d35)\n\n![image](https://github.com/user-attachments/assets/f8c54554-ce33-4163-a89e-737faaa3dd9d)\n\n![image](https://github.com/user-attachments/assets/7882c551-d26c-4271-9ad4-67b117ebcc8a)\n\n![image](https://github.com/user-attachments/assets/61573a52-3707-42ce-b9ac-dd780c85fc51)\n\n![image](https://github.com/user-attachments/assets/1143372c-d930-45bc-a20d-4f2c3d9afac7)\n\nMinimized expression for each output:\n\nW = AB + AC (carry decimal)\n\nX = A’B’\n\nY = A’B + BC\n\nZ = ABC’ + A’C\n\nE = D  (first bit)\n\nNOTE:\nThe same is used for the conversion of binary digits to decimal which is getting inputs from the calculator.\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpie1722%2Fadder-and-subtractor-using-gates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpie1722%2Fadder-and-subtractor-using-gates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpie1722%2Fadder-and-subtractor-using-gates/lists"}