Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: assignments Date: Thu, 19 Jun 2014 20:51:19 -0400 Organization: A noiseless patient Spider Lines: 19 Message-ID: References: <6aafa91c-4b8c-4884-a30d-2c4af8b443c2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 20 Jun 2014 00:51:23 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="bd4e1cba8d8592bec5d5ed9e4537fbfd"; logging-data="25309"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX180vNcRFLz97HXsGp8TmGdM" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <6aafa91c-4b8c-4884-a30d-2c4af8b443c2@googlegroups.com> Cancel-Lock: sha1:BaR8s6bwEZFm/laRYC3tfB8DNNo= Xref: csiph.com comp.lang.java.programmer:28782 On 6/19/2014 8:44 PM, Ruben Ongayo wrote: > Write a java program that can add,subtract,multiply,and divide binary?? > Please help me..... public class Ongayo { public static void main(String[] unused) { int binary_x = 0b11111011110; int binary_y = 0b101010; int binary_sum = binary_x + binary_y; int binary_difference = binary_x - binary_y; int binary_product = binary_x * binary_y; int binary_quotient = binary_x / binary_y; int binary_modulus = binary_x % binary_y; // extra credit! } } -- Eric Sosman esosman@comcast-dot-net.invalid