This is not about sinus cardinalis

MAJOR CHANGE CORRECTION

printf("%x \n",0x1212 ^ j);

Which compiles to (ATT syntax( register destination second)):

400464: 35 12 12 00 00 xor $0x1212,%eax

I have no idea why I never encountered this , but XOR does have a shortcut in 'C'. This means I am stupid, and that also means I am smarter now. I know that I will always live on that boundary so long as I continue to learn new things. C99 is going to be interesting too, as I actually avoid that syntax, and I probably should enter the new millennium and accept that. This could also cause "demons to fly out of your nose".

I was doing some Fourier shit as per the last post and ceiling() and floor() and ℜ analysis and ⅈ and it occurred to me that I had not used XOR in any of my 'C' code until now and I did not know how to write it.

(a || b) && !(a && b)

Now this is what I come up with and that makes sense in a set of gates connect like an 'and gate' with two inputs that are 'or of a b' and the other is 'not of logical and'. In English that is "If 'a' or 'b' are 1 then the result is 1, unless both 'a' and 'b' are 1, then it is 0. This is pretty much the definition of add without carry.

To make a long story even more boring and odd, I wondered how gcc compiled the above quoted code. So.......

0000000000400523 : 400523: 55 push %rbp 400524: 48 89 e5 mov %rsp,%rbp 400527: 89 7d fc mov %edi,-0x4(%rbp) 40052a: 89 75 f8 mov %esi,-0x8(%rbp) 40052d: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) 400531: 75 06 jne 400539 400533: 83 7d f8 00 cmpl $0x0,-0x8(%rbp) 400537: 74 15 je 40054e 400539: 83 7d fc 00 cmpl $0x0,-0x4(%rbp) 40053d: 74 06 je 400545 40053f: 83 7d f8 00 cmpl $0x0,-0x8(%rbp) 400543: 75 09 jne 40054e 400545: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%rbp) 40054c: eb 07 jmp 400555 40054e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%rbp) 400555: 8b 45 f4 mov -0xc(%rbp),%eax 400558: c9 leaveq 400559: c3 retq 40055a: 90 nop

I am pretty sure this is not effecient and this might be a case where I get jicky with __asm__ and just @ebp+c->R xor with @ebp+c+sizeof(int) and save as @ebp+c+2*sizeof(int) or more like just straight line the code as eax=v1 xor v2 mov v3,eax.. I will have to look into this some more as it seems odd that an xor function is not included in the same way as || &&. Every processor must be able to add and perhaps add and mask is better. Like (a+b) && 0x1. That becomes:

400520: 8b 45 f8 mov -0x8(%rbp),%eax 400523: 03 45 fc add -0x4(%rbp),%eax 400526: 85 c0 test %eax,%eax 400528: 0f 95 c0 setne %al 40052b: 0f b6 c0 movzbl %al,%eax 40052e: 89 45 f4 mov %eax,-0xc(%rbp) 400531: b8 00 00 00 00 mov $0x0,%eax

It is interesting because of my background in asm. but I bet this is actually faster, because of the instruction Q. ""add -0x4(%rbp),%eax"" this is the add and then it gets jicky with the logic. These guys are really tricky, they are definitely MOTU or at least MOTKU. (known)

If I were doing it from my OS I would probably just straight line "xor eax,eax;loop: xor al,1;jmp loop;" rinse and repeat until the universe dissolves.

Don't ask how ℜ analysis and ⅈ analysis is going as it gets far more complex before it gets simpler. I do think that a fundamental misconception about the nature of space and dimensionality and therefore vectors, normals, surfaces, and other topologically real things are viewed in a light that makes them far more complex( ⅈ pun intended) than need be, perhaps less complex and more confusing is a better analogy.

I wonder ;"Is a pun about imaginary numbers real?"

0 comments:

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen