Performing Bitwise Operations with BigInteger : BigInteger « Data Type « Java Tutorial

Home
Java Tutorial
1.Language
2.Data Type
3.Operators
4.Statement Control
5.Class Definition
6.Development
7.Reflection
8.Regular Expressions
9.Collections
10.Thread
11.File
12.Generics
13.I18N
14.Swing
15.Swing Event
16.2D Graphics
17.SWT
18.SWT 2D Graphics
19.Network
20.Database
21.Hibernate
22.JPA
23.JSP
24.JSTL
25.Servlet
26.Web Services SOA
27.EJB3
28.Spring
29.PDF
30.Email
31.J2ME
32.J2EE Application
33.XML
34.Design Pattern
35.Log
36.Security
37.Apache Common
38.Ant
39.JUnit
Java Tutorial » Data Type » BigInteger 
2.45.10.Performing Bitwise Operations with BigIntegerPrevious/Next
import java.math.BigInteger;

public class Main {
  public static void main(String[] argvthrows Exception {
    byte[] bytes = new byte[] { 0x10x000x00 }
    BigInteger bi = new BigInteger(bytes);
    boolean b = bi.testBit(3)
    b = bi.testBit(16)
  }
}
2.45.BigInteger
2.45.1.Create BigInteger via string
2.45.2.Create BigInteger via long type variable
2.45.3.Create BigInteger from byte array
2.45.4.Operating with Big Integer Values
2.45.5.Multiply one BigInteger to another BigInteger
2.45.6.Subtract one BigInteger from another BigInteger
2.45.7.Divide one BigInteger from another BigInteger
2.45.8.Negate a BigInteger
2.45.9.Calculate the power on a BigInteger
2.45.10.Performing Bitwise Operations with BigInteger
2.45.11.Get the value of a bit
2.45.12.Set a bit for BigInteger
2.45.13.Clear a bit in a BigInteger
2.45.14.Flip a bit in a BigInteger
2.45.15.Shift the bits in a BigInteger
2.45.16.Shift right in a BigInteger
2.45.17.xor a BigInteger
2.45.18.and operation on BigInteger
2.45.19.not operation for BigInteger
2.45.20.or operation for BigInteger
2.45.21.antNot operation on BigInteger
2.45.22.Retrieve the current bits in a byte array in twos-complement form.
2.45.23.Parse octal string to create BigInteger
2.45.24.Parse decimal string to create BigInteger
2.45.25.Parse hexadecimal string to create BigInteger
2.45.26.Parsing and Formatting a Big Integer into Binary
2.45.27.Parsing and Formatting a Big Integer into octal
2.45.28.Parsing and Formatting a Big Integer into decimal
2.45.29.Parsing and Formatting a Byte Array into Binary
2.45.30.Parsing and Formatting a Byte Array into Octal
2.45.31.Parsing and Formatting a Byte Array into decimal
2.45.32.Parsing and Formatting a Byte Array into Hexadecimal
2.45.33.Parse and format to hexadecimal
2.45.34.Parse and format to arbitrary radix <= Character.MAX_RADIX
2.45.35.Parse binary string
2.45.36.Convert BigInteger into another radix number
2.45.37.Do math operation for BigInteger
2.45.38.Operate with big integer values in code
2.45.39.Get byte array from BigInteger
2.45.40.BigInteger.isProbablePrime
2.45.41.performing the modular exponential
2.45.42.Use BigInteger
2.45.43.Get BigInteger from an object
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.