I am trying to write a program that either zero extends or sign extends a 16 bit input to a 32 bit output, what exactly is meant by sign extending a number? I believe zero extending would be adding 16 0s in the 16 Most Significant bits, Is sign extending just keeping the most significant bit as the sign?
kinger29 0 Light Poster
shrughes 19 Light Poster
kinger29 commented: Thank you +1
ssDimensionss 0 Newbie Poster
thoughtcoder 167 Junior Poster
ssDimensionss 0 Newbie Poster
trololo 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.