Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Digital Logic Sim

​A minimalistic digital logic simulator · By Sebastian Lague

How to make a CPU?

A topic by scratch_turbo created 13 days ago Views: 79 Replies: 2
Viewing posts 1 to 3
(+1)

how i do make a simple CPU?

(+2)

yes please. How can we make CPU?

(+1)

You need some basic things, the main ones are: an ALU (Addition and Logic unit) which takes inputs and an "opcode" to do different functions, like add, subtract, sometimes multiply, logic gates like XOR, and comparisons, and a helpful tidbit is flags to sort of describe its output, and you need a RAM (Random Access Memory) Which has memory cells addressable by an address bit, usually 4 bit for this simulator, and ability to either load that slot or write to that slot, and finally program Counter and memory (The built in ROM (Read Only Memory) Usually does the trick for program memory) which loads lines of code sequentially. Also that code is called assembly code, and I personally would rather drink a glass of nails, so try to plan out your code on paper