Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 26 Apr 2011 13:17:38 -0500 Date: Tue, 26 Apr 2011 11:17:31 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: Java left shift and right shift operators. References: <295e16b3-2ed8-4529-bfb0-1cc26ed93ad6@d26g2000prn.googlegroups.com> <1b558330-ae94-4e4e-9922-a9aeb63eaf37@d19g2000prh.googlegroups.com> <44bbc323-c260-4169-ab2a-11b95d9e73e8@34g2000pru.googlegroups.com> In-Reply-To: <44bbc323-c260-4169-ab2a-11b95d9e73e8@34g2000pru.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 17 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 75.8.126.96 X-Trace: sv3-0pe200KPO4Wa3DKU5fO/VsMFGqL4NKOZWI7HfrI8AlmSjZOkavFf+xR/J0P/d0X8cd/Lu45VXAS2DK/!xESjms6MzJqdO7nQVPJxuwEZmm+x1sQlaZQL5z6TKVvdLIwr2yAqfeIjQZyFXw8ZVIxD4+hRxPbR!Gog2Nz72khrrfTJqRzYYI/CVMBi+LpTbKcL/6n+1ASU= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1967 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3278 On 4/26/2011 9:39 AM, Sanny wrote: ... > I have heard of BigInteger I dont know how many bits it supports. ... BigInteger uses int to index the bits, so it cannot contain more than Integer.MAX_VALUE bits. > Can I use byte[] to represent a longer number and do multiplications/ > divisions on them? You could, with a lot of work, but the result would be a less efficient version of BigInteger. BigInteger uses int[] internally to store the data, reducing the number of separate operations when operating on a large number. Patricia