Computer Science, asked by AkileshBalu1234, 5 months ago

find 1's and 2's compliment for -98 Base 10 ​

Answers

Answered by joshanmcherian
1

Answer:

1’s complement of a binary number is another binary number obtained by toggling all bits in it, i.e., transforming the 0 bit to 1 and the 1 bit to 0.

Examples:

1's complement of "0111" is "1000"

1's complement of "1100" is  "0011"  

2’s complement of a binary number is 1 added to the 1’s complement of the binary number.

Examples:

2's complement of "0111" is  "1001"

2's complement of "1100" is  "0100"

Explanation:

Answered by omsingh909784
1

Explanation:

Given a Binary Number as a string, print its 1’s and 2’s complements.

1’s complement of a binary number is another binary number obtained by toggling all bits in it, i.e., transforming the 0 bit to 1 and the 1 bit to 0.

Examples:

1's complement of "0111" is "1000"

1's complement of "1100" is "0011"

2’s complement of a binary number is 1 added to the 1’s complement of the binary number.

Examples:

2's complement of "0111" is "1001"

2's complement of "1100" is "0100"

Similar questions