Questions tagged [bitmask]

Bitmask is a technique used to isolate specific bits in a byte in order to work only on the desired ones. They are used in IP addresses to separate the network prefix and the host number for example.

738 questions
-4
votes
1 answer

Set and get multiple information in bit format

I have these bits 0010 1110 0101 0111. Currently the value of bits from 7 to 11 (right to left) is 10011. I want to set it to 10110 for example. How do I do that?
Bhadresh
  • 15
  • 3
-7
votes
3 answers

Bitwise operators explanation

If we have a bitmask -> "00101101" and a variable i = 4 If we do this (1 << i) | bitmask then what will happen to the bitmask? Thank you.
rondo
  • 63
  • 8
-7
votes
2 answers

How to compile Java code

I really know nothing about Java. I am trying to figure out how to compile this code to use it, but unsure how. If anyone could shed some light. The source code (taken from this website): import java.awt.image.BufferedImage; import…
shiloh90
  • 9
  • 2
1 2 3
…
49
50