GATE Exam  >  GATE Tests  >  Test: Complementary Numbers - GATE MCQ

Test: Complementary Numbers - GATE MCQ


Test Description

10 Questions MCQ Test - Test: Complementary Numbers

Test: Complementary Numbers for GATE 2024 is part of GATE preparation. The Test: Complementary Numbers questions and answers have been prepared according to the GATE exam syllabus.The Test: Complementary Numbers MCQs are made for GATE 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Complementary Numbers below.
Solutions of Test: Complementary Numbers questions in English are available as part of our course for GATE & Test: Complementary Numbers solutions in Hindi for GATE course. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free. Attempt Test: Complementary Numbers | 10 questions in 30 minutes | Mock test for GATE preparation | Free important questions MCQ to study for GATE Exam | Download free PDF with solutions
Test: Complementary Numbers - Question 1

What is 6’s complement of (1543)7 of the computer?

Detailed Solution for Test: Complementary Numbers - Question 1

Steps to find (b-1)’s complement:
Subtract each digit of the number from the largest number in the number system with base b to find the complement of (b-1). Suppose a number is a three-digit number in base 7, then subtract the number from 666, since six is the largest number in base 7's system of numeration That is the complement of (b-1), which is (6's complement).

Procedure:
6666
1543
---------
5123
--------
6’s complement of (1543)7 is = (5123)7
Hence the correct answer is (5123)7.

Test: Complementary Numbers - Question 2

What is the 1’s complement of (10011)2?

Detailed Solution for Test: Complementary Numbers - Question 2

Concept:
1’s complement:

  • 1’s complement simply inverted every bit of input.
  • Can be implemented using only NOT gate for each bit of binary number input.  

Application:
The ones' complement of a binary number is defined as the value obtained by inverting all the bits in the binary representation of the number (swapping 0s for 1s and vice versa).
Hence, 01100 would be the 1's complement of binary 10011.

Note:
Logical complement is the equivalent term used for using 1’s complement as a logical operation. “Negation” used in logic is known as “logical complement”. It is a process that carries one proposition (let us suppose p) to other propositions (not p). Conclusively, it is described as true when p is false and described as false when p is true.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Complementary Numbers - Question 3

The 2's complement of 11011111

Detailed Solution for Test: Complementary Numbers - Question 3

Concept:
1's complement of Binary: 1's complement of a Binary number is defined by the value obtained by inverting all the bit, i.e, 0 as 1 and 1 as 0.
2's complement of Binary: It is the sum of 1's complement of Binary number and 1 to the least significant bit (LSB).
∴ 2's complement = 1's complement + 1 (LSB)

Analysis:
The 1's complement of the given binary digit will be:
11011111 → 00100000
Adding 1 to the above, we get the 2's complement as:
00100000 → 00100001

Test: Complementary Numbers - Question 4

The range of numbers represented by an 8-bit two’s complement representation is

Detailed Solution for Test: Complementary Numbers - Question 4

The range of n bit word in 2’s complement representation is,
(−2n−1)to(2n−1−1)
(n-1) is used here because out of n bits 1 bit is used as a sign bit 
There is one extra negative number because "0" has only a single representation in 2's complement form
For 8 bit word, the range will be -128 to 127. 

Test: Complementary Numbers - Question 5

The 2’s complement of the binary number 1101101 is

Detailed Solution for Test: Complementary Numbers - Question 5

Concept:
1’s complement representation of a binary number is obtained by toggling all the bits, i.e. replacing 1 with 0, and 0 with 1.
2’s complement representation of a binary number is obtained by adding 1 to the 1’s complement representation.

Application:
Given the binary number is 1101101
Taking the 1's complement of the above, we replace all the 1's with 0's and all the 0's with 1's to get:
1's complement of 1101101 = 0010010
Adding 1 to the 1's complement, we get the 2's complement as:
0010010 + 1 = 0010011

Test: Complementary Numbers - Question 6

The 2’s complement of 101101 is

Detailed Solution for Test: Complementary Numbers - Question 6

Concept:
2’s Complement Representation:
1) We can obtain the decimal value of a signed binary number expressed in 2’s complement by inverting each bit i.e. replace 0’s with 1’s and vice-versa and adding 1 to the result.
2) If the number is positive, the sign bit ‘0’ will be there in front of the MSB.
3) If the number is negative, the sign bit ‘1’ will be placed in front of the MSB.

Application:
2’s complement representation of the signed binary number is given as 101101
Here, MSB is 1, which indicates a negative number. The required original number can be obtained by taking the 2's complement of the given binary number, i.e.
1’s complement of 101101 = 010010
010010 + 1 = 010011

Test: Complementary Numbers - Question 7

Representation of (-20)10 in two’s complement form is: 

Detailed Solution for Test: Complementary Numbers - Question 7

Concept:
2’s complement representation:

1) For positive numbers, the 2's complement representation of a number is simply the binary equivalent of the number.
2) For negative numbers, the 2's complement representation is obtained by taking the 2's complement of the binary equivalent of the decimal number.

Analysis:
20 can be represented in binary number system as given below.
20 = 010100
1’s complement = 101011
2’s complement = 1’s complement of the given number + 1
2’s complement = 101011 + 000001 = 101100

Tips and Tricks:
Steps to writing 2’s complement to any binary number:

  • Start from right to left and search for the first ‘1’
  • Write down the bits until that first ‘1’ as it is.
  • Write down the remaining left bits with their respective complement.

Given number is: 010100
2’s complement representation: 101100

Test: Complementary Numbers - Question 8

In an 8 bit two’s complement number system, inversion of all 8 bits occur during code transition

Detailed Solution for Test: Complementary Numbers - Question 8

Concept:
2’s compliment
This comes under the signed number representation.
MSB is for the sign and remaining for magnitude.
Example 2’s complement of the number 1011 is
MSB = 1 so it is negative.
The weights will be 8, 4, 2 and 1
= - 8 + 0 + 2 + 1
= - 5 in decimal

Calculation:
When all 8 bits are 1’s then the value will be – 1 for 2’s complement number
11111111: MSB is 1 so negative number and weights will be 128, 64, 32, 16, 8, 4, 2 and 1
(11111111)2 = - 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1
= - 128 + 127
= (-1)10
The zero is represented by
(00000000)2 in 2’s complement form
So all bits will be changed when transition takes place from – 1 to 0

Test: Complementary Numbers - Question 9

The smallest integer that can be represented by an 8- bit number in 2’s complement form is

Detailed Solution for Test: Complementary Numbers - Question 9
  • The smallest integer that can be represented by an 8- bit number in 2’s complement form is -128.
  • The sign bit is the most important bit.
  • 00000001 is +1, a number which is positive.
  • So, the range of 8-bit complement numbers of two is -128 to 127, since 128 is not representable (it would be 10000000, but the sign bit rule says that would be a negative number).
  • 10000000 is the most negative figure.
  • The leading 1 tells you it is negative, and you flip all the bits (011111111) to get the magnitude of the number, then add one (10000000 = 128).
  • So -128 is the resulting number.
Test: Complementary Numbers - Question 10

What is the largest positive value that can be represented by an 8 bit 2’s complement number

Detailed Solution for Test: Complementary Numbers - Question 10

Two's complement representation, or, in other words, signed notation - the first bit tells about the sign.
The convention is that a number with a leading 1 is negative, while a leading 0 denotes a positive value.
In an 8-bit representation, we can write any number from -128 to 127.
The name comes from the fact that a negative number is a two's complement of a positive one.

Information about Test: Complementary Numbers Page
In this test you can find the Exam questions for Test: Complementary Numbers solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Complementary Numbers, EduRev gives you an ample number of Online tests for practice
Download as PDF