Comments: I forgot how fun maths can be

OK, Daniel. You sucked me in.

x = (y + M) mod 256

where y is the number of bytes and M is the answer to Life, The Universe and Everything (i.e. 42).

Posted by Keith Pitty at February 4, 2004 10:14 AM

Oh so close but no cigar. Just a Longbeach menthol for the 42 aspect (that was the pleasant suprise).

Hint. I found it easier to express in code.

Posted by DB at February 4, 2004 10:49 AM

Oops. High school maths was a very long time ago ;) How about:

int x = (int) (y + 42)/256;

Posted by Keith Pitty at February 4, 2004 11:30 AM

Well it took me two goes but I got…

int bit6function (int size)
{
return (int) (size + 42)/256;
}
They say I’m little slow, EH?

Posted by Mick Young at February 4, 2004 01:51 PM

Now do it in ASM.

And when you're done there, you have to write it to an EPROM using a cigarette lighter and a piece of purple celophane...*THEN* you can go out with my sister.


Anyone else having a slow day? :)

Posted by Kris at February 4, 2004 02:48 PM