Megalith
Well-known member
- Joined
- Aug 21, 2006
- Messages
- 66
- Programming Experience
- 10+
I need to do a simple routine that a processor would handle easily. is there a way to incorporate such a feat in VB.NET. say i want to mirror image the number 73. this is a task done easily on a processor i.e.
75 in binary is 01001011 (8 bits) the mirror is 11010010 (210)
i transfer each bit into a registry one by one
(Shift L) ACC (Shift R)
S 01001011 > 0 > 00000000
1 00100101 > 1 > 00000001
2 00010010 > 1 > 00000011
3 00001001 > 0 > 00000110
4 00000100 > 1 > 00001101
5 00000010 > 0 > 00011010
6 00000001 > 0 > 00110100
7 00000000 > 1 > 01101001
8 00000000 > 0 > 11010010
F 00000000 > > 11010010 = 210
this would be very fast on a processor, how can i do this quickly in VB.NET?
i want to alter the method i have wrote which essentially converts the decimal number into a string then performs a series of substring functions on it while creating a new string with the inverted binary number finally converting this string back to a number which is displayed along with the binary. Yes it works but it takes a considerable number of processor calls to achieve one of the simplest tasks a processor can handle.
i would be prepared to perform this in any language including machine code if i can integrate it into the 2005 IDE. any advice would be appreciated as this conversion is a bottleneck in my application.
75 in binary is 01001011 (8 bits) the mirror is 11010010 (210)
i transfer each bit into a registry one by one
(Shift L) ACC (Shift R)
S 01001011 > 0 > 00000000
1 00100101 > 1 > 00000001
2 00010010 > 1 > 00000011
3 00001001 > 0 > 00000110
4 00000100 > 1 > 00001101
5 00000010 > 0 > 00011010
6 00000001 > 0 > 00110100
7 00000000 > 1 > 01101001
8 00000000 > 0 > 11010010
F 00000000 > > 11010010 = 210
this would be very fast on a processor, how can i do this quickly in VB.NET?
i want to alter the method i have wrote which essentially converts the decimal number into a string then performs a series of substring functions on it while creating a new string with the inverted binary number finally converting this string back to a number which is displayed along with the binary. Yes it works but it takes a considerable number of processor calls to achieve one of the simplest tasks a processor can handle.
i would be prepared to perform this in any language including machine code if i can integrate it into the 2005 IDE. any advice would be appreciated as this conversion is a bottleneck in my application.