Operations on bytes in C#
Posted
by
Hooch
on Stack Overflow
See other posts from Stack Overflow
or by Hooch
Published on 2011-01-07T23:32:12Z
Indexed on
2011/01/07
23:54 UTC
Read the original article
Hit count: 238
Hello. I'm writing application to control LEDS on LPT. I have everything working except this. This is one small function.
I have sth like that:
I want to build function that will take two argument and return one number: In actual code those binary numers will be in hex. I put them there like that so that it's easier for you to visualize it.
Example1:
arg1 = 1100 1100
arg2 = 1001 0001
retu = 0100 1100
Example2:
arg1 = 1111 1111
arg2 = 0001 0010
retu = 1110 1101
Example3:
arg1 = 1111 0000
arg2 = 0010 0010
retu = 1101 0000
I have no idea how this function should look like. I want it to be as fast as possible.
I'll call this function 200 times per second.
© Stack Overflow or respective owner