Integers are represented as a string of 1's and 0's. The bits (a single one or zero) are weighted by powers of two, so the one on the far right has value 20 or 1, the second is 21 or 2, third is 22 or 4, 4th is 8, 5th is 16, etc. An integer in a modern computer is typically 32 bits long, or 4 bytes (a byte is 8 bits).
Negative numbers are represented in two's complement form, which is a little complicated to explain here, but if you google it there are good websites. The reason that 2's complement form is used versus simpler sign-magnitude are that it makes the math easier for a computer's processor.
Copyright © 2026 eLLeNow.com All Rights Reserved.