#Programming in IC (Logic gates and more)
17 messages ยท Page 1 of 1 (latest)
I have started to craft a system with simple rules to create an algorithm. Obviously there are human manipulations needed in order to execute the programs. But I want to keep it as simple as possible so that the user does not need to do any calculation or understand what is going on except for some simple rules :
- The algorithm is executed from top to bottom (or left right as long as its clear and unambiguous)
- The input of the algorithm is labeled with the words
Input(can have multiple inputs) - The outputs are labeled with the words
Output - The user start at the
Inputand then started combining the words following the flow of the parallel chains of words until it reaches theOutput - They are two exceptions to the chain rule, linked with the two special program instructions
ForkandMerge - When
Mergeis encountered two parallel chains are joined by combining the results of both chains together before continuing the program with the result of theMerge - When
Forkis encountered, the user MUST duplicate the result of the chain and continues the program by following the two parallel chains that start after theFork - The words
MergeForkInputandOutputare keywords to the langage and CANNOT be combined with any other words of the program. - The program must always fully execute from
InputtoOutputwithout failing (i.e. without impossible crafts that would break the chain) as long as the user uses correctInput Inputcan be limited to a finite set : for example binary digits or single latin letters etc- The less computational effort for the user the better. Complexity can be easily measured as a number of steps (
Merge,Forkand combining 2 words all count as 1 step) Preping the input is not a step
I'll start with what I've got so far. I programmed some basic logic gates.
Not Gate : 1 input { 0, 1 }
Or Gate : 2 inputs { 0, 1}
And Gate : 2 inputs {0, 1}
XOR Gate : 2 inputs {0, 1}
NAND Gate : 2 inputs {0, 1}
NOR Gate is easily obtainable combining NOT and OR
This a simple 1-digit binary adder with a 2-digit binary output for the carry :
I'm working on a multi digit binary adder. I limited myself to inputs of 0 and 1 but this is obviously not mandatory. What do you think of it ? Do you guys have any ideas/suggestions/chalenges ?
I've got nothing useful to add, I just want to say this is terrifying (in a great way), godspeed
Honestly it was easier than i expected for first tests by hand. I bruteforced combinations until I got something that was going in the right direction ! I'll see if i can keep this method for harder problems, not sure ! ๐
idk how far u gonna go
but instead of 0100 1001 1010 0011
probs use Base 16 + Of + (name/number)
that way u got something to send
Make the logic inn base 16 ? could be a nice challenge
idk man, its just a wild idea
also check out wether theres something worth to use in thr logic gates
The thing is : because its IA. It's not straightforward that a word that would be logic to use in "real life" will work well here ! In Base 16 the difficulty is that there are more states to check. But that's a nice challenge