Android Bit Set resetBit(byte b, int bit)

Here you can find the source of resetBit(byte b, int bit)

Description

reset Bit

License

Open Source License

Declaration

public static byte resetBit(byte b, int bit) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static byte resetBit(byte b, int bit) {
        if (bit < 0 || bit >= 8)
            return b;
        return (byte) (b & (~(1 << bit)));
    }/*from   w w w .j a  v  a  2  s  .c  om*/
}

Related

  1. setBit(byte bite, int offset, boolean set)
  2. setBit(byte bits, int offset, boolean status)
  3. setBit(byte[] arr, int bit)
  4. setBit(byte[] bytes, int bitNr, int bit)
  5. reverseBits(byte[] bits)
  6. bitwiseNot(int number)