• edited by
12,813 views
57 57 votes

Sign extension is a step in 

  1. floating point multiplication
  2. signed $16$ bit integer addition
  3. arithmetic left shift
  4. converting a signed integer from one size to another

7 Answers

Best answer
59 59 votes

(D) is the answer. Sign extension (filling the upper bits using the sign bit) is needed while increasing the number of bits for representing a number. For positive numbers, $0$ is extended and for negative numbers $1$ is extended.

• edited by
11 11 votes
It is used if we want to store one register value into another register.

for example if we want to transfer a register value which can store 8 bits into register which can store 16 bits in that case we have

to fill the empty bits in 16 bits register with signed values
11 11 votes

Detailed Video Explanation of Sign Extension in ALL Number Representations: https://youtu.be/dkoaDtyiz9k

$\color{red}{\text{Sign Extension in Various Number Representations:}}$

Consider an n-bit binary number: $a_n a_{n-1} \dots a_1.$ If we want to store/copy this number in $n+r$ bits, then in various number representations, it is carried out in different ways, keeping the number same, with same sign & magnitude.

1. Unsigned Representation:

Pad $r$ $0's$ to the left. So, we get: $000 \dots 0a_n a_{n-1} \dots a_1.$

For example: If $r = 3,$ we get: $000a_n a_{n-1} \dots a_1.$

2. Sign Magnitude Representation:

Keep the MSB same as original binary number i.e. $a_n.$

Pad $r$ $0's$ after the MSB, then the magnitude $a_{n-1} \dots a_1.$.

So, we get: $a_n000 \dots 0a_{n-1} \dots a_1.$

For example: If $r = 3,$ we get: $a_n000a_{n-1} \dots a_1.$

3. 1's Complement Representation:

Copy the MSB $a_n,$ $r$ extra times to the left.

So, we get: $a_na_n \dots a_na_na_{n-1} \dots a_1.$

For example: If $r = 3,$ we get: $a_na_na_na_na_{n-1} \dots a_1.$

4. 2's Complement Representation:

Copy the MSB $a_n,$ $r$ extra times to the left.

So, we get: $a_na_n \dots a_na_na_{n-1} \dots a_1.$

For example: If $r = 3,$ we get: $a_na_na_na_na_{n-1} \dots a_1.$


Detailed Video Explanation of Sign Extension in ALL Number Representations: https://youtu.be/dkoaDtyiz9k


Related Important Lectures:

Range of Binary Numbers in ALL Representations: https://youtu.be/JxK_KfSa4GY

Answer:
Position:
Show:

Related questions

36 36 votes
6 answers 6 answers
14.5k
14.5k views
Kathleen asked Sep 15, 2014
14,478 views
The $2's$ complement representation of the decimal value $-15$ is$1111$$11111$$111111$$10001$
36 36 votes
3 answers 3 answers
8.6k
8.6k views
Kathleen asked Sep 15, 2014
8,645 views
The decimal value $0.25$is equivalent to the binary value $0.1$is equivalent to the binary value $0.01$is equivalent to the binary value $0.00111$cannot be represented pr...
42 42 votes
3 answers 3 answers
15.4k
15.4k views
Kathleen asked Sep 15, 2014
15,378 views
In $2's$ complement addition, overflowis flagged whenever there is carry from sign bit additioncannot occur when a positive value is added to a negative valueis flagged w...
47 47 votes
4 answers 4 answers
21.0k
21.0k views
Kathleen asked Sep 15, 2014
21,018 views
Consider the following $32\text{-bit}$ floating-point representation scheme as shown in the format below. A value is specified by $3$ fields, a one bit sign field (with $...