Can any implement it on following ?

101101

101101

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+19 votes

Sign extension is a step in

- floating point multiplication
- signed $16$ bit integer addition
- arithmetic left shift
- converting a signed integer from one size to another

+1

in which size do you want change this ?

0110 i want to extend this to 8 bit

as it is sign o so positive number 00000110

if it will be like 1110 then its sign 1 so its -ve number in 1's complement number it will be 10000110... just shift sign bit to msb of extended form ...

and in 2's number representation it will 11111110 ... as 2's complement is weighted ..so simply write sign bit in all places from msb to extra bit in extended form

0110 i want to extend this to 8 bit

as it is sign o so positive number 00000110

if it will be like 1110 then its sign 1 so its -ve number in 1's complement number it will be 10000110... just shift sign bit to msb of extended form ...

and in 2's number representation it will 11111110 ... as 2's complement is weighted ..so simply write sign bit in all places from msb to extra bit in extended form

+20 votes

Best answer

0

@ rajoramanoj, only increasing the number of bits is not enough along with it we also have to maintain the sign of number.

- All categories
- General Aptitude 1.4k
- Engineering Mathematics 5.9k
- Digital Logic 2.3k
- Programming & DS 4.2k
- Algorithms 3.7k
- Theory of Computation 4.6k
- Compiler Design 1.7k
- Databases 3.4k
- CO & Architecture 2.9k
- Computer Networks 3.4k
- Non GATE 1.2k
- Others 1.3k
- Admissions 506
- Exam Queries 482
- Tier 1 Placement Questions 22
- Job Queries 64
- Projects 15

40,871 questions

47,532 answers

146,043 comments

62,298 users