Here you can find the source of unsetBit(byte original, int bitToUnSet)
Parameter | Description |
---|---|
original | byte |
bitToUnSet | bit to set |
public static byte unsetBit(byte original, int bitToUnSet)
//package com.java2s; //License from project: Open Source License public class Main { /**/*ww w . java2s. c o m*/ * Sets a bit to zero in a byte then returns new byte * @param original byte * @param bitToUnSet bit to set * * @return byte with changed bit */ public static byte unsetBit(byte original, int bitToUnSet) { return (byte) (original & ~(1 << bitToUnSet)); } }