d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Signed Endian Conversion > Seeking Some Help
Add Reply New Topic New Poll
Member
Posts: 4,917
Joined: Mar 18 2003
Gold: 5,692.75
Dec 9 2012 02:51pm
Trying to figure out how to approach converting signed endian numbers in java without using the built in functions or using bitwise/shift operators. I know it is possible but the math operations ive tried have not worked. Post or pm if you know a way - I will compensate you for your time. Thanks
Member
Posts: 4,917
Joined: Mar 18 2003
Gold: 5,692.75
Dec 9 2012 03:44pm
from big to little endian ofc
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Dec 9 2012 05:25pm
I assume you dont have an array/string to do it on. so you basically wanna use arithmetic operators (+ - / *) instead of bitwise?

most straight forward way is to write a function that does each of the bitwise functions, find the solution using bitwise functions, then use the functions you wrote

http://stackoverflow.com/questions/2982729/is-it-possible-to-implement-bitwise-operators-using-integer-arithmetic

of course, there might be more efficient ways to do it. but this should make it happen

This post was edited by carteblanche on Dec 9 2012 05:29pm
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll