Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Test: Representation of Signed Numbers - Computer Science Engineering (CSE) MCQ

Test: Representation of Signed Numbers - Computer Science Engineering (CSE) MCQ


Test Description

8 Questions MCQ Test - Test: Representation of Signed Numbers

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

X = 01110 and Y = 11001 are two 5-bit binary numbers represented in two’s complement format. The sum of X and Y represented in two’s complement format using 6 bits is

Detailed Solution for Test: Representation of Signed Numbers - Question 1

To represent a given 5-bit number using 6- bits in a 2's complement representation, we simply copy the MSB bit as it is till we get the required 6 bits, i.e.
X = 01110 = 001110 
Y = 11001 =111001
Ignoring the carry, we get the addition of the two in 2's complement number as:
∴ x + y = 000111

Test: Representation of Signed Numbers - Question 2

The I's complement of the binary number (101100)2 is:

Detailed Solution for Test: Representation of Signed Numbers - Question 2

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.
Calculation:
The 1's complement of the given binary digit will be:
(101100) → (010011)

Additional Information
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)
Shortcut Trick
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.
1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Representation of Signed Numbers - Question 3

Perform the subtraction and represent your answer in 2’s complement form (10010)2 - (10111)2

Detailed Solution for Test: Representation of Signed Numbers - Question 3

Concept:
If number is positive; MSB = 0
Then 2’s complement will be the same
If number is negative; MSB = 1
Then 2’s complement will be different from its obtained result
Calculation:
Given,
(10010)2 - (10111)2
(10010)2 + 2’s complement of (10111)2

i.e. (11011)2 = -[2’s complement of 11011]
= -[00101]
∴ (10010)2 - (10111)2 = -(00101)2

Test: Representation of Signed Numbers - Question 4

Which of the following is the smallest 4-bit negative number stored in its 2's complement representation?

Detailed Solution for Test: Representation of Signed Numbers - Question 4

The smallest negative number is the largest binary value.
1111 is -1, 1110 is -2, 1101 is -3, etc down to 1000 which represents -8.

Important Points
Using two's complement for negative numbers:

  • Find the positive binary value for the negative number you want to represent.
  • Add a 0 to the front of the number, to indicate that it is positive
  • Invertor finds the complement of each bit in the number.
  • Add 1 to this number.

Example:
4 using two's complement numbers,

  • 4 = 100
  • Adding 0 to the front becomes 0100
  • 'inverted' becomes 1011
  • Add 1 = 1100 (-8 + 4 = -4)
Test: Representation of Signed Numbers - Question 5

X = 00110 and Y = 10011 are two binary numbers represented in 2's complement format. The sum of X and Y represented in 2's complement format using 5 bits is _____

Detailed Solution for Test: Representation of Signed Numbers - Question 5

X = 00110
since, the MSB = 0
∴ it is a positive number.
Decimal equivalent: 0 + 1 × 22 + 1 × 21 + 0 × 20 = + 6
Y = 10011
since, the MSB = 1 
∴ it is a negative number,
We need to take the 2's complement of Y, that is.
1's complement (Y) + 1
01100 + 1
⇒ 01101
Decimal equivalent → 0 + 1 × 23 + 1 × 22 + 0 + 1 × 20 → -13
The sum of X and Y is
+6 - 13 = - 7
The 2's complement of - 7
→ 1's complement of 7 + 1
→ 1's complement of 00111 + 1
→ 11000 + 1 → 11001

Test: Representation of Signed Numbers - Question 6

The number of 1’s in the 8-bit unsigned representation of 127 in its 2’s complement form is m and that in 1’s complement form is n. What is the value of m : n?

Detailed Solution for Test: Representation of Signed Numbers - Question 6

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:
(127)10 = (01111111)2
1’s complement representation will be:
1’s complement = 10000000
Number of 1’s is the 1’s complement is, n = 1
Now, the two (2’s) complement representation will be:
2’s complement = 10000000 + 1
= 10000001
Number of 1’s in 2’s complement is, m = 2
∴ The required ratio is m : n = 2 : 1

Test: Representation of Signed Numbers - Question 7

In sign-magnitude numbers

Detailed Solution for Test: Representation of Signed Numbers - Question 7

Signed magnitude representation uses the most significant bit (MSB) a sign bit.

  • If the sign bit is ‘0’ then the number is positive.
  • If the sign bit is ‘1’ then the number is negative.

The remaining bits represent the magnitude of the binary number.
Example:

  • 1000101 represents a negative number as the MSB bit is '1'
  • 0101001 represents a positive number as the MSB bit is '0'

Important Point:

  • 1’s complement representation: It is a representation of a binary number obtained by toggling all bits in it i.e. transforming the 0 bit to 1 and the 1 bit to 0.
  • 2’s complement representation: It is obtained by simply adding 1 to the 1’s complement of that binary number.
Test: Representation of Signed Numbers - Question 8

A register contains a 2’s complement no 10100. Find the value of a register if it is divided by 2

Detailed Solution for Test: Representation of Signed Numbers - Question 8

Given Number is 10100
The Right shift of the content in register is same as the content divided by 2 
Apply Right Shift ⇒ 11010       
Operation right shift is equivalent to divided by 2

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

Top Courses for Computer Science Engineering (CSE)

Download as PDF

Top Courses for Computer Science Engineering (CSE)