Comment

Comment by veexx103

Ten years ago, I worked on something similar for my graduation project.

I drew inspiration from the circuit simulator in SICP and a tool called Logisim,

and used Lisp to design a circuit simulation library.

The core concept was:

Each function could generate a circuit module,

that accepted multiple input lines—each consisting of multiple bits,

and produced a single output line, which also consisted of multiple bits.

For example, an adder would take two $n$-bit lines as input and output a single $n$-bit line.

Using this simulation library, I also built a simple CPU and implemented a factorial function using its machine language.

parent veexx103 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton