☰
d2jsp
Rules
Help
Forum Gold FAQ
Live Streams
Photo Gallery
Hourly Raffle
Ladder Slasher
Log In
Register
Log In
Register
Account Recovery
Resend Validation Email
d2jsp Forums
>
Off-Topic
>
Computers & IT
>
Programming & Development
> Signed Endian Conversion > Seeking Some Help
Add Reply
New Topic
New Poll
Views: 169
Replies: 2
Track Topic
Dob
Member
Posts: 4,917
Joined: Mar 18 2003
Gold
:
5,692.75
#1
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
Dob
Member
Posts: 4,917
Joined: Mar 18 2003
Gold
:
5,692.75
#2
Dec 9 2012 03:44pm
from big to little endian ofc
carteblanche
Member
Posts: 32,925
Joined: Jul 23 2006
Gold
:
3,804.50
#3
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
© 2003-2026 d2jsp
Contact