Jump to content
Sign in to follow this  
Random Terrain

Ran out of bits. Maybe I can grab a bit 7?

Recommended Posts

I found out that I need one more bit, but I used all of the ones I had available. If I can find a variable that doesn't go anywhere near 128, can I use bit 7 without any problems?

 

Edit:

 

I should probably mention that I know I'll have to ignore that bit. Would it make adding and subtracting a pain? Below is my guess.

 

If I want to know the value of a, I'd do this:

 

temp5 = a & %01111111

 

But I should be able to add and subtract the normal way as long as I don't go below 0 or over 127, right?

Edited by Random Terrain

Share this post


Link to post
Share on other sites

I tried it and it seems to be working fine. Unless there is a hidden problem I don't know about, this looks like a good way to grab some free bits without screwing things up.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...