25 lines
739 B
Markdown
25 lines
739 B
Markdown
# 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:
|
|
1. Flips bits
|
|
2. 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.
|
|
|
|
|