40 likes | 72 Views
1. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. One’s Compliment. Basic Data Types. In Binary, the negative of a number is the opposite of that number. The opposite of the number 8 :. Would be:. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 0. 1. 1. 1.
E N D
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 One’s Compliment Basic Data Types In Binary, the negative of a number is the opposite of that number. The opposite of the number 8: Would be: 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 The process is called Complimenting (One’s Compliment, to be precise) Now, if we add the two numbers (8 + -8) together:
0 1 1 0 0 1 1 0 0 0 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 0 1 0 8 Basic Data Types + -8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Notice that the left-most bit is negative, meaning the number is negative Negative??? 8 plus -8 Yields a negative number??? On some machines, that is possible.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 IF the left-most bit is negative, then to determine the value, the remaining 15-bits must be complimentedin order to determine the true value: Basic Data Types Number: Compliment: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Meaning that the actual value is -0 Negative Zero??? As noted before, on some machines, this is possible. This process is called One’s Compliment.
This Concludes The Slides for this Section Choose an Option: Repeat Slides for this Section Go To Next Set of Slides For this Chapter Go To Slide Index For Chapter 2 Go To Slide Index For Chapter 3 Go To Slide Index For Textbook Go To Home Page