Question: java An integer n writte in in base-(-2) is a sequence of bits (b_i), written right to left. Each of which is either or 1
java
An integer n writte in in base-(-2) is a sequence of bits (b_i), written right to left. Each of which is either or 1 (no negative bits are allowed) and the following must hold: n = b_0 + b_1 * (-2) + 6+2 * (-2)^2 + b_3 * (-2)^3 + ... Every integer in base-10 has a unique representation in base-(-2) and no negative signs are ever needed. Your task is to write a program that given a number in base-10 finds its base-(-2) representation. Input The number in base-10,-1,000,000,000
Step by Step Solution
There are 3 Steps involved in it
To solve the problem of converting an integer from base10 to base2 youll need to implement a method ... View full answer
Get step-by-step solutions from verified subject matter experts
