739 B
739 B
lec3
Conceptual things
Until the technical lectures really start, I'll be feeding in a few technical things here and there for the sake of getting used to them.
One's & Two's Complement
Previous lecture went over signedness of numbers so this section won't as much. One's complement in xor(just flip)
xor 0xFF, target
Two's complement proccess:
- Flips bits
- Add 1
The actual term for this is just negate; the other way around is essentially cannon fodder.
Sign Flag
Set whenever we produce (any) number where the leading bit is set(1). Regardless if we're dealing with signed or unsigned data.
If we mess with some data but the sign bit remains the same then our sign flag just stays in its current value.