Thread: Simplifying Bits shifts in Eclipse

Results 1 to 9 of 9
  1. #1 Simplifying Bits shifts in Eclipse 
    Renown Programmer and Respected Member
    Maxi's Avatar
    Join Date
    Jun 2008
    Posts
    3,197
    Thanks given
    281
    Thanks received
    1,095
    Rep Power
    1366
    In Eclipse make a new class file and add this into it, it is very simple so you will have to put the shift in there yourself but you can repeat it with no problem unlike browns simplifying program.

    Code:
    public class Simplify {
    
    	public static void main(String[] args) {
    		/*
    		 * Replace the shift with the one you want to simplify
    		 * Replace the bytes to the amount of bytes being shifted
    		 */
    		int shift = -962490744;
    		int bytes = 2;
    		int bits = bytes * 8;
    		int result = shift % bits;
    		System.out.println(result);
    	}
    
    }
    The result gets printed onto your console.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Kelvin's Avatar
    Join Date
    Jun 2007
    Posts
    1,433
    Thanks given
    48
    Thanks received
    33
    Rep Power
    269
    better go to google type: bytesToShift % 32/64
    Reply With Quote  
     

  3. #3  
    Renown Programmer and Respected Member
    Maxi's Avatar
    Join Date
    Jun 2008
    Posts
    3,197
    Thanks given
    281
    Thanks received
    1,095
    Rep Power
    1366
    Hows 533 going?
    Reply With Quote  
     

  4. #4  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,746
    Thanks given
    354
    Thanks received
    1,370
    Rep Power
    3032
    Quote Originally Posted by Kelvin View Post
    better go to google type: bytesToShift % 32/64
    rep++
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Apr 2008
    Posts
    794
    Thanks given
    1
    Thanks received
    5
    Rep Power
    126
    or you can use your brain b4 u loose it
    Reply With Quote  
     

  6. #6  
    Brown
    Guest
    Quote Originally Posted by Kelvin View Post
    better go to google type: bytesToShift % 32/64
    Lol, no shit?
    Before I knew of the remainer, and the basics of java, I used quite a while writing a small program to simplify them .
    Reply With Quote  
     

  7. #7  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,871
    Thanks given
    1,854
    Thanks received
    4,745
    Rep Power
    5000
    Quote Originally Posted by kelvin View Post
    better go to google type: Bytestoshift % 32/64
    +1 .

    Attached image

    Reply With Quote  
     

  8. #8  
    Renown Programmer
    veer's Avatar
    Join Date
    Nov 2007
    Posts
    3,746
    Thanks given
    354
    Thanks received
    1,370
    Rep Power
    3032
    Quote Originally Posted by S Quare Quxx View Post
    +1 .
    -1 for false quote
    Reply With Quote  
     

  9. #9  
    Renown Programmer and Respected Member
    Maxi's Avatar
    Join Date
    Jun 2008
    Posts
    3,197
    Thanks given
    281
    Thanks received
    1,095
    Rep Power
    1366
    Am I missing the point of fun here?
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •