4/3/2008 CSE 370 Lecture 3 Wrapping up 2’s Complement. Starting Boolean Algebra. Lecture 2 Recap: • Hexadecimal has 16 symbols, Decimal 10, Octal 8, Binary has 2 • Learnt the kung-fu required to switch between bases • Binary in digital systems: • Finite and Fixed word length • How do we decide on a word length for our system? • Log 2 x = No. of bits we will need • What about Negative Numbers? • Sign Magnitude • One’s complement • 2’s complement 4/4/2008 CSE 370: Lecture 3 1 Some Observations about 2’s complement • Range: - 2 N-1 to 2 N-1 -1 • The weird number: most negative number • Trick: Fast way to do 2’s complement 4/4/2008 CSE 370: Lecture 3 2 1
4/3/2008 4/4/2008 CSE 370: Lecture 3 3 4/4/2008 CSE 370: Lecture 3 4 2
4/3/2008 4/4/2008 CSE 370: Lecture 3 5 4/4/2008 CSE 370: Lecture 3 6 3
4/3/2008 4/4/2008 CSE 370: Lecture 3 7 4/4/2008 CSE 370: Lecture 3 8 4
4/3/2008 4/4/2008 CSE 370: Lecture 3 9 4/4/2008 CSE 370: Lecture 3 10 5
4/3/2008 4/4/2008 CSE 370: Lecture 3 11 4/4/2008 CSE 370: Lecture 3 12 6
4/3/2008 4/4/2008 CSE 370: Lecture 3 13 7
Recommend
More recommend