The Gateway to Computer Science Excellence

0 votes

(a) Assume the integers below are 1’s complement integers. Find the 1’s complement

of each number, and give the decimal values of the original number and of

its complement.

(i) 0000000 (ii) 1111111 (iii) 00110011 (iv) 1000000

(b) Repeat part (a) assuming the numbers are 2’s complement numbers and finding

the 2’s complement of them.

of each number, and give the decimal values of the original number and of

its complement.

(i) 0000000 (ii) 1111111 (iii) 00110011 (iv) 1000000

(b) Repeat part (a) assuming the numbers are 2’s complement numbers and finding

the 2’s complement of them.

0 votes

read https://gateoverflow.in/209179/self-doubt?show=218459#a218459 before reading further

Assume the integers below are 1’s complement integers.

i) 0000000 -----> MSB bit is 0 ==> positive number

decimal value of original number = 0

1's complement of given number is = 1111111 , Note that this is belongs to 1's complement representation, So it's decimal equivalent is -0.

(ii) 1111111 -----> MSB bit is 1 ==> negative number

decimal value of original number = -0

1's complement of given number is = 0000000 , Note that this is belongs to 1's complement representation, So it's decimal equivalent is 0.

(iii) 00110011 -----> MSB bit is 0 ==> positive number

decimal value of original number = 51

1's complement of given number is = 11001100 , Note that this is belongs to 1's complement representation, So it's decimal equivalent is -51.

(iv) 1000000 -----> MSB bit is 1 ==> negative number

decimal value of original number = -111111 = -63

1's complement of given number is = 0111111 , Note that this is belongs to 1's complement representation, So it's decimal equivalent is 63.

hope you can do for part b :)

- All categories
- General Aptitude 1.9k
- Engineering Mathematics 7.5k
- Digital Logic 2.9k
- Programming and DS 4.9k
- Algorithms 4.4k
- Theory of Computation 6.2k
- Compiler Design 2.1k
- Databases 4.1k
- CO and Architecture 3.4k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.4k
- Admissions 595
- Exam Queries 573
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,737 questions

57,391 answers

198,591 comments

105,442 users