3 ms·
Many years ago when I was bored I «designed» a fantasy CPU with 6 (six) bits and only one usable register, the accumulator. I thought why not. The result: 18 b
by _nalply 6y ago
Many years ago when I was bored I «designed» a fantasy CPU with 6 (six) bits and only one usable register, the accumulator. I thought why not. The result:
18 bit address bus
12 bit stack pointer
6 flags zero, negative, carry, overflow, float and user
7 addressing modes accumulator, immediate, absolute, relative, stack, stack without pop, stack special
64 opcodes like NOP, OR, JMP, ROL, STO, ...
I discovered that it is well possible to have a 6 bit CPU but of course this is just a game and probably not useful at all. I wonder whether I would be able to create the circuit for the CPU in a simulator. Probably not even if I omit the floating point handling or only if I dedicated about 10 years of free time. I would need to design a microcode or PLA (like MOS 6502, see https://news.ycombinator.com/item?id=5353198 https://news.ycombinator.com/item?id=5353198) system.
I find it amusing that this is the one CPU where octal base is really the primary way to display numbers.
- tn1 6y agoYou'd be surprised, it may not take quite that long. With something like Chisel you can create that idea with little friction. Plus, it's "just" Scala so if you already know that it's a lot easier than, say, learning Verilog which has a very different syntax.