100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

Lecture notes Number Representation

Rating
-
Sold
-
Pages
2
Uploaded on
31-08-2023
Written in
2023/2024

It is the second note for Number Representation.

Institution
Course








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Study Level
Examinator
Subject
Unit

Document information

Uploaded on
August 31, 2023
Number of pages
2
Written in
2023/2024
Type
Class notes
Professor(s)
Zafar ali khan
Contains
All classes

Subjects

Content preview

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]
$23.63
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
nafizatasnim

Get to know the seller

Seller avatar
nafizatasnim University of East London
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
2 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions