Question: please code in java . not allowed to use any inbuild functions or methods. only use tje the char[] that is given and math fucntion.
** Accepts a decimal parameter and returns an array of characters * representing the bits in the 16 bit two's complement equivalent. * precondition: * This method requires that the two's complement equivalent * won't require more than 16 bits * eparam theDecimal the decimal number to convert to two's complement * @throws IHlegalacgument Exception. if the parameter cannot be represented in 16 bits. * Qreturn a 16 bit two's complement equivalent of the decimal parameter
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
