You are viewing a single comment's thread.

view the rest of the comments →

0
1

[–] VIP740 0 points 1 point (+1|-0) ago 

LOL! OK so the computer represents everything with ones and zeros. You have ASCII characters like 'A'=01000001, and '0'=00110000. It's easy to represent positive integers. So in one byte we could store 256 values, which could be interpreted as 0 - 255: 00000000, 00000001, 00000010, 00000011, 00000100... But what if we need to store negative numbers? Well if we add one to 255 (11111111), each digit carries over, leaving eight zeros and a carry that flies off into never never land. So 11111111 can be interpreted as 255, or -1. To change the sign of a binary number you can first not each bit (change zeros to ones and ones to zeroes), and add 1 to the result. Floating point numbers can have fractional values. It's called floating point because we have a section of bits that changes the location of the decimal. Lets say we have four digits and a point to represent a decimal number, like 4329. We could change the size of our numbers by moving the decimal: 4329, 432.9, 43.29, 4.329, .4329. The computer does something like that in binary. The position of the point is determined by the first few bits, and the other bits are interpreted as being multiplied by that power of 2.

0
0

[–] Opieswife ago 

This is interesting. I get the part about changing the size of the numbers by moving the decimal, I guess I didn't realize what this was called. I learned some binary when I got into networking. I can visualize and count using binary and I totally enjoyed subnetting when we got to that lesson but we never talked about or touched on negatives.

I also enjoyed it when we counted with other bases, hex was a fun topic but I imagine there is still much to learn and we likely barely scratched the surface. I wish there were lessons on these things when I was in school. Maybe there were and I was just in the wrong class.

At some point hopefully I will have time to go back to school and work my way up starting with a review of the fundamentals to what are clearly more interesting topics that I missed.