Computer Science, asked by Abhiramalayil5496, 1 year ago

Find 1’s Complement and 2’s Complement for the following Decimal number
a) -98 b) -135

Answers

Answered by jeehelper
13
1's complement for a) is 10011101

2's complement for a) is 10011110


1's complement for b) is 101111000

2's complement for a) is 101111001

A brief introduction to 1's and 2's complement calculation:

Two's complement is the way every computer that I know of chooses to represent integers. To get the two's complement negative notation of an integer, you write out the number in binary. You then invert the digits (1's complement), and add one to the result.
Suppose we're working with 8 bit quantities and suppose we want to find how -28 would be expressed in two's complement notation. First we write out 28 in binary form.
00011100Then we invert the digits. 0 becomes 1, 1 becomes 0.
11100011Then we add 1.
11100100That is how one would write -28 in 8 bit binary.
Answered by aqibkincsem
17
The decimal counting system makes use of the base of numbering system where each of the digit in the number takes on one of the ten values known as digits from 0 to 9 eg (213)10.

The 1's complement of

(a) -98 is -1100010 and 2's complement remains at 1111111110011110.

The 1's complement of

(b) -135 is -10000111 and 2's complement remains at 1111111101111001.
Similar questions