CSE 120 Lecture Notes - Lecture 8: Signed Number Representations, Binary Number

106 views3 pages
CSE 120 Lecture Eight Notes - 2’s Complement Representation, 2’s Complement
Arithmetic
2’s Complement Representation
Mathematical operation on binary numbers
Computing as a method of signed number representation
2’s complement of an N-bit number is defined as its complement with respect to 2𝑁
Example:
Three bit number 010
Two’s complement is 110 because 010 + 110 = 1000
Most common method of representing integers
Arithmetic in 2’s complement is the same as unsigned binary numbers
Simpler to implement
Way to take another complement
Take its one’s complement and add one
2𝑁 − 1
Special Numbers to note
Decimal
2’s Complement
127
0111 1111
64
0100 0000
1
0000 0001
0
0000 0000
-1
1111 1111
-64
1100 0000
-127
1000 0001
-128
1000 0000
2’s Complement Arithmetic
Unlock document

This preview shows page 1 of the document.
Unlock all 3 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents