Skip to content

KARAN-D05/Computing_Machinery_from_Scratch

Repository files navigation

🧰 Computing Machinery from Scratch

🧮 4-Bit Feedback-Driven Stored-Program Machine

Version-3
🧩 R_A_MV3 - self correcting and automated arithmetic computing machine. (Performing Division)

This project began from a simple idea: what if the output of an arithmetic operation could be fed back into the input? The first prototype was very basic - it could only perform addition and take feedback. But as I explored the possibilities, I kept improving the machine:

  • V0 -> Proof of concept
  • V1 -> Manual Arithmetic Logic and 2's complement handling
  • V2 -> Low level of Automation
  • V3 -> Self Correction, State Based Control and high level of automation
  • V4 -> Sequential execution of Instructions stored in memory

Through each iteration, the goal was simple: make the machine smarter, more autonomous, programmable and more reliable.

Today, the Repeated Arithmetic Machine(name of the computing machine) is a modular, 4-bit arithmetic computing system with feedback-driven control, automation, error handling and ability to execute programs - a full evolution from a simple prototype to a fully autonomous machine.

💡Machine Schematics - From Idea to Implementation(V1-V3)

⚙️ Implementation Stack

Verilog Logisim Circuits

🚀 r_a_mv4(Stored Program Architecture)

Version 4 Hardware Integration
⚙️ R_A_MV4 - Complete system with sequential program execution.

This stage represents a significant step towards understanding and recreating principles behind early programmable computers. This is done in order to understand how instructions can be stored in memory and executed sequentially. The development of this version 4 is a hands on exploration of how program memory, sequencing and control logic forms basis of the Stored Program Execution.

Program Active Memory
🧠 Program Active Memory - Memory to store Machine code program and interact with machine by making code flow through it.

📈 Progress Made:-

  • Developed instruction format
  • Built Memory modules that stores the machine code instructions
  • Developed units that facilitate Controlled flow for execution of instructions
  • Successfully demonstrated programs like loading data, then adding them, then taking a feedback and subtracting it from some other data
  • Operations that would take manual intervention have been automated through machine code programming

🧩 Machine Code Instruction Format


🔬 More About technical details

✅ Assembly & Assembler - Built

  • Mapping machine code to custom assembly language
  • Assembly language for the machine code instructions
  • Assembler to convert from assembly code to machine code
  • Here is the Assembler Project, Check this out

👉Verilog Implementation:

waveform Waveform Analysis of Operand Storage System

⬇️ Download This Repository

🪟 Windows

Download → download_repos.bat

Double-click it and pick the repo(s) you want.

🐧 Linux / macOS

Download → download_repos.sh

bash

chmod +x download_repos.sh
./download_repos.sh

Always downloads the latest version.

🛠️ Toolchain & Repo Utilities - Built to make navigating and interacting with this repo easier

💻 Terminal-Based Manual

This project includes a built-in reference manual that can be queried directly from your terminal. View full manual: ram-manual

Linux / Mac:

curl -O https://raw.githubusercontent.com/KARAN-D05/Computing_Machinery_from_Scratch/main/ram-manual/run-ram-manual.sh
chmod +x run-ram-manual.sh
./run-ram-manual.sh

Windows:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/KARAN-D05/Computing_Machinery_from_Scratch/main/ram-manual/run-ram-manual.ps1" -OutFile "run-ram-manual.ps1"
powershell -ExecutionPolicy Bypass -File run-ram-manual.ps1

Full computing stack manual covering both the RAM hardware and its custom Assembly Language. One command for the complete reference: View full manual: stack-manual

Linux / Mac:

curl -O https://raw.githubusercontent.com/KARAN-D05/Computing_Machinery_from_Scratch/main/stack-manual/run-stack-manual.sh
chmod +x run-stack-manual.sh
./run-stack-manual.sh

Windows:

Invoke-WebRequest -Uri "https://raw.githubusercontent.com/KARAN-D05/Computing_Machinery_from_Scratch/main/stack-manual/run-stack-manual.ps1" -OutFile "run-stack-manual.ps1"
powershell -ExecutionPolicy Bypass -File run-stack-manual.ps1

🔧 portmap - Verilog Port Extractor

portmap is a lightweight CLI tool that extracts port definitions (input, output, inout) from Verilog modules and presents them in a clean table or Markdown format.

🔗 Source

https://github.com/KARAN-D05/portmap-HDL/blob/main/utils/portmap

📦 Release (Download Binary)

https://github.com/KARAN-D05/portmap-HDL/releases/tag/v1.0.0

🚀 Usage

portmap file.v
portmap file.v --md

🧰 Repo Filetree Generator

Filetree - A repository file tree generator that prints a visual directory tree with file-type icons and a file count breakdown by extension (.v, .circ, .md, .py and more).

Utils (Portmap + Filetree)- Fetched automatically as a utils package alongside any repo download - includes portmap binaries, filetree, and source code via download_repos.bat / download_repos.sh.

📜License:

  • Source code, HDL, and Logisim circuit files are licensed under the MIT License.
  • Documentation, diagrams, images, and PDFs are licensed under Creative Commons Attribution 4.0 (CC BY 4.0).

About

Started as an idea which kept evolving into a better and more advanced fault-tolerant 400+ logic gate autonomous arithmetic computing machine which then eventually evolved into a machine that can execute series of instructions stored in the program memory, A journey from operating in the hardware realm to getting into software realm ✨.

Topics

Resources

License

Stars

Watchers

Forks

Contributors