Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

- Powerpoint presentation -negative ... by renjinimaths 561 views
- Fairtrade Bananas by Guillermo Ladines... 110 views
- "Growing Up" by katelanaylor 126 views
- Real Numbers - Decimal Form Of Rati... by Let's Tute 218 views
- Fair trade challenge: bananas by beccom1 638 views
- Adding and subtracting positive and... by citlaly9 315 views

6,409 views

Published on

Representation of Negative Numbers

No Downloads

Total views

6,409

On SlideShare

0

From Embeds

0

Number of Embeds

145

Shares

0

Downloads

86

Comments

0

Likes

1

No embeds

No notes for slide

- 2. Real Numbers & Integers All numbers belong to the set or group called real numbers . Inside the set of real numbers is a set of all positive and negative whole numbers. This set is called integers . Real numbers -4.6 2.46 13.7 Integers 0 -7 5 221 -31 100.052 -52.414 0.0014
- 3. Signed Bit Representation The simplest way of representing a negative number in binary is to use the first bit of the number to represent whether the number is positive or negative: 011 = 3 111 = -3 This is known as signed bit representation. The problem with signed bit representation is that there are 2 values for zero: 000 = 0 100 = -0
- 4. Two’s Complement Representation A better way of representing negative numbers in binary is by using Two’s Complement . Two’s Complement is designed so that: <ul><li>the set of integers show symmetry about zero </li></ul>Binary Decimal 11111101 -3 11111110 -2 11111111 -1 00000000 0 00000001 1 00000010 2 00000011 3
- 5. Two’s Complement Representation Two’s complement is designed so that: <ul><li>adding 1 to any number produces the next number (ignoring carry bits) </li></ul>00000010 + 1 00000011
- 6. Two’s Complement Representation To find the Two’s Complement of a number (it’s opposite sign ): <ul><li>Change all the 1 ’s to 0 and 0 ’s to 1 . </li></ul><ul><li>Add 1. </li></ul>
- 7. Two’s Complement Representation For example, how would -5 be represented using Two’s Complement? 5 = 000000101 <ul><li>Change all the 1 ’s to 0 and 0 ’s to 1 . 11111010 </li></ul><ul><li>Add 1. 11111010 +1 11111011 So -5 as Two’s Complement = 11111011 </li></ul>
- 8. Two’s Complement Representation Example 2 - find the Two’s Complement of how would 88 88 = 01011000 <ul><li>Change all the 1 ’s to 0 and 0 ’s to 1 . 10100111 </li></ul><ul><li>Add 1. 10100111 +1 10101000 So -88 as Two’s Complement = 10101000 </li></ul>
- 9. Range The number of integers which could be stored in one byte (8 bits) is 2 8 = 256 The range of integers which could be stored in one byte (8 bits) using Two’s Complement is -128 to +127 Why does there seem to be one less positive number? There are 255 numbers plus the value 0 . So there are 256 numbers in all.
- 10. Range What range of numbers could be stored in two bytes using twos complement? 2 16 = 65536 The range of integers which could be stored in one byte (8 bits) is -32768 to +32767 This method of representing large numbers is unsuitable because of the increased memory needed to store the large number of bits needed. A solution to this is to use Floating Point Representation .
- 11. Credits Higher Computing – Data Representation – Representation of Negative Numbers Produced by P. Greene and adapted by R. G. Simpson for the City of Edinburgh Council 2004 Adapted by M. Cunningham 2010

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment