Binary Numbers, Bits, and Two’s Complement (LEGv8)
1. Numbers in Computers
- Humans use base 10 (decimal). Computers use base 2 (binary) because hardware naturally has two states (high/low, on/off, true/false, 1/0).
- Binary digit (bit): The “atom” of computing; one of two possible values (0 or 1).
2. Value of a Digit in Any Base
For any base bbb, the value of the ithi^\text{th}ith digit ddd is:
value = d_i × b^i
where iii starts at 0 at the rightmost digit.
Binary example: 1011₂ → decimal
1×23+0×22+1×21+1×20=8+0+2+1=11101×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8+0+2+1 = 11₁₀1×23+0×22+1×21+1×20=8+0+2+1=1110
(Insert figure: binary 1011 → decimal 11)

3. Bit Numbering in LEGv8 Doubleword
- A doubleword is 64 bits wide.
- Bits are numbered 0 (least significant bit) to 63 (most significant bit).
- Least Significant Bit (LSB): Rightmost bit (bit 0).
- Most Significant Bit (MSB): Leftmost bit (bit 63).