Q BgQuestion:

Scholar
Karma Points: 208
Respect (86%):
posted by  StrickerXY on 10/3/2008 12:03:55 PM  |  status: Live  

number theory

Course Textbook Chapter Problem
Discrete Math Discrete mathematics and its applications, sixth edition, kenneth rosen N/A N/A
Question Details:

Here’s another way we can represent an integer…

One’s complement representations of integers are used to simplify computer arithmetic. To represent

positive and negative integers with absolute value less than 2n-1, a total of n bits is used. The leftmost

bit is used to represent the sign. A 0 bit in this position is used for positive integers, and a 1 bit in this

position is used for negative integers. For positive integers the remaining bits are identical to the

binary expansion of the integer. For negative integers, the remaining bits are obtained by first finding

the binary expansion of the absolute value of the integer, and then taking the complement of each of

these bits, where the complement of a 1 is a 0 and a 0 is a 1.

Find the one’s complement, using bit strings of length eight, of the following integers:

a. 29

c. -131

Bonus Point Alert! Earn +4 additional karma points for helping this annual member.

AAnswers:

Answer Question
Guru
Karma Points: 1,726
posted by Nischal.S. on 10/3/2008 12:14:50 PM  |  status: Live
Asker's Rating: Lifesaver   
StrickerXY's comment:
"you are amazing"
Response Details:
a) 29 is a positive no. hence one's complement representation is same as the binary representation
Observe that 29 = 16+8+4+1
Hence the binary representation of 29 = 11101
=one's complement representation of 29

c)-131
131 = 128+ 4+ 1 = 2^7 + 2^2 + 2 ^0
∴binary representation of 131 = 10000101;
Hence, ones complement representation of -131 = 01111010;

Nischal. S.
Sage
Karma Points: 5,754
posted by rapunzel on 10/3/2008 1:56:00 PM  |  status: Live
Asker's Rating: Helpful   
Response Details:
He may be amazing but 128 + 4 + 1 is not 131 
 128 + 4 + 1 = 133
 
 
Good Luck!
Answer Question
Ask New Question

Join Cramster's Community

Cramster.com brings together students, educators and subject enthusiasts in an online study community. With around-the-clock expert help and a community of over 100,000 knowledgeable members, you can find the help you need, whenever you need it. Join for free today » How Cramster is different than tutoring »