Question: please write a full method that also works for negative numbers . can't use any inbuild fucntions or data structure icludeing pareseint , getnumeric value.
7407576777879808182838485***Acceptsadecimalparameterandreturnsanarrayofcharacters*representingthebitsinthe16bittwoscomplementequivalent."**precondition:*Thismethodrequiresthatthetwoscomplenentequivalent*wontrequiremorethan16bits**eparamtheDecimalthedecimalnumbertoconvertto2scomplement*ethrowsIllegalArgumentExceptioniftheparametercannotberepresentedin16bits*areturna16bittwoscomplementequivalentofthedecimalparameter*/
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
