{"id":28437371,"url":"https://github.com/komed3/8-bit-alu","last_synced_at":"2026-02-24T00:02:28.134Z","repository":{"id":185301093,"uuid":"441259768","full_name":"komed3/8-bit-alu","owner":"komed3","description":"Project to build an 8-bit arithmetic logic unit (ALU) consisting only of transistors","archived":false,"fork":false,"pushed_at":"2022-01-15T19:34:38.000Z","size":13757,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T20:39:33.305Z","etag":null,"topics":["8-bit","8-bit-alu","arithmetic-logic-unit","circuit","cpu","logic-gates","logisim-alu","transistor-level"],"latest_commit_sha":null,"homepage":"https://transistor-rechner.de","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/komed3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"custom":"https://paypal.me/komed3"}},"created_at":"2021-12-23T18:04:42.000Z","updated_at":"2025-06-23T13:23:08.000Z","dependencies_parsed_at":"2023-08-01T12:12:14.690Z","dependency_job_id":null,"html_url":"https://github.com/komed3/8-bit-alu","commit_stats":null,"previous_names":["komed3/8-bit-alu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/komed3/8-bit-alu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komed3%2F8-bit-alu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komed3%2F8-bit-alu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komed3%2F8-bit-alu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komed3%2F8-bit-alu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/komed3","download_url":"https://codeload.github.com/komed3/8-bit-alu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/komed3%2F8-bit-alu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281392689,"owners_count":26493117,"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-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["8-bit","8-bit-alu","arithmetic-logic-unit","circuit","cpu","logic-gates","logisim-alu","transistor-level"],"created_at":"2025-06-05T23:41:30.493Z","updated_at":"2025-10-28T06:09:57.560Z","avatar_url":"https://github.com/komed3.png","language":null,"funding_links":["https://paypal.me/komed3"],"categories":[],"sub_categories":[],"readme":"# 8-bit arithmetic logic unit\n\nProject to build an 8-bit arithmetic logic unit (ALU) consisting only of transistors. Further on, the construction of a transistor processor based on this ALU will follow.\n\n## Description\n\nThe arithmetic-logic unit is a part of a CPU. This project is about building a controllable arithmetic unit with a 8-bit processing span (hex. ``00-FF``, dec. ``0-255``).\n\nThe ALU is built entirely from discrete transistors, resistors, diodes and LEDs. No integrated circuits are used. In its finished state, it will contain functions defined below and will be controlled by a CPU (also made of transistors) in the future.\n\nThe aim is to illustrate how computers calculate up to the execution of elementary programmes.\n\n## Input\n\nThe inputs of the arithmetic-logic unit are the two 8-bit wide data words ``A`` and ``B``, and 8 control lines:\n\n+ ``~A`` inverts word ``A``\n+ ``~B`` inverts word ``B``\n+ ``~C`` inhibit carry\n+ ``~AND`` inhibit AND\n+ ``Cin`` carry input (INC/SUB)\n+ ``~X`` inverts output ``X``\n+ ``RS`` logical right shift\n+ ``LS`` logical left shift\n\n## Functions\n\nThe arithmetic-logic unit includes the following instructions, which are defined in the coding table below with their respective control lines:\n\n### Arithmetic\n\n+ addition (ADD)\n+ subtraction (SUB)\n+ increment (INC)\n+ comparison (CMP)\n\n### Logic\n\n+ negation (NOT)\n+ conjunction (AND + NAND)\n+ disjunction (OR + NOR)\n+ contravalence (XOR + XNOR)\n+ right and left shift (LSR/LSL)\n\n### Coding table\n\n| LS | RS | ~X | Cin | ~AND | ~C | ~B | ~A | FNC   |\n|:--:|:--:|:--:|:---:|:----:|:--:|:--:|:--:|:-----:|\n| 0  | 0  | 0  | 0   | 0    | 0  | 0  | 0  | ADD   |\n| 0  | 0  | 0  | 0   | 0    | 0  | 0  | 1  | NOT A |\n| 0  | 0  | 0  | 0   | 0    | 0  | 1  | 0  | NOT B |\n| 0  | 0  | 0  | 0   | 0    | 1  | 0  | 0  | XOR   |\n| 0  | 0  | 0  | 0   | 1    | 0  | 0  | 0  | OR    |\n| 0  | 0  | 0  | 0   | 1    | 0  | 1  | 1  | NAND  |\n| 0  | 0  | 0  | 1   | 0    | 0  | 0  | 0  | INC   |\n| 0  | 0  | 0  | 1   | 0    | 0  | 1  | 0  | SUB   |\n| 0  | 0  | 1  | 0   | 0    | 0  | 0  | 0  | NOT X |\n| 0  | 0  | 1  | 0   | 0    | 1  | 0  | 0  | XNOR  |\n| 0  | 0  | 1  | 0   | 1    | 0  | 0  | 0  | NOR   |\n| 0  | 0  | 1  | 0   | 1    | 0  | 1  | 1  | AND   |\n| 0  | 1  | 0  | 0   | 0    | 0  | 0  | 0  | LSR   |\n| 1  | 0  | 0  | 0   | 0    | 0  | 0  | 0  | LSL   |\n\n## Output\n\nThe output of the arithmetic-logic unit is the 8-bit wide data word ``X`` and the status register consisting of another 8 bits.\n\n### Status register\n\n| Flag | Name       | Description |\n|:----:|------------|-------------|\n| C    | Carry      | Enables numbers larger than a single word to be added/subtracted by carrying a binary digit from a less significant word to the least significant bit of a more significant word as needed. |\n| V    | Overflow   | Indicates that the signed result of an operation is too large to fit in the register width using two's complement representation. |\n| S    | Sign       | Indicates that the result of a mathematical operation is negative. |\n| Z    | Zero       | Indicates that the result of an arithmetic or logical operation (or a load) was zero. |\n| P    | Parity     | Indicates whether the number of set bits of the last result is even or odd (``Odd=1``). |\n| H    | Half-carry | Indicates that a bit carry was produced between the nibbles (4-bit halves of a byte operand) as a result of the last arithmetic operation. |\n\n### Magnitude comparator\n\nPart of the ALU is the _magnitude comparator_. It is unaffected by arithmetic (or even shift) operations. It compares the input words ``A`` and ``B`` for equality and has two outputs that are included in the status register:\n\n+ ``A=B`` Indicates when the entered words ``A`` and ``B`` are equal.\n+ ``A\u003eB`` Indicates when the entered word ``A`` is greather than ``B``.\n\nIf both outputs of the status register are ``0``, then ``A\u003cB`` applies. No separate data wire is provided for this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomed3%2F8-bit-alu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkomed3%2F8-bit-alu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkomed3%2F8-bit-alu/lists"}