CPUgolf
CPUgolf is an esolang that also has an idea ig made by User:Yetyetty1234567890.
The idea
CPUgolf is an esolang to accompany an idea for something similar to codegolfing. However, instead of trying to write small programs, we are writing small cpu architectures, with restrictions, to make it interesting. The rules are simple: the CPU has a RAM, that can have an indefinite size. The bus width for the ram will contain:
- a read/write bit
- a clock bit
- an n-bit address
- a data bus
CPU size is measured in transistor count.
The esolang
The only transistor in this system is NAND. Each NAND has an ID and takes in two IDs. Each transistor takes up one line, and labels can be used. Labels can be contained within "blocks", (written with curly brackets) which simply mean if the label is used within a block it is for the other instance of that label in the block. Higher level labels can be used for lower level blocks. For example,
{r1 b} b: r2 r3
is a valid expression. The ID of a transistor is it's position relative to the current block. For example, in the expression r1 r2 {r3 r4 r5 r6}
, the transistor r1 r2 is ID 1, the transistor r3 r4 is also ID 1 (because it is the first transistor in the block) and the transistor r5 r6 would be ID 2. The first line of the file specifies the RAM's address width and bus sizes. Note that a register with 3 values means that the last value points to a RAM wire. For example: 1 2 r1
would mean the transistor is connected to the read/write bit of RAM.
,p
i will rewirite