Re: Programmable computer
Posted: January 29th, 2017, 2:55 pm
So the second prime printer calculates all primes up to 223?
Code: Select all
write a 1
print a
add a a b
xor a b a
goto 1
Yes, and after that it gets confused by arithmetic overflow and claims all odd numbers from 229 to 255 are prime numbers...gameoflifemaniac wrote:So the second prime printer calculates all primes up to 223?
Code: Select all
#include <stdlib.h>
#include <stdio.h>
#define u8 unsigned char
int main (void)
{
int ic = 0;
u8 a = 0;
u8 b = 0;
u8 c = 0;
u8 d = 0;
u8 e = 0;
u8 f = 0;
u8 g = 0;
L00: ic++; f = 224;
L01: ic++; g = 2;
L02: ic++; a = 5;
L03: ic++; b = 3;
L04: ic++; c = 0;
L05: ic++; e = ~a;
L06: ic++; e++;
L07: ic++; d = b + e;
L08: ic++; c++;
L09: ic++; d = d + b;
L10: ic++; e = d & f;
L11: ic++; if (e != 0) goto L13;
L12: ic++; goto L14;
L13: ic++; goto L08;
L14: ic++; if (d != 0) goto L16;
L15: ic++; goto L24;
L16: ic++; e = ~c;
L17: ic++; e = b + e;
L18: ic++; e = (e & 0x80 ? 0xff : 0x00);
L19: ic++; if (e != 0) goto L21;
L20: ic++; goto L23;
L21: ic++; b = b + g;
L22: ic++; goto L04;
L23: ic++; printf ("%3d, ic = %5d\n", a, ic);
L24: ic++; a = a + g;
if (a < 5) return 0;
L25: ic++; goto L03;
return 0;
}
Due to past experiences with links to online resources evaporating over time, my instinct is to put a copy of this very nice document somewhere that's likely to remain accessible (and be backed up). Right here seems good -- PDF format:Coban wrote: ↑March 10th, 2017, 5:26 pmHi,
I made an english document that summarizes the functioning of my in-game computer:
https://drive.google.com/open?id=0B-4kR ... UJZWTlOMTg
Thanks! I've added a link to the repo in the new LifeWiki article, which is kind of a placeholder for the moment but at least it's a start.Coban wrote: ↑October 30th, 2019, 11:15 amActually there is also a Github repo :
https://github.com/nicolasloizeau/gol-computer
Code: Select all
x = 84, y = 269, rule = B3/S23
33bo$32bobo$32bobo$30b3ob2o$29bo$30b3ob2o$32bob2o3$27b2o$28bo$28bobo$
18bo10b2o$16b3o$15bo$15b2o$2o48b2o$bo48b2o$bob2o$2bo2bo7bo15bo$3b2o10b
o13bo$13b2o3b2o9b3o$18b2o11bo4$27bo3b2o$26bobo3bo$25bobo3bo$21b2obobo
3bo$21b2obo2b4obo$25bobo3bobo7b2o$21b2ob2o2bo2bobo7b2o$22bobo2b2o3bo$
10b2o10bobo$10b2o11bo6$82b2o$81bo$82bo32$33bo$32bobo$32bobo$30b3ob2o$
29bo$30b3ob2o$32bob2o3$27b2o$28bo$28bobo$18bo10b2o$16b3o$15bo$15b2o$2o
48b2o$bo48b2o$bob2o$2bo2bo7bo15bo$3b2o9b2o13bo$13b2o3b2o9b3o$18b2o11bo
4$27bo3b2o$26bobo3bo$25bobo3bo$21b2obobo3bo$21b2obo2b4obo$25bobo3bobo
7b2o$21b2ob2o2bo2bobo7b2o$22bobo2b2o3bo$10b2o10bobo$10b2o11bo6$82b2o$
81bo$82bo32$33bo$32bobo$32bobo$30b3ob2o$29bo$30b3ob2o$32bob2o3$27b2o$
28bo$28bobo$18bo10b2o$16b3o$15bo$15b2o$2o48b2o$bo48b2o$bob2o$2bo2bo7bo
15bo$3b2o10bo13bo$13b2o3b2o9b3o$18b2o11bo4$27bo3b2o$26bobo3bo$25bobo3b
o$21b2obobo3bo$21b2obo2b4obo$25bobo3bobo7b2o$21b2ob2o2bo2bobo7b2o$22bo
bo2b2o3bo$10b2o10bobo$10b2o11bo6$81b3o$81bo$82bo32$33bo$32bobo$32bobo$
30b3ob2o$29bo$30b3ob2o$32bob2o3$27b2o$28bo$28bobo$18bo10b2o$16b3o$15bo
$15b2o$2o48b2o$bo48b2o$bob2o$2bo2bo7bo15bo$3b2o9b2o13bo$13b2o3b2o9b3o$
18b2o11bo4$27bo3b2o$26bobo3bo$25bobo3bo$21b2obobo3bo$21b2obo2b4obo$25b
obo3bobo7b2o$21b2ob2o2bo2bobo7b2o$22bobo2b2o3bo$10b2o10bobo$10b2o11bo
6$81b3o$81bo$82bo!
That one has been around for a decade or so -- back when forum message numbers were in the low triple digits. See also here for simeks' links to alternate XOR mechanisms (including this one).