Can any implement it on following ?

101101

101101

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+18 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.3k
- Engineering Mathematics 5.2k
- Digital Logic 2k
- Programming & DS 3.7k
- Algorithms 3.2k
- Theory of Computation 4k
- Compiler Design 1.6k
- Databases 3k
- CO & Architecture 2.6k
- Computer Networks 3k
- Non GATE 1k
- Others 1.3k
- Admissions 486
- Exam Queries 435
- Tier 1 Placement Questions 18
- Job Queries 56
- Projects 9

36,171 questions

43,624 answers

124,025 comments

42,893 users