// image uploading within the post didnt work, so I linked the image in imgur
Hi
Okay, writing it for the second time since my internet decided to troll me and sorta give up while I was uploading the blog, so Ill keep it shorter.
deadfish is an esolang created by J. T. Skinner. It is unique by how simple it is - it has only four instructions operating on a single register - i for incrementing it, d for decrementing it, s for squaring it and o for outputting it. It has no redundant stuff like conditionals, memory and bloat like that (via esolang wiki).
Thanks to its simplicity, it has been implemented in many programming languages - from the common ones like C or Python, to more exotic ones, like brainfuck or mcfunction. What I have not seen, however, is it being implemented on hardware, with logic gates and stuff. So I took up the challenge myself.
Kinda.. as any esolang, the specifications are a bit.. exotic. Notably, the register doesnt normally overflow when subtracted from zero, but it rather stays at zero. More notably, the author wanted to cap the register at 255, but he kinda failed, so the register resets only when value is EXACTLY 256, like if you have 255 in register and the next instruction is i. However, you can like square the register at 17 and get 289. As you can see, implementing this would be a pain in the arse, so I just decided to omit those 2 criteria - i think they call it intuitive implementation.
Okay, so what I have so far.. I have made a design circuit in logisim (via my github) and started building. I have made the output register, the register in the top left corner with the connected LEDs
I used two 74ls75 D latches to build the register and random LEDs I found somewhere for the display. The NAND is there for if I wanted to add clock. I am currently working on the "ALU", but Ill keep you informed on that in other posts. So, I hope my tired rambling at quarter past eleven on friday evening made some sense, take care and have a nice day <3
Picture of the register: https://imgur.com/a/tfjAmkK
Comments
Displaying 0 of 0 comments ( View all | Add Comment )