100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Lecture notes Number Representation $22.62   Add to cart

Class notes

Lecture notes Number Representation

 28 views  0 purchase
  • Course
  • Institution

It is the second note for Number Representation.

Preview 1 out of 2  pages

  • August 31, 2023
  • 2
  • 2023/2024
  • Class notes
  • Zafar ali khan
  • All classes
avatar-seller
Binary Representation
Advantages:
 Easy to Read
 Good representation for positive (Unsigned) numbers
Disadvantages:
 Cannot represent negative (Signed) numbers

Sign-Magnitude Representation
Advantages:
 Easy to Read
Disadvantages:
 Two Representatives for Zero
Using our 4-bit Sign-Magnitude example we have,
+0 = 0000
-0 = 1000
 Arithmetic is difficult
Example, lets add Positive 2 to Negative 4, which we expect the answer to be Negative 2.
+2 0010
-4 1100
---- ------
-6 1110
The result is -6, which is not what we expect

Another Example lets add +2 to -2, we expect the answer to be zero
+2 0010
-2 1010
---- -----
1100
The result of -4, which again is not what we expect


Two's Complement Representation
Two's complement is the method computers use to represent Signed numbers.
The most-significant-bit is the sign bit.
 0 = positive value
 1 = negative value
The negative representation of a number is created by
 Start with the positive number
 Flip the bits (Change '0' to '1' and '1' to '0')
 Add the value 1
Advantages:
 One value for Zero.
 Conversion from Positve to Negative and Negative to Positive numbers is easy and consistent.
Example:
+ 2 = 0010
Flip the bits = 1101 and add 1 makes 1110 which is -2

-2 = 1110
Flip the bits = 0001 and add 1 makes 0010 which is +2]

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller nafizatasnim. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $22.62. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

84866 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$22.62
  • (0)
  Add to cart