I'm new

I know; umm... What I mean by

is that I can easily figure out how to get the binary out of the integer on my own (leading bit is for the sign, the remainder for powers of 2 to make the decimal representation that is shown), but I don't know how more complex data types and structures are converted to binary.

Hmm, do you know about twos complement?

I did a while ago, but now I forget exactly what it is, more specifically than it's something done with binary numbers to make calculations with negatives easier.

After a quick search and reading this, the understanding came back to me: binary numbers in a specific space "reset" when adding to the max (e.g. 1101 -> 1110 -> 1111 -> 0000) and the same backward for subtracting from 0 (e.g. 0010 -> 0001 -> 0000 -> 1111). Two's complement uses those higher numbers (filling the left side with 1's and swapping 1's with 0's) for negatives. If 1's and 0's are swapped and filling the left side with 1's make a negative, then 1111... is -0 and 0000... is +0.

That's ones complement. In twos complement, you flip all the bits and then add 1 to the result, to negate a number.

The reason I brought it up is that the alleged ease of understanding an integer from its bits is actually complicated. Integers are an abstraction over bits, just as much as hash tables or whatever.

One of the big advantages of twos complement is that it doesn't have +0 and -0 as distinct values. (Are they equal? Is +0 larger that -0?) The other advantage is that you can use the same hardware as for unsigned integer addition for twos complement signed integers.

1 Like

OK, I'm new to Snap!, but I've been on Scratch for three years. The only reason why I'm using Snap! now is because I can't access the Scratch website. I was wondering if this is happening to anyone else? I want to go back to Scratch because it's easier to use, and I can also make my own blocks with Scratch, too, if I needed them, so I don't think Snap! is all that great. I was wondering if anyone here knows how to fix the error my computer keeps showing me: DNS_PROBE_FINISHED_NXDOMAIN . And if nobody knows, then please tell me how I can add notes to my projects the way one can on Scratch?

1 Like

I don't know.


  1. click the paper icon

  2. click project notes

Nice icon.

If you haven't misspelled "scratch.mit.edu" then this sounds to me like a cached incorrect DNS entry. (I am guessing; this isn't my field of expertise.) Try (1) go to your browser settings and delete all cache entries (do a web search if you don't know how); (2) reboot your computer; and (3) reboot your router.

Read "Why do we have to learn this baby language?"

were you possibly banned?