Question: One's complement representations of integers are used to simplify computer arithmetic. To represent positive and negative integers with absolute value less than 2 n -

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: this bit is 0 for positive integers and 1 for negative integers.
For positive integers, the remaining bits are identical to the binary representation of the integer. Thus using 4 bits, the One's complement representation of 5 is 0101.
For negative integers, the remaining bits are found by first finding the binary representation of the absolute value of the integer and then taking the complement of each of these bits in the binary representation. (Thus 1's and 0's get switched)
Thus for example using 4 bits, the One's complement representation of -5 is 1010, where the initial 1 is to indicate the sign, and the subsequent 010 is the complement of 101 the binary representation of 5.
Find the One's complement representations, using bit strings of length six of the following integers. (Your answers must be bit strings of length 6):
(a)26
(b)31
(c)-27
(d)-29
One's complement representations of integers are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!